Get current balance
GET /api/billing/balance
Returns the authenticated account's prepaid balance in cents and dollars, low-balance flag, and configured threshold. The route requires the billing balance authentication middleware and accepted terms.
Authenticate with an API key or a portal session token.
Responses
200 Authenticated prepaid balance and low-balance threshold.
application/json object
balance_centsinteger requiredbalance_dollarsnumber requiredis_low_balanceboolean requiredlow_balance_threshold_dollarsnumber requiredbalance_microsinteger requiredExact balance in USD micro-dollars. Existing cents fields remain for compatibility.
Generated sample
{
"balance_cents": 0,
"balance_dollars": 0,
"is_low_balance": true,
"low_balance_threshold_dollars": 0,
"balance_micros": 0
}401 Missing or invalid bearer token.
application/json object
Any keys are accepted.
403 The caller does not meet the route requirements: accepted Terms of Service and Privacy Policy.
application/json object
Any keys are accepted.
429 The request was rate limited. API-generated responses are JSON;
Response headers
Retry-Afterstring headerSeconds to wait before retrying, when provided.
X-RateLimit-Scopestring headerIdentifies the scope of the request limit, when provided.
application/json GenericError
erroranyOne of
- string
- object
Any keys are accepted.
error_codestringcodestringmessagestringdetailstringstatusanyOne of
- string
- integer
errorsobjectAny keys are accepted.
text/html string