Skip to content

Get or create Stripe customer and optionally create checkout session

POST
/billing
object
messagePriceId

Price ID for the message tier (EMAIL, INAPP_WEB, WEB_PUSH, PUSH, SLACK)

string
budgetPriceId

Price ID for the budget tier (SMS, CALL)

string
successUrl
required
string
cancelUrl
required
string

Successful response

POST /billing response: account + merged usage limits (when present) + optional session.

object
organizationId
required
string
organizationType
required
string
Allowed values: free paid
creator
required
string
messagesCap
required
number
costCap
required
number
createdAt
required
string
updatedAt
required
string
anniversaryDate
required

ISO date (YYYY-MM-DD) when the billing cycle resets.

string
allowOverage
required
boolean
name
required
string
smsCap
number
callCap
number
stripeCustomerId

Stripe subscription ID.

string
stripeSubscriptionId
string
subscriptionStatus
string
Allowed values: active canceled past_due paused
status

Verification status.

string
Allowed values: verified unverified blocked
pendingDowngradeCostCap
number
pendingDowngradeMessagesCap
number
pendingDowngradeSmsCap
number
pendingDowngradeCallCap
number
pendingDowngradeEffectiveDate
string
pendingDowngradeAccountType
string
Allowed values: free
sessionId
string
url
string

Bad Request - validation errors, invalid input

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
provider

Provider that caused the error (e.g. telnyx, ses).

string
providerCode

Provider-specific error code.

string

Unauthorized

Payment Required - usage limits exceeded

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
provider

Provider that caused the error (e.g. telnyx, ses).

string
providerCode

Provider-specific error code.

string

Internal Server Error

Bad Gateway - provider error

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
provider

Provider that caused the error (e.g. telnyx, ses).

string
providerCode

Provider-specific error code.

string