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.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”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
Example
{ "cancel_url": "https://app.primatomic.com/billing?status=cancelled", "success_url": "https://app.primatomic.com/billing?status=success"}Responses
Section titled “ Responses ”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
Example
{ "session_id": "cs_test_abc123", "url": "https://checkout.stripe.com/c/pay/cs_test_abc123"}Unauthorized
Billing not configured
Error response for billing operations.
object
error
required
Error message.
string
Example
{ "error": "Billing service not available"}Server error
Error response for billing operations.
object
error
required
Error message.
string
Example
{ "error": "Billing service not available"}Billing service unavailable
Error response for billing operations.
object
error
required
Error message.
string
Example
{ "error": "Billing service not available"}