Buy credits
POST/v1/credit_purchases
Creates and finalizes a standalone invoice (billing_reason = credit_purchase) for a quantity of a credits product, independent of any subscription. The balance becomes available once the invoice is paid: the invoice.paid webhook carries line_items[].product_type and quantity.
Request​
Responses​
- 201
- 401
- 403
- 404
- 422
- 429
- 500
Purchase invoice, with its line items.
Missing or invalid bearer token.
Token is valid but lacks permission for this operation. With code insufficient_scope, details.required carries the one minimal set of scopes that, added to details.granted, would let the request through: the resource scope (billing/{resource}, or billing/all off the catalogue) then the bare verb — e.g. ["billing/customers", "delete"].
Resource not found in the current organization.
Request body failed validation.
Rate limit exceeded.
Unexpected server error.