2.1.38银行卡信息查询-v2
接口地址:/v2/openapi/card/bank/details
请求方式:POST
请求数据类型:application/json
响应数据类型:application/json
接口描述:
此接口是2.1.7接口的升级版本
如果银行卡详情信息获取方式=1(
card_detail_obtain_way=1
),则必需使用此接口获取银行卡详情信息此接口也支持
card_detail_obtain_way=0
的情况,详情参考接口返回内容
请求示例:
{
"card_id": "00003454323400000028888",
"pub_key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC37by7wUaaPgE0ljdw3F/8OX6qzcX6rKzcmCtn2cKHbuZ+ynPGgFZX5lqlEEKdXI8sBEuqtxU+0G+eRlmTtSAqqytF0K0rM50mKGfF2hPw//Z4ajKymsRghdiUPXJ6AxN8oyY15l1uMZcD0Ru0/OQp7VdSLNtZmKDOMhm9GeodAwIDAQAB"
}
请求参数:
参数名称 | 数据类型 | 是否必须 | 参数说明 |
---|---|---|---|
card_id | string | true | 卡ID |
pub_key | string | true | 公钥(PKCS8格式);我们会把这个公钥作为RSA算法的密钥加密数据 |
响应参数:
参数名称 | 类型 | 参数说明 |
---|---|---|
code | string | 错误码 |
data | object | 银行卡信息查询返回报文 |
encoded_card_detail | string | 加密的银行卡信息;使用传来的公钥加密再转换成BASE64编码的密文。 解密后的报文: 1、当card_detail_obtain_way=1时:{"url":"https://www.test.com/card?card?8888888888888888", "password":"888888"} 2、当card_detail_obtain_way=0并且card_type=1时:{"cvv":"123","card_number":"1001022400001101","expire":"04/2025"} 3、当card_detail_obtain_way=0并且card_type=2时:{"card_number":"123456789101212"} 4、当card_detail_obtain_way=2并且card_type=1时:{"cvv":"please check in email","card_number":"1001022400001101","expire":"please check in email"} |
pub_key | string | 公钥;同入参 |
card_id | string | 卡ID;同入参 |
card_detail_obtain_way | integer | 银行卡详情信息获取方式;0:通过API接口获取,1:加密方式获取(用户打开页面输入密码查询卡号),2:通过邮件发送 |
card_type | integer | 银行卡类型;1:虚拟卡 2:实体卡 |
msg | string | 错误信息 |
响应示例:
{
"code": "00000",
"data": {
"encoded_card_detail": "ggwegWbl4cAbywMFLhMEez9Q0JJM7hIuSy9ymVtuvHzEpE6LyH1kuAwXSkQRYLP6LA5XmvaJFMzT27oDN0Xy/v8iHvjRfZ/J7ASXJLm1v5mMqoryszrdDgbKGfvdR6B6i+kRha0IDJhSa7phj6ZL/Hc/OnVMrpNHeP+zXdiyPyk=",
"pub_key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC37by7wUaaPgE0ljdw3F/8OX6qzcX6rKzcmCtn2cKHbuZ+ynPGgFZX5lqlEEKdXI8sBEuqtxU+0G+eRlmTtSAqqytF0K0rM50mKGfF2hPw//Z4ajKymsRghdiUPXJ6AxN8oyY15l1uMZcD0Ru0/OQp7VdSLNtZmKDOMhm9GeodAwIDAQAB",
"card_id": "00003454323400000028888",
"card_detail_obtain_way" : 0,
"card_type": 1
},
"msg": "ok"
}