API reference

Billing

6 endpoints under /v1/billing.

Get Credit Balance

get/v1/billing/balance

Read the current credit balance.

Headers

  • X-Organization-IDstringoptional

Failures return the error envelope; branch on error_code.

Request
Response

Get Entitlements

get/v1/billing/entitlements

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

Headers

  • X-Organization-IDstringoptional

Failures return the error envelope; branch on error_code.

Request
Response

Get Invoices

get/v1/billing/invoices

List invoices with cursor-based pagination. Returns an empty list, not 404, when the org has no Stripe customer.

Query parameters

  • limitintegeroptional
  • starting_afterstringoptional

Headers

  • X-Organization-IDstringoptional

Failures return the error envelope; branch on error_code.

Request
Response

Get Subscription

get/v1/billing/subscription

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

Headers

  • X-Organization-IDstringoptional

Failures return the error envelope; branch on error_code.

Request
Response

List Credit Transactions

get/v1/billing/transactions

List credit-transaction history with offset pagination. 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.

Query parameters

  • limitintegeroptional
  • offsetintegeroptional
  • transaction_typestringoptional

Headers

  • X-Organization-IDstringoptional

Failures return the error envelope; branch on error_code.

Request
Response

Get Usage Summary

get/v1/billing/usage

Read the usage summary for the current billing period.

Headers

  • X-Organization-IDstringoptional

Failures return the error envelope; branch on error_code.

Request
Response