Get billing settings¶
Read balance alerts, spending limits, and automatic recharge settings for an account.
GET https://billing.moi.matrixorigin.cn/api/v1/billing/accounts/$ACCOUNT_ID/settings
Before you begin¶
Prepare a valid personal access token for the account owner.
Call List current accounts to obtain the target account’s ID.
Request example¶
Replace $MOI_PERSONAL_ACCESS_TOKEN and $ACCOUNT_ID in the example with your personal access token and the selected account’s ID.
curl -X GET \
"https://billing.moi.matrixorigin.cn/api/v1/billing/accounts/$ACCOUNT_ID/settings" \
-H "X-API-Key: $MOI_PERSONAL_ACCESS_TOKEN"
Path parameters¶
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Target account ID from |
Successful response¶
Returns HTTP 200 with the account’s current billing settings.
{
"billing_account_id": "billing_account_example",
"balance_alert_enabled": false,
"warning_threshold_credit": "10",
"critical_threshold_credit": "5",
"monthly_spend_limit_credit": "100",
"pause_when_balance_zero": false,
"new_account_rate_limit_enabled": false,
"auto_recharge_enabled": false,
"auto_recharge_mode": "notify_only",
"auto_recharge_threshold_credit": "10",
"auto_recharge_amount": "100.00",
"auto_recharge_channel": "alipay",
"auto_recharge_cooldown_hours": 24,
"auto_recharge_monthly_limit_amount": "500.00",
"notification_channels": [
"email"
],
"settings_version": 1,
"updated_at": 1788739200
}
Field |
Type |
Description |
|---|---|---|
|
string |
Billing account ID. |
|
boolean |
Whether balance alerts are enabled. |
|
string |
Balance warning threshold in Credit. |
|
string |
Critical balance threshold in Credit. |
|
string |
Monthly spend limit in Credit. An empty string means no limit is configured. |
|
boolean |
Whether usage is paused when the balance reaches zero. |
|
boolean |
Whether new-account rate limiting is enabled. |
|
boolean |
Whether automatic recharge is enabled. |
|
string |
Automatic recharge mode. |
|
string |
Balance threshold for automatic recharge in Credit. |
|
string |
Payment amount per automatic recharge, in the account’s default payment currency. |
|
string |
Automatic recharge channel. |
|
string |
Payment authorization ID used for automatic recharge, when available. |
|
integer |
Cooldown between automatic recharges in hours. |
|
string |
Monthly automatic recharge payment limit, in the account’s default payment currency. |
|
array of string |
Notification channels. |
|
integer |
Settings version. |
|
integer |
Update time in Unix seconds. |
|
string |
User ID that last updated the settings, when available. |
Error response¶
Missing authentication returns HTTP 401; provide a valid personal access token.
{
"code": "unauthenticated",
"message": "missing bearer token",
"error": "missing bearer token"
}
Field |
Type |
Description |
|---|---|---|
|
string |
Error code. |
|
string |
Error message. |
|
string |
Compatibility error message, with the same content as message. |