Billing API
Access subscription plans, create checkout sessions, manage prepaid credits, track real-time usage, and download invoices. Powered by Stripe for payments and Orb for usage metering. Base path:/v1/billing
Plans
List Plans
GET /v1/billing/plans
Retrieve all available pricing plans with feature breakdowns.
Get Current Plan
GET /v1/billing/plan
Retrieve your organization’s active subscription details.
Checkout
Create Checkout Session
POST /v1/billing/checkout
Create a Stripe checkout session for subscribing to or upgrading a plan. Returns a URL to redirect the user to Stripe’s hosted payment page.
Stripe price ID of the target plan
URL to redirect after successful payment
URL to redirect if the user cancels
Credits
Prepaid credits can be used for pay-as-you-go messaging and voice usage beyond plan limits.Get Credit Balance
GET /v1/billing/credits
Retrieve your current prepaid credit balance.
Credit amounts are in the smallest currency unit (cents for USD).
15000 = $150.00.Top Up Credits
POST /v1/billing/credits/topup
Add prepaid credits to your account. Payment is charged to your default payment method.
Amount in smallest currency unit (e.g.,
10000 = $100.00 USD)Configure Auto-Reload
PUT /v1/billing/credits/auto-reload
Set up automatic credit top-ups when your balance falls below a threshold.
Enable or disable auto-reload
Balance threshold (in smallest currency unit) that triggers a reload
Amount to reload when triggered
Usage
Get Current Usage
GET /v1/billing/usage
Retrieve real-time usage metrics for the current billing period from Orb.
Get Usage History
GET /v1/billing/usage/history
Retrieve usage breakdown by day or month for a date range.
Start date in ISO 8601 format (e.g.,
2026-01-01)End date in ISO 8601 format
Aggregation:
day or monthInvoices
List Invoices
GET /v1/billing/invoices
Retrieve past invoices from Stripe.
Invoice amounts are in the smallest currency unit (cents for USD). Divide by 100 for display.