Skip to main content

Billing

Every call needs Authorization: Bearer <key>. 4 calls:

Plan, lines billed, payment method and past-due state​

GET /v1/billing

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.

Response 200

FieldTypeDescription
credits_centsintegerAmount in US cents. From -9007199254740991 to 9007199254740991.
current_period_endstring (date-time) or nullISO 8601 timestamp.
estimated_monthly_centsintegerAmount in US cents. From -9007199254740991 to 9007199254740991.
line_quantityintegerFrom 0 to 9007199254740991.
mandate_accepted_atstring (date-time) or nullISO 8601 timestamp.
mandate_statusstring or null
past_dueobject or null
past_due.amount_due_centsintegerAmount in US cents. From -9007199254740991 to 9007199254740991.
past_due.bannerboolean
past_due.dayintegerFrom 0 to 9007199254740991.
past_due.hosted_invoice_urlstring or null
past_due.invoice_idstring (uuid)
past_due.invoice_numberstring
past_due.next_actionstring or null
payment_methodobject or null
payment_method.bank_namestring or null
payment_method.last4string or null
payment_method.typeenumOne of: us_bank_account, card.
payment_setupobject
payment_setup.statusenumOne of: none, pending, requires_action, verified.
payment_setup.verification_urlstring or null
payments_modeenumOne of: mock, stripe.
per_line_centsintegerAmount in US cents. From -9007199254740991 to 9007199254740991.
planenumOne of: pilot, growth, enterprise.
platform_fee_centsintegerAmount in US cents. From -9007199254740991 to 9007199254740991.
subscription_statusstring or null

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

List invoices​

GET /v1/billing/invoices

From the Stripe mirror, newest first. Drafts are not shown.

Query parameters

NameTypeRequiredDescription
limitintegerNoFrom 1 to 100. Default 50.
cursorstringNoOpaque cursor from next_cursor. Up to 512 characters.
statusenumNoOne of: draft, open, processing, paid, failed, void, uncollectible.

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.

Response 200

FieldTypeDescription
dataobject[]
data[].amount_due_centsintegerAmount in US cents. From -9007199254740991 to 9007199254740991.
data[].amount_paid_centsintegerAmount in US cents. From -9007199254740991 to 9007199254740991.
data[].descriptionstring or null
data[].due_atstring (date-time) or nullISO 8601 timestamp.
data[].failure_codestring or null
data[].hosted_invoice_urlstring or null
data[].idstring (uuid)
data[].issued_atstring (date-time) or nullISO 8601 timestamp.
data[].methodenum or nullOne of: us_bank_account, card.
data[].numberstring
data[].paid_atstring (date-time) or nullISO 8601 timestamp.
data[].statusenumOne of: draft, open, processing, paid, failed, void, uncollectible.
next_cursorstring or nullPass as cursor to get the next page; null at the end.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Open the Stripe customer portal​

POST /v1/billing/portal

A one-time portal link. return_url must be on the dashboard; it defaults to Settings > Billing.

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Request body

FieldTypeRequiredDescription
return_urlstring (uri)NoHTTPS URL. Up to 2048 characters.

Response 201

FieldTypeDescription
urlstring

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Start adding a bank account (ACH) or card​

POST /v1/billing/setup-intent

Returns a Stripe SetupIntent client secret for Stripe.js (Financial Connections for us_bank_account). Not stored for idempotent replay.

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Request body

FieldTypeRequiredDescription
methodenumNoOne of: us_bank_account, card. Default "us_bank_account".

Response 201

FieldTypeDescription
client_secretstring
methodenumOne of: us_bank_account, card.
payments_modeenumOne of: mock, stripe.
setup_intent_idstring
statusstring

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.