Create a Stripe Checkout Session for the requested plan tier
POST
/api/v1/billing/checkout
const url = 'https://api.ultimateteam.ai/api/v1/billing/checkout';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"plan_tier":"example","return_to":"example","tenant_id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.ultimateteam.ai/api/v1/billing/checkout \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "plan_tier": "example", "return_to": "example", "tenant_id": "example" }'Return a hosted Stripe Checkout URL for the requested plan tier.
Validation:
plan_tiermust be one of :data:PUBLIC_PLAN_NAMES.tenant_idMUST match the authenticated user’s tenant – a cross-tenant request is rejected 403.
Enterprise returns the existing sales email destination without a Stripe call.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
CheckoutRequest
POST /checkout request body.
object
Examplegenerated
{ "plan_tier": "example", "return_to": "example", "tenant_id": "example"}Responses
Section titled “ Responses ”Successful Response
Media typeapplication/json
CheckoutResponse
POST /checkout response body.
For Enterprise plans, checkout_url is the sales email destination
and session_id is None; no payment session is created.
Examplegenerated
{ "checkout_url": "example", "session_id": "example"}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}