POST
TypeScript client

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

organizationId
string
required

Organization id (UUID). Discover ids via the list organizations endpoint or the agent context.

Body

application/json
amountDecimillicents
integer
required

One-time credit purchase amount in decimillicents (10000000 decimillicents = $1, so 100000 = 1 cent); min 5000000 ($0.50, the Stripe minimum charge), max 5000000000 ($500).

Required range: 5000000 <= x <= 5000000000
Example:

200000000

successUrl
string
required

http(s) URL Stripe redirects the user to after a successful checkout.

Pattern: ^https?:\/\/
Example:

"https://app.octospark.ai/billing?topup=success"

cancelUrl
string
required

http(s) URL Stripe redirects the user to when they abandon the checkout.

Pattern: ^https?:\/\/
Example:

"https://app.octospark.ai/billing?topup=cancelled"

Response

Success

id
string
required
url
string
required