查询充值选项¶
查询账户适用的支付币种、充值渠道和充值档位。
GET https://billing.moi.matrixorigin.cn/api/v1/billing/accounts/$ACCOUNT_ID/recharge-options
调用前准备¶
请求示例¶
将示例中的 $MOI_PERSONAL_ACCESS_TOKEN 和 $ACCOUNT_ID 分别替换为个人访问令牌和所选账户的 ID。
curl -X GET \
"https://billing.moi.matrixorigin.cn/api/v1/billing/accounts/$ACCOUNT_ID/recharge-options" \
-H "X-API-Key: $MOI_PERSONAL_ACCESS_TOKEN"
路径参数¶
参数 |
类型 |
是否必填 |
说明 |
|---|---|---|---|
|
string |
是 |
目标账户的 ID,取自“查询当前账户”响应中的 |
成功响应¶
请求成功时返回 HTTP 200 和可用的充值渠道和充值档位。
{
"region": "cn",
"currency": "CNY",
"exchange_rate": "100.000000000000",
"channels": [
{
"channel": "alipay",
"enabled": true,
"min_pay_amount": "1.00",
"max_pay_amount": "5000.00",
"requires_manual_review": false
}
],
"tiers": [
{
"pay_amount": "100.00",
"base_credit": "10000.000000000000",
"bonus_credit": "0.000000000000",
"total_credit": "10000.000000000000",
"display_label": "Example tier",
"default_selected": true
}
]
}
字段 |
类型 |
说明 |
|---|---|---|
|
string |
账户地区。 |
|
string |
支付币种。 |
|
string |
每单位支付币种兑换的基础 Credit,以十进制字符串返回。 |
|
array of object |
充值渠道及支付范围。 |
|
string |
支付渠道代码。 |
|
boolean |
该地区是否启用该渠道。 |
|
string |
最低支付金额,单位为 currency。 |
|
string |
最高支付金额,单位为 currency。 |
|
boolean |
是否要求人工审核。 |
|
array of object |
可展示的充值档位。 |
|
string |
支付金额,单位为 currency。 |
|
string |
基础 Credit。 |
|
string |
赠送 Credit。 |
|
string |
基础与赠送 Credit 的合计。 |
|
string |
档位显示文案。 |
|
boolean |
是否为默认选中的档位。 |
字段路径中的 [] 表示数组中的每一项。例如,channels[].channel 表示数组中每一项的对应字段。
错误响应¶
缺少认证信息时返回 HTTP 401,请提供有效的个人访问令牌。
{
"code": "unauthenticated",
"message": "missing bearer token",
"error": "missing bearer token"
}
字段 |
类型 |
说明 |
|---|---|---|
|
string |
错误代码。 |
|
string |
错误说明。 |
|
string |
兼容错误说明,与 message 内容相同。 |