Which flow would you like to build?
Checkout
Send the customer to a Salesbricks-hosted page to pay. Best for self-serve signup.
Signature
Send the customer to execute the contract by signing an order form. Best for enterprise or sales-assisted deals.
Direct start
Activate server-side with no customer interaction. Best for existing customers and migrations.
Before you begin
You will need a Public API Token and a
published plan. All examples use the production base URL
https://api.salesbricks.com/api/v2.plan_id and the brick_id values you want to sell with List all plans:
cURL
Shared steps
1
Create a customer
POST /customers creates the record representing the purchasing company. Only name is required.cURL
JSON
customer_id.2
Add a contact
POST /customers/{customer_id}/persons adds a person to the customer. This person can be used as the subscription point of contact, the signatory, or both. first_name, last_name, email, and role are all required.cURL
JSON
person_id. The same person can act as both the point of contact and the signatory, or you can create a separate contact for each role.3
Create the subscription
POST /subscriptions builds the agreement. These fields are all required: customer_id, point_of_contact_id, signatory_user_id, plan_id, bricks, starts_at, contract_length, and billing_frequency.cURL
JSON
subscription_id — the activation step needs it.billing_frequency accepts MONTHLY, QUARTERLY, SEMI_ANNUALLY, ANNUALLY, or ALL_UPFRONT. contract_length is the total term in months, which is separate from how often you invoice.currency (defaults to USD), payment_terms, auto_renews, discount_coupons, accounts_payable_emails, first_charge_date, and metadata for your own key-value data.Preview the price first
To show a total before committing — a pricing page or an in-app plan picker — post the same body toPOST /subscriptions/estimate. It returns the billing schedule and grand total without creating anything.
cURL
Activate the subscription
Pick one of the three endpoints below.Option 1 — Hosted checkout
GET /subscriptions/{subscription_id}/checkout returns a hosted checkout URL showing the subscription summary and a payment form.
cURL
JSON
Option 2 — Order form signature
POST /subscriptions/{subscription_id}/sign returns a URL where the customer signs the order form. A redirect_url is required — that is where the customer lands after signing.
cURL
JSON
Option 3 — Direct start
POST /subscriptions/{subscription_id}/start activates the subscription server-side, with no checkout or signature. Use it when the customer already has a payment method on file, or when migrating subscriptions in from another system.
cURL
200 response returns the full subscription detail and confirms activation.