Understand user-default billing accounts, workspace billing bindings, account-level balance views, and workspace-scoped checkout flows. Each user now has a default billing account with 1000 cents of introductory credit, and every workspace must bind to a billing account when it is created. Workspace-scoped billing routes still exist for checkout and usage views, but balance and transaction reporting are also available directly at the billing-account level.

Billing Endpoints

ActionEndpoint
List owned billing accountsGET /billing-accounts
Get billing account detailsGET /billing-accounts/{billingAccountId}
Get billing account balanceGET /billing-accounts/{billingAccountId}/balance
Get billing account summaryGET /billing-accounts/{billingAccountId}/summary
Get billing account transactionsGET /billing-accounts/{billingAccountId}/transactions
List workspace-linked billing accountsGET /workspaces/{workspaceId}/billing/accounts
Create and link billing accountPOST /workspaces/{workspaceId}/billing/accounts
Link existing billing accountPOST /workspaces/{workspaceId}/billing/accounts/link
Set workspace default billing accountPOST /workspaces/{workspaceId}/billing/accounts/{billingAccountId}/default
Unlink non-default billing accountDELETE /workspaces/{workspaceId}/billing/accounts/{billingAccountId}
Get balanceGET /workspaces/{workspaceId}/billing/balance
Create Stripe checkoutPOST /workspaces/{workspaceId}/billing/checkout
Create x402 checkoutPOST /workspaces/{workspaceId}/billing/checkout/x402
Add creditsPOST /workspaces/{workspaceId}/billing/credits
Get transactionsGET /workspaces/{workspaceId}/billing/transactions
Get billing summaryGET /workspaces/{workspaceId}/billing/summary
Get usage overviewGET /workspaces/{workspaceId}/billing/usage-overview
Read rate-limit statusGET /workspaces/{workspaceId}/rate-limits
Refresh rate-limit tierPOST /workspaces/{workspaceId}/rate-limits/refresh

Current Model

  • A user-owned default billing account is auto-provisioned at signup or user creation.
  • POST /workspaces accepts an optional billingAccountId; if omitted, the user default billing account is bound automatically.
  • Workspace balance and rate-limit decisions now resolve through the workspace’s default billing account.

Checkout Payload

CreateCheckoutSessionDto currently accepts:
  • amountCents
  • successUrl
  • cancelUrl

API Pages