18ab7eab92
按 docs/api 一接口一文件约定新增:
- 钱包(11): account / coin-transactions / cash-transactions / exchange-info / exchange / bind-wechat / unbind-wechat / withdraw-info / withdraw / withdraw/status / withdraw-orders
- 签到(2): status / 执行签到
- 任务(2): list / {task_key}/claim
- 省钱(3): summary / battle / records
- 看广告发奖(3): pangle-callback(S2S验签) / reward-status / test-grant(仅联调)
- README 索引补 12–32 行 + 新增「游标分页约定」+ 修正鉴权说明 + 注明金额以分为单位
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
893 B
893 B
POST /api/v1/wallet/exchange — 金币兑现金
所属:Wallet 组(前缀
/api/v1/wallet) | 鉴权:Bearer | ← 返回 API 索引
入参
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
coin_amount |
int | ✅(>0) | 要兑换的金币数,须 ≥ min_coin 且为 step_coin 整数倍 |
出参
响应 200:ExchangeResultOut
| 字段 | 类型 | 说明 |
|---|---|---|
coin_amount |
int | 本次扣除的金币 |
cash_added_cents |
int | 本次兑入的现金(分) |
coin_balance |
int | 兑换后金币余额 |
cash_balance_cents |
int | 兑换后现金余额(分) |
错误码
400coin_amount不满足 ≥min_coin且为step_coin整数倍409金币余额不足
说明
兑换规则见 wallet-exchange-info。金币与现金的扣加在同一事务内完成。