Skip to main content
POST
Create a billing portal session

Authorizations

api_access_token
string
header
required

This token can be obtained by visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user.

Path Parameters

id
integer
required

The numeric ID of the account

Body

application/json
session_reference
string
required

Your own idempotency key for this session.

Example:

"docs-example-session-1"

return_path
string

Where the provider should send the customer back to, relative to your dashboard.

Example:

"/settings/billing"

Response

Success

A URL into the payment provider's own hosted flow. What sits behind that URL is the provider's, not ours — its appearance, its steps and the shape of anything it returns can change without a change here. Treat the URL as short-lived and redirect to it rather than storing it.

schema_version
string

Version of this payload's shape.

account_id
integer

The account.

freshness
object

Where this answer came from and how current it is. Billing reads several systems, so every response says which one it used — treat state other than fresh as a reason to be careful with the numbers rather than a failure.