请求头
| 请求头 | 必填 | 说明 |
|---|---|---|
Authorization | ✓ | Bearer YOUR_ACCESS_TOKEN,账号访问令牌 |
Content-Type | ✓ | application/json |
接口:POST /api/user/amount 按当前用户分组的折扣,预计算充值 amount 个额度需要实际支付的金额。用于充值页”输入额度 → 显示应付”的实时计算,不创建订单。
请求体
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
amount | integer | ✓ | 充值额度数量,须 ≥ topup/info 返回的 min_topup |
curl "https://top.qingyuntop.ai/dashboard//api/user/amount" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "amount": 100 }'Success
{
"message": "success",
"data": "95.00"
}Failed
{
"message": "error",
"data": "充值数量不能小于 1"
}| 字段 | 类型 | 说明 |
|---|---|---|
message | string | success 表示成功,error 表示失败 |
data | string | 成功时为实付金额字符串(两位小数,已含分组折扣);失败时为错误描述 |