Billing

Purchase credits

Purchase a one-time amount of credits against the saved payment method. Requires a user credential with billing:manage and a stable idempotency key.

post/billing/credits/purchase

Request

  • Base URL: https://api.sazabi.com/v1
  • URL: https://api.sazabi.com/v1/billing/credits/purchase
  • Auth: none declared

Request body

organizationIdstring

Organization to operate on. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).

amountstring required

Amount to charge in the account currency; adds the same amount of credits.

idempotencyKeystring required

Client-generated key. Repeating a request with the same key returns the original purchase instead of charging again.

Response

OK

status'paid' | 'pending_payment' required
billingInvoiceIdstring required
topUpAmountstring required
creditsToGrantstring required
currencystring required

Changes

No recorded changes to this operation across all 54 revisions of this API.