Skip to content

Create checkout session

POST
/billing/checkout

Creates a checkout session for subscribing to the core usage-based plan. The checkout URL is valid for a limited time. Redirect the user to the returned URL to complete checkout. Required role: any.

Request body for creating a checkout session.

object
cancel_url
required

URL to redirect to if the customer cancels.

string
success_url
required

URL to redirect to on successful checkout.

string

Checkout session created

Response containing the checkout session URL.

object
session_id
required

The checkout session ID.

string
url
required

URL to redirect the customer to for completing checkout.

string

Unauthorized

Billing not configured

Error response for billing operations.

object
error
required

Error message.

string

Server error

Error response for billing operations.

object
error
required

Error message.

string

Billing service unavailable

Error response for billing operations.

object
error
required

Error message.

string