Get the organization balance
Prepaid balance and billing setup of the organization. Poll it to alert on a balance below a threshold of your own.
Prepaid balance and billing setup of the organization. Poll it to alert on a balance below a threshold of your own.
Headers
AuthorizationRequiredBearer <SONIOX_API_KEY>Response
200
OK
available_balance_usdRequiredstringPrepaid balance left to spend.
free_balance_usdRequiredstringPart of the available balance that was granted, not paid for.
used_balance_usdRequiredstringPrepaid balance spent so far.
invoice_billing_enabledRequiredbooleanUsage is invoiced instead of drawn from the prepaid balance.
balance_exhaustedRequiredbooleanThe prepaid balance is spent and requests are refused. Always false with invoice billing.
autopay_enabledRequiredbooleanThe balance is topped up automatically below the threshold.
autopay_threshold_usdRequiredstringBalance below which a top-up is charged. Null without a billing setup.
autopay_amount_usdRequiredstringAmount of one top-up. Null without a billing setup.
has_payment_methodRequiredbooleanA payment method is on file.
has_payment_errorRequiredbooleanThe last payment attempt failed.
Errors
OK
{
"available_balance_usd": "string",
"free_balance_usd": "string",
"used_balance_usd": "string",
"invoice_billing_enabled": true,
"balance_exhausted": true,
"autopay_enabled": true,
"autopay_threshold_usd": "string",
"autopay_amount_usd": "string",
"has_payment_method": true,
"has_payment_error": true
}Unauthorized
{
"status_code": 0,
"error_type": "string",
"message": "string",
"validation_errors": [
{
"error_type": "string",
"location": "string",
"message": "string"
}
],
"request_id": "string",
"more_info": "string"
}Forbidden
{
"status_code": 0,
"error_type": "string",
"message": "string",
"validation_errors": [
{
"error_type": "string",
"location": "string",
"message": "string"
}
],
"request_id": "string",
"more_info": "string"
}Not Found
{
"status_code": 0,
"error_type": "string",
"message": "string",
"validation_errors": [
{
"error_type": "string",
"location": "string",
"message": "string"
}
],
"request_id": "string",
"more_info": "string"
}Too Many Requests
{
"status_code": 0,
"error_type": "string",
"message": "string",
"validation_errors": [
{
"error_type": "string",
"location": "string",
"message": "string"
}
],
"request_id": "string",
"more_info": "string"
}Internal Server Error
{
"status_code": 0,
"error_type": "string",
"message": "string",
"validation_errors": [
{
"error_type": "string",
"location": "string",
"message": "string"
}
],
"request_id": "string",
"more_info": "string"
}