API reference

Billing

6 endpoints under /v1/billing.

Read the current credit balance.

get/v1/billing/balance

Requiresbilling:read

Headers

  • X-Organization-IDstringoptional

Failures return the error envelope; branch on error_code.

Request
Response

Read the org's resolved entitlements (features + numeric limits).

get/v1/billing/entitlements

Requiresbilling:read

Headers

  • X-Organization-IDstringoptional

Failures return the error envelope; branch on error_code.

Request
Response

List invoices with cursor-based pagination.

get/v1/billing/invoices

Returns an empty list, not 404, when the org has no Stripe customer.

Requiresbilling:read

Query parameters

  • limitintegeroptional
  • starting_afterstringoptional

Headers

  • X-Organization-IDstringoptional

Failures return the error envelope; branch on error_code.

Request
Response

Read the org's current subscription (tier, status, period window).

get/v1/billing/subscription

Requiresbilling:read

Headers

  • X-Organization-IDstringoptional

Failures return the error envelope; branch on error_code.

Request
Response

List credit-transaction history with offset pagination.

get/v1/billing/transactions

Each row carries balance_after, so the running balance can be reconstructed without another query. transaction_type must be a TransactionType value; anything else yields an invalid_request error.

Requiresbilling:read

Query parameters

  • limitintegeroptional
  • offsetintegeroptional
  • transaction_typestringoptional

Headers

  • X-Organization-IDstringoptional

Failures return the error envelope; branch on error_code.

Request
Response

Read the usage summary for the current billing period.

get/v1/billing/usage

Requiresbilling:read

Headers

  • X-Organization-IDstringoptional

Failures return the error envelope; branch on error_code.

Request
Response