# Salesbricks ## Docs - [Create a person for a customer](https://docs.salesbricks.com/api-reference/customer-person/create-a-person-for-a-customer.md): Creates a new person for a customer. - [Update a person for a customer](https://docs.salesbricks.com/api-reference/customer-person/update-a-person-for-a-customer.md): Updates a person for a customer. - [Create a customer](https://docs.salesbricks.com/api-reference/customer/create-a-customer.md): Creates a new customer. - [Get a customer](https://docs.salesbricks.com/api-reference/customer/get-a-customer.md): Get a customer by ID. - [List customers](https://docs.salesbricks.com/api-reference/customer/list-customers.md): Returns a paginated list of all customers for the authenticated seller. Each customer includes their associated subscriptions with key fields: subscription ID, status, name, start date, and end date. Pagination is handled via query params (limit, offset). - [Search customers](https://docs.salesbricks.com/api-reference/customer/search-customers.md): Search for customers using various criteria. Supports searching by name (case-insensitive substring match), external_id (exact match), or stripe_customer_id (exact match). At least one search parameter must be provided. Pagination is handled via query params (limit, offset). - [Update a customer](https://docs.salesbricks.com/api-reference/customer/update-a-customer.md): Updates a customer. - [Get apiv2customerssearch](https://docs.salesbricks.com/api-reference/customers/get-apiv2customerssearch.md) - [Get all discount coupons](https://docs.salesbricks.com/api-reference/discount-coupon/get-all-discount-coupons.md): Returns a paginated list of discount coupons for the authenticated seller. Supports filtering by active status and validity. Use this endpoint to display available coupons or validate coupon availability during checkout. - [Get discount coupon by code](https://docs.salesbricks.com/api-reference/discount-coupon/get-discount-coupon-by-code.md): Returns the details of a specific discount coupon by its code. The code lookup is case-insensitive. The response includes the coupon's current status (active, is_valid, is_expired) so the caller can determine how to handle it. Use this endpoint to validate and display coupon details during checkout. - [Authentication](https://docs.salesbricks.com/api-reference/getting-started/authentication.md) - [Idempotent Requests](https://docs.salesbricks.com/api-reference/getting-started/idempotent-requests.md) - [Overview](https://docs.salesbricks.com/api-reference/getting-started/overview.md) - [Get invoice versions](https://docs.salesbricks.com/api-reference/invoice-version/get-invoice-versions.md): Returns an array of past invoice versions for the specified invoice. Each version represents a historical snapshot of the invoice at a specific point in time, including the PDF generated at that time. ## Signed URLs Each version includes a generated_url field with a signed URL that expires in 1 hour. - [Get invoice details](https://docs.salesbricks.com/api-reference/invoice/get-invoice-details.md): Get the invoice details by ID. - [Get invoice PDF](https://docs.salesbricks.com/api-reference/invoice/get-invoice-pdf.md): Returns the url link to the PDF file for the invoice. The URL expires in 1 hour. The download parameter can be used to force download with Content-Disposition header. - [Pay an invoice](https://docs.salesbricks.com/api-reference/invoice/pay-an-invoice.md): Process a payment for a specific invoice using a Stripe payment method. - [Update an invoice](https://docs.salesbricks.com/api-reference/invoice/update-an-invoice.md): Update an invoice with override fields, line item descriptions, and/or PDF attachments. | Field | Affects this invoice | Persists to future invoices | |-------|---------------------|----------------------------| | due_at | ✓ | ✗ | | purchase_order | ✓ | ✓ (if persist_purchase_order=true) | | billing_address | ✓ | ✓ (Updates subscription) | | company_name | ✓ | ✓ (Updates subscription) | | accounts_payable_emails | ✓ | ✓ (Updates subscription) | | invoice_memo | ✓ | ✓ (if persist_memo=true) | | line_item_overrides | ✓ | ✗ | Upload PDF attachments as multipart form data using the pdf_attachments field. - [Manage My Subscription](https://docs.salesbricks.com/api-reference/manage-my-subscription.md) - [Search persons](https://docs.salesbricks.com/api-reference/person/search-persons.md): Search for persons (customer contacts) using various criteria. Supports searching by email, first_name, last_name (case-insensitive substring match), or customer_id (exact match to filter by associated customer). At least one search parameter must be provided. Pagination is handled via query params (limit, offset). - [Get apiv2personssearch](https://docs.salesbricks.com/api-reference/persons/get-apiv2personssearch.md) - [Get all plans](https://docs.salesbricks.com/api-reference/plan/get-all-plans.md): Returns a paginated list of published plans.This will fetch the plan and the associated bricks for that plan. - [Get plan details](https://docs.salesbricks.com/api-reference/plan/get-plan-details.md): Returns the details of a plan, including its name and bricks. - [Delete a payment method](https://docs.salesbricks.com/api-reference/subscription-billing/delete-a-payment-method.md): Removes a payment method from the subscription's customer. - [Get default payment method for subscription](https://docs.salesbricks.com/api-reference/subscription-billing/get-default-payment-method-for-subscription.md): Retrieves the default payment method for the subscription's customer. - [Get payment methods for subscription](https://docs.salesbricks.com/api-reference/subscription-billing/get-payment-methods-for-subscription.md): Retrieves all payment methods associated with the subscription's customer. Returns formatted payment method details including cards and bank accounts. - [Set default payment method for subscription](https://docs.salesbricks.com/api-reference/subscription-billing/set-default-payment-method-for-subscription.md): Sets the default payment method for the subscription's customer. The payment method must be a valid Stripe payment method ID attached to the customer. - [Setup payment methods for subscription](https://docs.salesbricks.com/api-reference/subscription-billing/setup-payment-methods-for-subscription.md): Creates a Stripe SetupIntent for adding payment methods to a subscription. Returns the necessary Stripe credentials to initialize the payment form. Supports both card and US bank account payment methods. - [Update accounts payable contacts for a closed subscription](https://docs.salesbricks.com/api-reference/subscription-billing/update-accounts-payable-contacts-for-a-closed-subscription.md): Updates the accounts payable email contacts for a subscription that has already started. Only the 'accounts_payable_emails' field can be modified for closed subscriptions. - [Get next invoice for subscription](https://docs.salesbricks.com/api-reference/subscription-invoice/get-next-invoice-for-subscription.md): Returns the next invoice that will have a non-zero amount for the given subscription - [Get subscription invoices](https://docs.salesbricks.com/api-reference/subscription-invoice/get-subscription-invoices.md): Returns a paginated list of invoices associated with the given subscription. Use this to show invoice history and billing status per subscription, display a timeline of past/current invoices, and let users download or inspect previous and current charges. - [Get subscription management URL](https://docs.salesbricks.com/api-reference/subscription-management/get-subscription-management-url.md): Get a URL for managing a subscription's billing portal. - [Creates a subscription recast](https://docs.salesbricks.com/api-reference/subscription-recast/creates-a-subscription-recast.md): Creates a subscription recast which can be use to replace the terms, dates, and or/or entitlements of a customer's current contract. It essentially scraps the existing agreement and creates a completely new one. Estimate the pricing for the newly created recast order by using the /subscriptions/{subscription_id}/recast/{order_id}/estimate endpoint or start it using the /subscriptions/{subscription_id}/upgrade/{order_id}/start. - [Deletes an open subscription recast order](https://docs.salesbricks.com/api-reference/subscription-recast/deletes-an-open-subscription-recast-order.md): PATCH /subscriptions/:subscription_id/recast/:order_id Updates a recast order by modifying its bricks and other properties. - [Get pricing estimate for a subscription Recast](https://docs.salesbricks.com/api-reference/subscription-recast/get-pricing-estimate-for-a-subscription-recast.md): Get pricing estimate for an open subscription Recast including the billing schedule and grand total. - [Get subscription Recast open orders](https://docs.salesbricks.com/api-reference/subscription-recast/get-subscription-recast-open-orders.md): Returns a list all the open orders for for subscription Recast. These are Recast orders that hasn't started yet. - [Get subscription Recast sign URL](https://docs.salesbricks.com/api-reference/subscription-recast/get-subscription-recast-sign-url.md): Get a URL for signing a subscription's Recast open order. - [Start subscription recast](https://docs.salesbricks.com/api-reference/subscription-recast/start-subscription-recast.md): Starts a subscription recast order for the specified subscription and order IDs. This endpoint is used to initiate a recast order and trigger the recast lifecycle. It validates the order is ready to start and processes payment if required. A recast restarts an existing subscription with new terms, typically used for contract amendments or renewals with changes. - [Updates a subscription Recast](https://docs.salesbricks.com/api-reference/subscription-recast/updates-a-subscription-recast.md): Updates a subscription Recast order. This endpoint allows you to modify bricks, AP contacts, and other properties for an existing Recast order. - [Create subscription brick upgrade](https://docs.salesbricks.com/api-reference/subscription-upgrade/create-subscription-brick-upgrade.md): Create a quantity-only upgrade for subscription bricks. - [Creates a subscription upgrade](https://docs.salesbricks.com/api-reference/subscription-upgrade/creates-a-subscription-upgrade.md): Creates a subscription upgrade that can be use to add or remove add-ons from an existing contract term. Estimate the pricing for the newly created upgrade order by using the /subscriptions/{subscription_id}/upgrade/{order_id}/estimate endpoint or start it using the /subscriptions/{subscription_id}/upgrade/{order_id}/start. - [Deletes an open subscription recast order](https://docs.salesbricks.com/api-reference/subscription-upgrade/deletes-an-open-subscription-recast-order.md): PATCH /subscriptions/:subscription_id/upgrade/:order_id Updates an upgrade order by modifying its bricks and other properties. - [Get pricing estimate for a subscription Upgrade](https://docs.salesbricks.com/api-reference/subscription-upgrade/get-pricing-estimate-for-a-subscription-upgrade.md): Get pricing estimate for an open subscription Upgrade including the billing schedule and grand total. - [Get subscription Upgrade open orders](https://docs.salesbricks.com/api-reference/subscription-upgrade/get-subscription-upgrade-open-orders.md): Returns a list all the open orders for for subscription Upgrade. These are Upgrade orders that hasn't started yet. - [Get subscription Upgrade sign URL](https://docs.salesbricks.com/api-reference/subscription-upgrade/get-subscription-upgrade-sign-url.md): Get a URL for signing a subscription's Upgrade open order. - [Start the subscription upgrade](https://docs.salesbricks.com/api-reference/subscription-upgrade/start-the-subscription-upgrade.md): Starts a subscription upgrade order for the specified subscription and order IDs. This endpoint is used to initiate an upgrade order and trigger the upgrade lifecycle with the newly added / removedbricks. It validates the order is ready to start and processes payment if required. - [Updates a subscription Upgrade](https://docs.salesbricks.com/api-reference/subscription-upgrade/updates-a-subscription-upgrade.md): Updates a subscription Upgrade order. This endpoint allows you to modify bricks, AP contacts, and other properties for an existing Upgrade order. - [Creates a new subscription](https://docs.salesbricks.com/api-reference/subscription/creates-a-new-subscription.md): Creates a new subscription for a customer. - [Get all orders for a subscription](https://docs.salesbricks.com/api-reference/subscription/get-all-orders-for-a-subscription.md): Returns all closed orders for a subscription, including order dates, type, contract value, and PDF download links. Orders are returned in chronological order by start date (ascending by default). Supports pagination with limit/offset and ordering by starts_at, ends_at, or created_at. - [Get current subscription signed/closed order form URL](https://docs.salesbricks.com/api-reference/subscription/get-current-subscription-signedclosed-order-form-url.md): Returns an URL to the signed order form PDF for the most recent won (closed) order. Returns 404 if the subscription, latest won order, or signed order form is missing. - [Get pricing estimate for a subscription](https://docs.salesbricks.com/api-reference/subscription/get-pricing-estimate-for-a-subscription.md): Get pricing estimate for a subscription including the billing schedule and grand total for the subscription. - [Get subscription bricks](https://docs.salesbricks.com/api-reference/subscription/get-subscription-bricks.md): Returns all bricks and quantities for a subscription. - [Get subscription details](https://docs.salesbricks.com/api-reference/subscription/get-subscription-details.md): Returns the current subscription details for the specified ID, including plan name, lifecycle dates, billing information, point of contact, and line items. Use this endpoint to show subscription lifecycle info in user dashboards (e.g., start/end dates, contract renewal dates) and track active plan details. - [Get subscription order form PDF URL](https://docs.salesbricks.com/api-reference/subscription/get-subscription-order-form-pdf-url.md): Returns a signed URL to the order form PDF for the subscription. - [Get subscription sign URL](https://docs.salesbricks.com/api-reference/subscription/get-subscription-sign-url.md): Get a URL for signing a subscription's open order. - [Get the current subscription state](https://docs.salesbricks.com/api-reference/subscription/get-the-current-subscription-state.md): Returns the current state of a subscription, including its active status, current billing period, and real-time subscription information. This endpoint is optimized for displaying current subscription state in dashboards and real-time status updates. - [Start subscription](https://docs.salesbricks.com/api-reference/subscription/start-subscription.md): Starts a subscription for the specified ID. This endpoint is used to initiate a subscription and trigger the subscription lifecycle. It returns the subscription details after the start process. - [Terminate a subscription](https://docs.salesbricks.com/api-reference/subscription/terminate-a-subscription.md): Terminates a subscription either immediately or at a specified future date. This endpoint allows for scheduling termination, adding termination notes, and specifying notification emails for termination alerts. - [Update a subscription](https://docs.salesbricks.com/api-reference/subscription/update-a-subscription.md): Update a subscription for a customer. - [Create usage entry](https://docs.salesbricks.com/api-reference/usage/create-usage-entry.md): Submit a usage entry for a subscription's metered brick. - [Delete a usage entry](https://docs.salesbricks.com/api-reference/usage/delete.md): Use this API to delete an existing usage entry. - [Delete usage entry](https://docs.salesbricks.com/api-reference/usage/delete-usage-entry.md): Delete a usage entry by transaction_id. - [Get brick usage for a subscription](https://docs.salesbricks.com/api-reference/usage/get-brick-usage-for-a-subscription.md): Returns detailed usage metrics for a specific brick within a subscription, including pre-commitment amounts, used quantities, and remaining units. The remaining value can be negative if usage exceeds the pre-commitment amount. If no pre-commitment is set, pre_commitment and remaining will be 0. For pool bricks (usage aggregators), overages and overage_rate will always be 0/null; overage information appears on the individual bricks that contribute to the pool. By default, returns all historical periods. Use query parameters to filter results. - [Overview](https://docs.salesbricks.com/api-reference/usage/overview.md) - [Update a usage entry](https://docs.salesbricks.com/api-reference/usage/patch.md): Use this API to update an existing usage entry. - [Submit a usage entry](https://docs.salesbricks.com/api-reference/usage/post.md): Use this API to increment a final value counter for a customer. - [Update usage entry](https://docs.salesbricks.com/api-reference/usage/update-usage-entry.md): Update an existing usage entry by transaction_id. - [invoice.past.due](https://docs.salesbricks.com/api-reference/webhooks/invoice/past-due.md) - [Invoice Webhook Payload](https://docs.salesbricks.com/api-reference/webhooks/invoice/payload.md) - [invoice.payment.failed](https://docs.salesbricks.com/api-reference/webhooks/invoice/payment/failed.md) - [invoice.payment.succeeded](https://docs.salesbricks.com/api-reference/webhooks/invoice/payment/succeeded.md) - [invoice.start](https://docs.salesbricks.com/api-reference/webhooks/invoice/start.md) - [order.closed.delete](https://docs.salesbricks.com/api-reference/webhooks/order/closed-delete.md) - [order.closed.lost](https://docs.salesbricks.com/api-reference/webhooks/order/closed-lost.md) - [order.complete](https://docs.salesbricks.com/api-reference/webhooks/order/complete.md) - [order.end](https://docs.salesbricks.com/api-reference/webhooks/order/end.md) - [order.new-ramping-period](https://docs.salesbricks.com/api-reference/webhooks/order/new-ramping-period.md) - [Order Webhook Payload](https://docs.salesbricks.com/api-reference/webhooks/order/payload.md) - [order.stage.change](https://docs.salesbricks.com/api-reference/webhooks/order/stage-change.md) - [order.terminated](https://docs.salesbricks.com/api-reference/webhooks/order/terminated.md) - [Overview](https://docs.salesbricks.com/api-reference/webhooks/overview.md) - [Payment Webhook Payload](https://docs.salesbricks.com/api-reference/webhooks/payment/payload.md) - [Schemas](https://docs.salesbricks.com/api-reference/webhooks/schemas.md): In-depth look at webhook payload schemas - [Countersigning](https://docs.salesbricks.com/documentation/countersigning.md) - [Custom Billing (Beta)](https://docs.salesbricks.com/documentation/custom-billing.md) - [Custom email domain](https://docs.salesbricks.com/documentation/custom-email-domain.md): Send customer email notifications from your own domain - [Customer email notifications](https://docs.salesbricks.com/documentation/customer-email-notifications.md): What emails will Salesbricks send to your customers - [Deal Shaping](https://docs.salesbricks.com/documentation/deal-shaping.md): Best practices to help you and your customer benefit from a partnership and close the deal - [Dunning](https://docs.salesbricks.com/documentation/dunning.md): Handling failed payments in Salesbricks - [Magic Links](https://docs.salesbricks.com/documentation/magic-links.md): Allow your customers to buy from your pricing page via a checkout experience powered by Salesbricks - [Managing Your Customer](https://docs.salesbricks.com/documentation/managing-your-customer.md): A primer on Upgrades, Renewals, Recasts, and Terminations - [Order Stages](https://docs.salesbricks.com/documentation/order-stages.md) - [Order Types](https://docs.salesbricks.com/documentation/order-types.md): Understanding upgrades, renewals, recasts, and terminations - [Payment Communications](https://docs.salesbricks.com/documentation/payment-communications.md): How to tell your customers that they owe you money - [Ramping Structures](https://docs.salesbricks.com/documentation/ramping-structures.md) - [Reports & Charts (Beta)](https://docs.salesbricks.com/documentation/reports-and-charts.md): A primer for Salesbricks' reporting and charting features - [Taxed States](https://docs.salesbricks.com/documentation/taxed-states.md) - [Your email notifications](https://docs.salesbricks.com/documentation/your-email-notifications.md): What emails will Salesbricks send to your team - [Attio (Beta)](https://docs.salesbricks.com/integrations/attio.md) - [HubSpot](https://docs.salesbricks.com/integrations/hubspot.md) - [OIN Configuration Setup](https://docs.salesbricks.com/integrations/okta/oin-configuration.md): How to set up Okta Single Sign-On integration - [Private Integration Setup](https://docs.salesbricks.com/integrations/okta/private-integration.md): How to set up a private Okta integration with Salesbricks - [Quickbooks](https://docs.salesbricks.com/integrations/quickbooks.md): Quickly and easily connect Salesbricks to Quickbooks to automate your invoice, billing, and accounting workflows. - [Managed Package](https://docs.salesbricks.com/integrations/salesforce/managed-package.md) - [Overview](https://docs.salesbricks.com/integrations/salesforce/overview.md) - [Slack](https://docs.salesbricks.com/integrations/slack.md) - [Sphere](https://docs.salesbricks.com/integrations/sphere.md) - [Overview](https://docs.salesbricks.com/integrations/stripe/overview.md) - [Setup](https://docs.salesbricks.com/integrations/stripe/setup.md): Quick to configure; simple yet powerful integration. - [Duration Discounts](https://docs.salesbricks.com/orders/duration-discounts.md) - [Usage Alerts](https://docs.salesbricks.com/products/usage-alerts.md) - [Adding Team Members](https://docs.salesbricks.com/quickstart-guide/adding-team-members.md) - [Building an Order](https://docs.salesbricks.com/quickstart-guide/building-an-order.md) - [Checkout & Invoice Payment Options](https://docs.salesbricks.com/quickstart-guide/checkout-invoice-payment-options.md) - [Company Details & Branding](https://docs.salesbricks.com/quickstart-guide/company-details-and-branding.md): Tailor your Salesbricks site to your organization - [Getting Started](https://docs.salesbricks.com/quickstart-guide/getting-started.md) - [Introduction](https://docs.salesbricks.com/quickstart-guide/introduction.md): Close more deals faster with the simplest way to buy and sell software. - [Navigating Salesbricks](https://docs.salesbricks.com/quickstart-guide/navigating-salesbricks.md) - [Creating a Brick](https://docs.salesbricks.com/quickstart-guide/products-plans-bricks/creating-a-brick.md) - [Creating a Plan](https://docs.salesbricks.com/quickstart-guide/products-plans-bricks/creating-a-plan.md) - [Creating a Product](https://docs.salesbricks.com/quickstart-guide/products-plans-bricks/creating-a-product.md) - [Overview](https://docs.salesbricks.com/quickstart-guide/products-plans-bricks/overview.md) - [Renewals Management](https://docs.salesbricks.com/renewals/renewals-management.md) - [Pricing Display](https://docs.salesbricks.com/settings/finance/pricing-display.md) ## Optional - [Knowledge Base](https://support.salesbricks.com)