提现相关接口
发起提现
S2S POST /bp/server/user/{user_id}/withdraw/
接口功能:发起提现请求
请求头部参数 (Headers):
参考 接入 BytePower
- X-BytePower-Auth-Token:s2s 验证
请求体
content-type: "application/json"
描述:发起提现请求信息
参数类型
名字 类型 示例 是否必填 描述 cash_num float 0.1 true 提现金额 withdraw_id string XXXXXX true APP 唯一的提现 ID cuid string XXX false 可选 timezone int 28800 false 可选,时区 desc string XXXX false 提现备注,可选 app_platform string android false APP 平台,可选 start_time string 2022-06-27T02:49:31.96713Z true 提现发起时间,ISO 8601 格式 请求体示例:
json
{
"cash_num": 0.1,
"withdraw_id": "XXXXXX",
"cuid": "XXX",
"timezone": 28800,
"desc": "XXXX",
"app_platform": "android",
"start_time": "2022-06-27T02:49:31.96713Z"
}
响应
HTTP 状态码:200
描述:成功,提现请求已创建 响应示例:
js{ "withdraw": { "cash_num": 0.1, "created_time": "2022-06-27T10:49:31.967129525+08:00", "merchant_id": "1624343251",// 商户号 "platform": "jd", // 打款平台 "reason": "", "status": "WITHDRAW_START", // status 为 WITHDRAW_SUCCESS、WITHDRAW_START、WITHDRAW_FAILED。WITHDRAW_START:提现中;WITHDRAW_SUCCESS:提现成功;WITHDRAW_FAILED:提现失败 "updated_time": "2022-06-27T10:49:32.891334378+08:00", "user_id": "UUCV64TUSA7UQ", "withdraw_id": "WCW7ZLMR77VAO5", // 商家打款单号 "withdraw_time": "0001-01-01T00:00:00Z" // status 为 WITHDRAW_SUCCESS 才会有正常值,否则为默认值。时间格式均为 ISO8601 标准格式,请按此格式解析 } }
HTTP 状态码:4xx 描述:错误 响应示例:
json{ "error": { "message": "XXXXXXXX", "error_type": "XXXXX" } }
error_type:
- invalid_parameter(参数错误)
- 提现错误码分类处理
查询提现记录
S2S GET /bp/server/user/{user_id}/withdraw/
接口功能:查询提现记录,查询的 withdraw_id 支持 bp 打款接口返回的 withdraw_id 和打款时传递的 app 的 withdraw_id
请求头部参数 (Headers):
参考 接入 BytePower
- X-BytePower-Auth-Token:s2s 验证
请求体
无
响应
HTTP 状态码:200
描述:成功,返回提现记录信息 响应示例:
json{ "withdraw": { "cash_num": 0.1, "created_time": "2022-06-27T10:49:31.967129525+08:00", "merchant_id": "1624343251", "platform": "jd", "reason": "", "status": "WITHDRAW_START", "updated_time": "2022-06-27T10:49:32.891334378+08:00", "user_id": "UUCV64TUSA7UQ", "withdraw_id": "WCW7ZLMR77VAO5", "withdraw_time": "0001-01-01T00:00:00Z" } }
HTTP 状态码:4xx 描述:错误 响应示例:
json{ "error": { "message": "XXXXXXXX", "error_type": "XXXXX" } }
error_type:
- invalid_parameter(参数错误)