Files
shaguabijia-app-server/docs/api/wallet-withdraw.md
T
OuYingJun1024 18ab7eab92 docs(api): 补全福利/钱包/提现/签到/任务/省钱/看广告 21 个接口文档
按 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>
2026-05-27 17:50:01 +08:00

1.6 KiB
Raw Blame History

POST /api/v1/wallet/withdraw — 发起提现到微信零钱

所属:Wallet 组(前缀 /api/v1/wallet | 鉴权:Bearer | 限流:同 IP ≤20 次/分 | ← 返回 API 索引

入参

字段 类型 必填 说明
amount_cents int >0 提现金额(分),须落在 [min_cents, max_cents]
user_name string 实名(达额时微信商家转账要求,可空)
out_bill_no string 客户端幂等键(商户单号):同号重试不重复转账;不传则服务端生成

出参

响应 200:WithdrawResultOut

字段 类型 说明
out_bill_no string 商户提现单号(查单用)
status string pending / success / failed
wechat_state string | null 微信侧原始状态
amount_cents int 本次提现额(分)
cash_balance_cents int 提现后现金余额(分)
package_info string | null 拉起微信确认页用(WXOpenBusinessView requestMerchantTransfer
mch_id string | null 商户号
app_id string | null 微信 AppID

错误码

  • 400 金额越界 / 未绑定微信
  • 409 现金余额不足
  • 502 微信转账调用失败(余额已退回)
  • 503 微信支付未配置

说明

走微信「商家转账到零钱」V3。先扣余额建单再调微信,转账失败则退回余额。out_bill_no 幂等防止网络重试重复打款。返回的 package_info/mch_id/app_id 供 App 拉起微信确认页;确认结果由 wallet-withdraw-status 轮询。