Billing Checkout
POST
/v1/billing/checkoutFreeCreates a Stripe checkout session for purchasing credits. Redirect your user to the returned URL to complete payment.
Request body
{
"packId": "growth"
}
| Field | Type | Required | Description |
|---|---|---|---|
| packId | string | Yes | The pack id from /v1/billing/packs |
Response
{
"url": "https://checkout.stripe.com/pay/cs_live_a1b2c3d4..."
}
| Field | Type | Description |
|---|---|---|
| url | string | Stripe checkout URL โ redirect your user here |
After payment completes, Stripe redirects the user to your configured success URL and the credits are added to the account balance immediately.
Example
Webhook
After payment succeeds, Stripe sends a checkout.session.completed event to our webhook. Credits are applied automatically โ you do not need to poll or confirm.