查询银行联行号

通过 个人银行卡号 查询开户行的名称、联行号等, 不支持企业账号, 不支持信用卡。

1.请求参数:

请求URL:

POST https://kf.fw199.com/gateway/bank/card/querybycardno

参数名 类型 必须 说明
appid String 合作伙伴Id
timestamp String 必填 时间戳 请求时的时间,unixtime格式
cardno String 必填 个人银行卡号
sign String 必填 签名,对各参数使用提供的AppSecret进行签名,签名逻辑具体实现见示例代码

2. 请求示例代码(Java)

        @Test 
    public void BankQueryCardByCardNo() throws Exception {
        Map<String, String> data = new HashMap<String, String>();
        data.put("appid",  Config.AppId);
        data.put("cardno", "622848033xxxxxxxxxxx");
        Long timestamp = System.currentTimeMillis() / 1000;
        data.put("timestamp", timestamp.toString());
        data.put("sign", Utils.Sign(data,Config.AppSecret));
        // 调用服务API
        doHttpRequest(Config.BankQueryCardByCardNoUrl ,data);

    }

3. 返回结果

3.1 查询成功的示例
{
  "code": 0,
  "message": "ok",
  "data": {
    "org_code": "103333029993", //开户行联行号
    "card_type": "借记卡", // 银行卡类型
    "bank_name": "中国农业银行", // 银行名称
    "org_name": "中国农业银行股份有限公司上海分行", // 开户行名称
    "bank_card": "622848033xxxxxxxxxxx" //银行卡号,原样返回
  },
  "trace_id": ""
}
3.2 查询失败的示例
{"code":202,"message":"银行卡查询失败,缺少参数bankcard(卡号)或卡号格式错误","trace_id":""}

说明: code为0表示成功,非0为失败,message会包含失败原因。

文档更新时间: 2024-07-27 16:32   作者:admin