Start a credit top-up Checkout flow
const url = 'https://api.ultimateteam.ai/api/v1/billing/topup';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"credit_pack_size":1}'};
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/topup \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "credit_pack_size": 1 }'Create a Stripe Checkout Session for the per-plan credit top-up price ($40/1K Starter, $30/1K Professional, $20/1K Business). Enterprise tenants receive 403 – Enterprise top-ups are custom-negotiated.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Request body for POST /api/v1/billing/topup (FIN-04).
Attributes:
credit_pack_size: Total credits to purchase. Must be a positive
multiple of 1000 – the Stripe Product is priced per-1000
and quantity is derived as credit_pack_size // 1000.
object
Total credits to purchase (must be a positive multiple of 1000)
Examplegenerated
{ "credit_pack_size": 1}Responses
Section titled “ Responses ”Successful Response
Response for POST /api/v1/billing/topup.
Attributes: checkout_url: The hosted Stripe Checkout URL – frontend redirects the tenant here to complete payment. session_id: The Stripe Checkout Session ID. Primary idempotency key for the checkout.session.completed webhook handler.
object
Examplegenerated
{ "checkout_url": "example", "session_id": "example"}Validation Error
object
object
object
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}