v2

latestOpenAPI 3.1.02026-08-013435189.7 KB
billing

Create a card top-up link

Purchase credits by dollar amount. amountCents is the dollar amount in cents (e.g. 500 = $5).

Default (no savedCardId): returns a checkout URL from the selected payment provider for hosted checkout.

When savedCardId is set: the referenced vaulted card is charged off-session on the same provider (no redirect) and checkoutUrl is empty on success. checkoutUrl is only populated when the provider requires an interactive step (e.g. a 3DS/SCA re-authentication) to complete the charge. savedCardId and saveCard=true are mutually exclusive. Requires workspace role owner or admin.

post/billing/top-up/card-link

Headers

Idempotency-Keystring

Optional client-generated key. A repeated request with the same key replays the original response (within 24h) instead of re-executing — safe retries.

Request body

amountCentsinteger required

Response

Successful response.

checkoutUrlstring required

Empty unless status is ACTION_REQUIRED.

creditsinteger required

Credits that will be added to the account after payment

sessionIdstring required
status'COMPLETED' | 'PENDING' | 'ACTION_REQUIRED' required