v5

latestOpenAPI 3.1.02026-08-025631,1012.8 MB
Organization Billing

Create Checkout

Create a Stripe Checkout Session for a one-time credit purchase.

Allows organization admins to purchase credit packages via Stripe Checkout. After successful payment, credits are automatically added to the organization.

Available Packages:

  • starter: 10,000 credits — $10
  • growth: 50,000 credits — $40
  • scale: 200,000 credits — $120

Requirements:

  • Admin permission

Example:

response = await client.post(
    "/v1/organizations/billing/checkout",
    json={"package": "growth"}
)
# Redirect user to response["checkout_url"]
post/v1/organizations/billing/checkout

Request body

packagestring required

Credit package to purchase: starter, growth, or scale

success_urlstring nullable

Redirect URL after successful payment

cancel_urlstring nullable

Redirect URL if checkout is cancelled

Example request

{
  "package": "starter"
}

Response

Successful Response

checkout_urlstring required

Stripe-hosted checkout page URL

session_idstring required

Stripe Checkout Session ID

Example response

{
  "checkout_url": "https://checkout.stripe.com/c/pay/cs_live_abc123",
  "session_id": "cs_live_abc123"
}