一键多绑H5链接

建议超时 5000ms。幂等键:商户号 + out_trade_no。申请一键多绑 H5 页面链接;未开户返回 url 可直接跳转;已开户返回账户信息(不发起绑卡)。

接口说明

请求方式:【POST】/v1/wallet/h5/multi

请求域名:【主域名】https://api.baofu.com

请求参数

Header 参数

参数名 类型 必填 描述
Authorization string true 请参考【开发指引-整体说明】生成认证信息
Accept string true 请设置为 application/json
Content-Type string true 请设置为 application/json

Body 参数

参数名 类型 必填 描述
out_trade_no string true 商户订单号;最长 64
real_name string true 姓名;最长 128
identity_document_no string true 证件号(敏感字段,须数字信封加密);最长 64
identity_document_type string true 证件类型;最长 16;如 ID_CARD
mobile string true 手机号(敏感字段,须数字信封加密);最长 20
page_url string true 用户离开 H5 后的回跳地址;最长 256;URL
notify_url string true 绑卡/开户终态异步通知地址;最长 256;HTTPS

请求示例

{
  "out_trade_no": "MCH202505250010",
  "real_name": "张三",
  "identity_document_no": "310101199001011234",
  "identity_document_type": "ID_CARD",
  "mobile": "13800138000",
  "page_url": "https://merchant.example.com/h5/bind/return",
  "notify_url": "https://merchant.example.com/callback/wallet/bind"
}

应答参数

200 OK

参数名 类型 必填 描述
out_trade_no string true 商户订单号
trade_no string true 平台交易号;须保存用于查单(未开户)
url string true 多绑 H5 入口链接(未开户)
expire_time string true 链接过期时间,ISO 8601(未开户)
account_opened boolean true 未开户固定 false;已开户固定 true
customer_no string true 客户号(已开户)
contract_no string true 签约号(已开户)
create_time string true 开户时间,ISO 8601(已开户)

应答示例

200 OK

{
  "out_trade_no": "MCH202505250010",
  "trade_no": "4001010120250525120000000010",
  "url": "https://pay.example.com/h5/multi-bind?token=a1b2c3d4e5f6789012345678abcdef10",
  "expire_time": "2026-05-25T15:30:00+08:00",
  "account_opened": false
}

应答示例

200 OK

{
  "out_trade_no": "MCH202505250010",
  "account_opened": true,
  "customer_no": "CUS202605180001",
  "contract_no": "C20250525000001",
  "create_time": "2026-05-18T09:00:00+08:00"
}

错误码

公共错误码

状态码 错误码 描述 解决方案
401 SIGN_ERROR 验证不通过 请参阅【开发指引-整体说明】排查签名
400 PARAM_ERROR 参数错误 请根据错误提示正确传入参数
500 SYSTEM_ERROR 系统异常,请稍后重试 请稍后重试

业务错误码

状态码 错误码 描述 解决方案
非 200 INVALID_PARAMETER 参数或 Header 错误 修正后重试
非 200 TRADE_ERROR 产品未开通、链接申请失败 开通产品或换 out_trade_no
非 200 ORDER_DUPLICATED 幂等命中 换单或查绑卡结果

应答示例

失败

{
  "code": "INVALID_PARAMETER",
  "message": "交易失败"
}

应答示例

失败

{
  "code": "TRADE_ERROR",
  "message": "交易失败"
}

应答示例

失败

{
  "code": "ORDER_DUPLICATED",
  "message": "交易失败"
}

应答示例

失败

{
  "code": "SYSTEM_ERROR",
  "message": "交易失败"
}