绑卡查询
按卡号(及可选用户标识)查询已生效的支付协议。
接口说明
请求方式:【POST】/v1/protocol/bind-query
请求域名:【主域名】https://api.baofu.com
请求参数
Header 参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| Authorization | string | true | 请参考【开发指引-整体说明】生成认证信息 |
| Accept | string | true | 请设置为 application/json |
| Content-Type | string | true | 请设置为 application/json |
Body 参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| merchant_user_id | string(50) | false | 商户用户 ID;有值时与卡号组合查询有效协议 |
| bank_card_no | string(19) | true | 银行卡号(敏感字段,须数字信封加密) |
请求示例
{
"merchant_user_id": "U998877",
"bank_card_no": "6222021234567890123"
}
应答参数
200 OK
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| trade_status | string | true | 一般为 SUCCESS |
| trade_status_desc | string | true | 如「查询成功」 |
| payment_protocols | array[object] | true | 【有效协议列表】有效协议列表 |
| payment_protocols.payment_protocol_no | string | true | 支付协议号;敏感字段,响应密文须解密 |
| payment_protocols.merchant_user_id | string | true | 商户用户 ID |
| payment_protocols.bank_code | string | true | 银行编码 |
| payment_protocols.bank_name | string | true | 银行名称 |
| payment_protocols.bank_card_type | integer | true | 101 借记 / 102 贷记 |
应答示例
200 OK
{
"trade_status": "SUCCESS",
"trade_status_desc": "查询成功",
"payment_protocols": [
{
"payment_protocol_no": "20250608143022000123456789012345",
"merchant_user_id": "U998877",
"bank_code": "ICBC",
"bank_name": "中国工商银行",
"bank_card_type": 101
}
]
}
无绑卡记录:HTTP 非 200,code 为 TRADE_ERROR,message 如「无绑卡记录」。