Billing
Get plan and remaining usage
GET/api/v1/billing/balance
Returns the selected organization's plan, its overage cap, its Stripe subscription state (null on the free hobby plan), and the remaining seconds for each metered resource. Usage is metered in seconds, not money: a plan grants a number of seconds per period and sessions debit them. On a paid plan secondsRemaining may be negative, which is overage billed at the end of the period up to overageCapUsd. Visible to every member of the organization.
Header parameters
X-Organization-IdstringSelects which of the caller's organizations the request acts on. When omitted, the caller's default organization is used.
Returns
accountTypestringrequiredThe organization's plan.
overageCapUsdnumberrequiredDollars of overage allowed past the plan's included seconds in one period, at $0.15 per minute. 0 means the organization hard-stops when it runs out.
subscriptionobjectrequirednullableThe Stripe subscription backing a paid plan, or null on the free hobby plan.
Show child attributes
statusstringrequiredStripe subscription status. active, trialing, and past_due all keep the plan's entitlements; the plan ends only when the subscription is deleted.
currentPeriodEndstring · date-timerequiredWhen the current billing period ends, and the included seconds are granted again.
cancelAtPeriodEndbooleanrequiredTrue when the subscription is set to end at currentPeriodEnd rather than renew.
resourcesarrayrequiredRemaining usage per metered resource. Today only mobile is metered; more resources are added as array entries, so read the entry whose resource you want rather than the first one.
Show child attributes
resourcestringrequiredA metered resource. Only "mobile" exists today; more are added over time, so treat an unrecognised value as a resource you do not handle rather than an error.
secondsRemainingintegerrequiredSeconds left in the current period. Negative on a paid plan means overage already used, billed on the next invoice up to overageCapUsd.
periodStartstring · date-timerequirednullableStart of the period this balance belongs to, or null when the organization has never been granted any.
periodEndstring · date-timerequirednullableEnd of the period this balance belongs to, or null when the organization has never been granted any.
Was this page helpful?