绑卡H5收银台
申请绑卡 H5 收银台 URL,引导用户打开 cashier_url 完成绑卡;成功后经本请求 notify_url 异步通知,见 绑卡成功异步通知。
接口说明
请求方式:【POST】/v1/protocol/sign/h5-cashier
请求域名:【主域名】https://api.baofu.com
请求参数
Header 参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| Authorization | string | true | 请参考【开发指引-整体说明】生成认证信息 |
| Accept | string | true | 请设置为 application/json |
| Content-Type | string | true | 请设置为 application/json |
Body 参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| out_trade_no | string(32) | true | 商户订单号,唯一 |
| merchant_user_id | string(50) | true | 商户用户 ID |
| account_info | string | true | 账户信息;敏感字段,须数字信封加密。明文:姓名|证件号|证件类型,证件类型默认 01(身份证)。示例明文:张三|110101199001011234|01 |
| front_url | string(255) | true | 绑卡成功浏览器跳转 URL |
| front_fail_url | string(255) | true | 绑卡失败浏览器跳转 URL |
| notify_url | string(255) | true | 绑卡结果异步通知 URL |
| risk_control_info | object | false | 风控参数,键值对;按开通行业传真实交易信息 |
| bank_card_type | string | false | 101/102;银行卡类型 |
| bank_code | string(50) | false | 银行编码 |
| memo | string | false | 扩展 JSON 字符串 |
| merchant_id | string | false | 代理商被代理方商户号或统一会员编号 |
| app_id | string | false | 被代理终端号,选填;无终端号时勿传 |
请求示例
{
"out_trade_no": "MCH20260622001",
"merchant_user_id": "user_001",
"account_info": "张三|110101199001011234|01",
"front_url": "https://merchant.example.com/bind/success",
"front_fail_url": "https://merchant.example.com/bind/fail",
"notify_url": "https://merchant.example.com/notify/bind",
"risk_control_info": {
"register_time": "20260101120000",
"login_type": "MOBILE",
"device_id": "device-abc-123",
"goodsCategory": "06",
"userLoginId": "user_001",
"chPayIp": "203.0.113.10"
},
"bank_card_type": "101"
}
应答参数
200 OK
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| trade_status | string | true | 受理成功为 SUCCESS |
| trade_status_desc | string | true | 状态描述 |
| out_trade_no | string | true | 商户订单号 |
| channel_order_no | string | true | 宝付前置单号 |
| cashier_url | string | true | H5 收银台 URL |
应答示例
200 OK
{
"trade_status": "SUCCESS",
"trade_status_desc": "受理成功",
"out_trade_no": "MCH20260622001",
"channel_order_no": "20260622143022000123456789012345",
"cashier_url": "https://cashier.example.com/sign/h5?orderNo=..."
}
错误码
公共错误码
| 状态码 | 错误码 | 描述 | 解决方案 |
|---|---|---|---|
| 400 | PARAM_ERROR | 参数校验失败 | 必填参数缺失或格式不合法 |
| 401 | SIGN_ERROR | 验证不通过 | 请参阅【开发指引-整体说明】排查签名 |
| 500 | SYSTEM_ERROR | 系统异常 | 内部系统错误 |
业务错误码
| 状态码 | 错误码 | 描述 | 解决方案 |
|---|---|---|---|
| 402 | TRADE_ERROR | 业务失败 | 业务拒绝(如权限不足、产品未开通) |
| 502 | SERVICE_UNAVAILABLE | 服务暂不可用 | 绑卡通道暂不可用 |