查询
查询2.0
查询(AES)
查询2.0(AES)
查询(RSA+AES)
查询2.0(RSA+AES)
请求Header:
名称 | 值 | |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
请求参数说明:
名称 | 必填 | 类型 | 说明 | |
---|---|---|---|---|
key | 是 | string | 在个人中心->我的数据,接口名称上方查看 | |
realname | 是 | string | 姓名 | |
idcard | 是 | string | 身份证号码 | |
bankcard | 是 | string | 银行卡卡号 | |
mobile | 是 | string | 手机号码 | |
bankinfo | 否 | string | 是否返回所属银行(bank_name) 1 - 返回
其他 - 不返回 |
请求代码示例:
curl -k -i "http://v.juhe.cn/verifybankcard4/query?key=key&realname=%E6%9D%8E%E8%81%9A%E5%90%88&idcard=370121xxxxxxxx1040&bankcard=6321xxxxxxxx432&mobile=18988888888&bankinfo="
<?php
/**
* 734-查询 - 代码参考(根据实际业务情况修改)
*/
// 基本参数配置
$apiUrl = "http://v.juhe.cn/verifybankcard4/query"; // 接口请求URL
$method = "GET"; // 接口请求方式
$headers = ["Content-Type: application/x-www-form-urlencoded"]; // 接口请求header
$apiKey = "您申请的调用APIkey"; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
$requestParams = [
'key' => $apiKey,
'realname'=> '李云客',
'idcard'=> '370121xxxxxxxx1040',
'bankcard'=> '6321xxxxxxxx432',
'mobile'=> '18988888888',
'bankinfo'=> '',
];
$requestParamsStr = http_build_query($requestParams);
// 发起接口网络请求
$curl = curl_init();
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($curl, CURLOPT_URL, $apiUrl . '?' . $requestParamsStr);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_FAILONERROR, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
if (1 == strpos("$" . $apiUrl, "https://")) {
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
}
$response = curl_exec($curl);
$httpInfo = curl_getinfo($curl);
curl_close($curl);
// 解析响应结果
$responseResult = json_decode($response, true);
if ($responseResult) {
// 网络请求成功。可依据业务逻辑和接口文档说明自行处理。
var_dump($responseResult);
} else {
// 网络异常等因素,解析结果异常。可依据业务逻辑自行处理。
// var_dump($httpInfo);
var_dump("请求异常");
}
import requests
# 734-查询 - 代码参考(根据实际业务情况修改)
# 基本参数配置
apiUrl = 'http://v.juhe.cn/verifybankcard4/query' # 接口请求URL
apiKey = '您申请的调用APIkey' # 在个人中心->我的数据,接口名称上方查看
# 接口请求入参配置
requestParams = {
'key': apiKey,
'realname': '李云客',
'idcard': '370121xxxxxxxx1040',
'bankcard': '6321xxxxxxxx432',
'mobile': '18988888888',
'bankinfo': '',
}
# 发起接口网络请求
response = requests.get(apiUrl, params=requestParams)
# 解析响应结果
if response.status_code == 200:
responseResult = response.json()
# 网络请求成功。可依据业务逻辑和接口文档说明自行处理。
print(responseResult)
else:
# 网络异常等因素,解析结果异常。可依据业务逻辑自行处理。
print('请求异常')
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
)
func main() {
// 基本参数配置
apiUrl := "http://v.juhe.cn/verifybankcard4/query"
apiKey := "您申请的调用APIkey"
// 接口请求入参配置
requestParams := url.Values{}
requestParams.Set("key", apiKey)
requestParams.Set("realname", "李云客")
requestParams.Set("idcard", "370121xxxxxxxx1040")
requestParams.Set("bankcard", "6321xxxxxxxx432")
requestParams.Set("mobile", "18988888888")
requestParams.Set("bankinfo", "")
// 发起接口网络请求
resp, err := http.Get(apiUrl + "?" + requestParams.Encode())
if err != nil {
fmt.Println("网络请求异常:", err)
return
}
defer resp.Body.Close()
var responseResult map[string]interface{}
err = json.NewDecoder(resp.Body).Decode(&responseResult)
if err != nil {
fmt.Println("解析响应结果异常:", err)
return
}
fmt.Println(responseResult)
}
using System;
using System.Net;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Linq;
namespace Common_API_Test.Test_Demo
{
class Csharp_get
{
static void Main(string[] args)
{
string url = "http://v.juhe.cn/verifybankcard4/query";
string apiKey = "您申请的调用APIkey";
Dictionary<string, string> data = new Dictionary<string, string>();
data.Add("key", apiKey);
data.Add( "realname", "李云客");
data.Add( "idcard", "370121xxxxxxxx1040");
data.Add( "bankcard", "6321xxxxxxxx432");
data.Add( "mobile", "18988888888");
data.Add( "bankinfo", "");
using (WebClient client = new WebClient())
{
string fullUrl = url + "?" + string.Join("&", data.Select(x => x.Key + "=" + x.Value));
try
{
string responseContent = client.DownloadString(fullUrl);
dynamic responseData = JsonConvert.DeserializeObject(responseContent);
if (responseData != null)
{
Console.WriteLine("Return Code: " + responseData["error_code"]);
Console.WriteLine("Return Message: " + responseData["reason"]);
}
else
{
Console.WriteLine("json解析异常!");
}
}
catch (Exception)
{
Console.WriteLine("请检查其它错误");
}
}
}
}
}
const axios = require('axios'); // npm install axios
// 基本参数配置
const apiUrl = 'http://v.juhe.cn/verifybankcard4/query'; // 接口请求URL
const apiKey = '您申请的调用APIkey'; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
const requestParams = {
key: apiKey,
realname: '李云客',
idcard: '370121xxxxxxxx1040',
bankcard: '6321xxxxxxxx432',
mobile: '18988888888',
bankinfo: '',
};
// 发起接口网络请求
axios.get(apiUrl, {params: requestParams})
.then(response => {
// 解析响应结果
if (response.status === 200) {
const responseResult = response.data;
// 网络请求成功。可依据业务逻辑和接口文档说明自行处理。
console.log(responseResult);
} else {
// 网络异常等因素,解析结果异常。可依据业务逻辑自行处理。
console.log('请求异常');
}
})
.catch(error => {
// 网络请求失败,可以根据实际情况进行处理
console.log('网络请求失败:', error);
});
package cn.juhe.test;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;
public class JavaGet {
public static void main(String[] args) throws Exception {
String apiKey = "你申请的key";
String apiUrl = "http://v.juhe.cn/verifybankcard4/query";
HashMap<String, String> map = new HashMap<>();
map.put("key", apiKey);
map.put("realname", "李云客");
map.put("idcard", "370121xxxxxxxx1040");
map.put("bankcard", "6321xxxxxxxx432");
map.put("mobile", "18988888888");
map.put("bankinfo", "");
URL url = new URL(String.format("%s?%s", apiUrl, params(map)));
BufferedReader in = new BufferedReader(new InputStreamReader((url.openConnection()).getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response);
}
public static String params(Map<String, String> map) {
return map.entrySet().stream()
.map(entry -> {
try {
return entry.getKey() + "=" + URLEncoder.encode(entry.getValue(), StandardCharsets.UTF_8.toString());
} catch (Exception e) {
e.printStackTrace();
return entry.getKey() + "=" + entry.getValue();
}
})
.collect(Collectors.joining("&"));
}
}
// 基本参数配置
NSString *apiUrl = @"http://v.juhe.cn/verifybankcard4/query"; // 接口请求URL
NSString *apiKey = @"您申请的调用APIkey"; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
NSDictionary *requestParams = @{
@"key": apiKey,
@"realname": @"李云客",
@"idcard": @"370121xxxxxxxx1040",
@"bankcard": @"6321xxxxxxxx432",
@"mobile": @"18988888888",
@"bankinfo": @"",
};
// 发起接口网络请求
NSURLComponents *components = [NSURLComponents componentsWithString:apiUrl];
NSMutableArray *queryItems = [NSMutableArray array];
[requestParams enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *value, BOOL *stop) {
[queryItems addObject:[NSURLQueryItem queryItemWithName:key value:value]];
}];
components.queryItems = queryItems;
NSURL *url = components.URL;
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
// 网络请求异常处理
NSLog(@"请求异常");
} else {
NSError *jsonError;
NSDictionary *responseResult = [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonError];
if (!jsonError) {
// 网络请求成功处理
// NSLog(@"%@", [responseResult objectForKey:@"error_code"]);
NSLog(@"%@", responseResult);
} else {
// 解析结果异常处理
NSLog(@"解析结果异常");
}
}
}];
[task resume];
返回参数说明:
名称 | 类型 | 说明 | |
---|---|---|---|
error_code | int | 返回码 | |
reason | string | 返回码描述 | |
bankcard | string | 银行卡卡号 | |
realname | string | 姓名 | |
idcard | string | 身份证号码 | |
res | string | 匹配结果,1:匹配 2:不匹配 | |
jobid | string | 本次查询流水号 | |
mobile | string | 手机号码 |
JSON返回示例:JSON在线格式化工具 >
// 成功返回的JSON示例
{
"reason": "成功",
"result": {
"jobid": "JH2131191113105116991630Np", // 本次查询流水号
"realname": "****", // 姓名
"bankcard": "************", // 银行卡卡号
"idcard": "************", // 身份证号码
"mobile": "***********", // 预留手机号码
"res": "2", // 验证结果,1:匹配 2:不匹配
"message": "认证信息不匹配" // 描述
},
"error_code": 0
}
// 失败返回的JSON示例
{
"reason": "认证失败,银行卡状态异常,详情请咨询您的发卡行",
"result": {
"jobid": "JH2131210301103558285356n3" // 本次查询流水号
"error_code": 221303
}
请求Header:
名称 | 值 | |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
请求参数说明:
名称 | 必填 | 类型 | 说明 | |
---|---|---|---|---|
key | 是 | string | 在个人中心->我的数据,接口名称上方查看 | |
realname | 是 | string | 姓名 | |
idcard | 是 | string | 证件号码 | |
bankcard | 是 | string | 银行卡卡号 | |
mobile | 是 | string | 手机号码 | |
idtype | 否 | string | 证件类型。默认:01 01 身份证
02 护照 03 港澳证(内地居民来往港澳通行证) 04 台胞证 11 回乡证(港澳居民来往内地通行证) 18 台湾居民居住证 19 港澳居民居住证 20 外国护照 |
|
code | 否 | string | 发起交易商户业务编码,如:01 01 直销银行
02 消费金融 03 银行二三类账户开 04 征信 05 保险 06 基金 07 证券 08 租赁 09 海关申报 99 其他 |
|
customer | 否 | string | 公司名+产品名称+具体使用该服务的步骤。
如:**有限公司+**APP/**产品+注册开户
|
请求代码示例:
curl -k -i "http://v.juhe.cn/verifybankcard4/query_v2?key=key&realname=%E6%9D%8E%E8%81%9A%E5%90%88&idcard=370121xxxxxxxx1040&bankcard=6321xxxxxxxx432&mobile=18988888888&idtype=&code=&customer="
<?php
/**
* 1237-查询2.0 - 代码参考(根据实际业务情况修改)
*/
// 基本参数配置
$apiUrl = "http://v.juhe.cn/verifybankcard4/query_v2"; // 接口请求URL
$method = "GET"; // 接口请求方式
$headers = ["Content-Type: application/x-www-form-urlencoded"]; // 接口请求header
$apiKey = "您申请的调用APIkey"; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
$requestParams = [
'key' => $apiKey,
'realname'=> '李云客',
'idcard'=> '370121xxxxxxxx1040',
'bankcard'=> '6321xxxxxxxx432',
'mobile'=> '18988888888',
'idtype'=> '',
'code'=> '',
'customer'=> '',
];
$requestParamsStr = http_build_query($requestParams);
// 发起接口网络请求
$curl = curl_init();
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($curl, CURLOPT_URL, $apiUrl . '?' . $requestParamsStr);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_FAILONERROR, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
if (1 == strpos("$" . $apiUrl, "https://")) {
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
}
$response = curl_exec($curl);
$httpInfo = curl_getinfo($curl);
curl_close($curl);
// 解析响应结果
$responseResult = json_decode($response, true);
if ($responseResult) {
// 网络请求成功。可依据业务逻辑和接口文档说明自行处理。
var_dump($responseResult);
} else {
// 网络异常等因素,解析结果异常。可依据业务逻辑自行处理。
// var_dump($httpInfo);
var_dump("请求异常");
}
import requests
# 1237-查询2.0 - 代码参考(根据实际业务情况修改)
# 基本参数配置
apiUrl = 'http://v.juhe.cn/verifybankcard4/query_v2' # 接口请求URL
apiKey = '您申请的调用APIkey' # 在个人中心->我的数据,接口名称上方查看
# 接口请求入参配置
requestParams = {
'key': apiKey,
'realname': '李云客',
'idcard': '370121xxxxxxxx1040',
'bankcard': '6321xxxxxxxx432',
'mobile': '18988888888',
'idtype': '',
'code': '',
'customer': '',
}
# 发起接口网络请求
response = requests.get(apiUrl, params=requestParams)
# 解析响应结果
if response.status_code == 200:
responseResult = response.json()
# 网络请求成功。可依据业务逻辑和接口文档说明自行处理。
print(responseResult)
else:
# 网络异常等因素,解析结果异常。可依据业务逻辑自行处理。
print('请求异常')
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
)
func main() {
// 基本参数配置
apiUrl := "http://v.juhe.cn/verifybankcard4/query_v2"
apiKey := "您申请的调用APIkey"
// 接口请求入参配置
requestParams := url.Values{}
requestParams.Set("key", apiKey)
requestParams.Set("realname", "李云客")
requestParams.Set("idcard", "370121xxxxxxxx1040")
requestParams.Set("bankcard", "6321xxxxxxxx432")
requestParams.Set("mobile", "18988888888")
requestParams.Set("idtype", "")
requestParams.Set("code", "")
requestParams.Set("customer", "")
// 发起接口网络请求
resp, err := http.Get(apiUrl + "?" + requestParams.Encode())
if err != nil {
fmt.Println("网络请求异常:", err)
return
}
defer resp.Body.Close()
var responseResult map[string]interface{}
err = json.NewDecoder(resp.Body).Decode(&responseResult)
if err != nil {
fmt.Println("解析响应结果异常:", err)
return
}
fmt.Println(responseResult)
}
using System;
using System.Net;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Linq;
namespace Common_API_Test.Test_Demo
{
class Csharp_get
{
static void Main(string[] args)
{
string url = "http://v.juhe.cn/verifybankcard4/query_v2";
string apiKey = "您申请的调用APIkey";
Dictionary<string, string> data = new Dictionary<string, string>();
data.Add("key", apiKey);
data.Add( "realname", "李云客");
data.Add( "idcard", "370121xxxxxxxx1040");
data.Add( "bankcard", "6321xxxxxxxx432");
data.Add( "mobile", "18988888888");
data.Add( "idtype", "");
data.Add( "code", "");
data.Add( "customer", "");
using (WebClient client = new WebClient())
{
string fullUrl = url + "?" + string.Join("&", data.Select(x => x.Key + "=" + x.Value));
try
{
string responseContent = client.DownloadString(fullUrl);
dynamic responseData = JsonConvert.DeserializeObject(responseContent);
if (responseData != null)
{
Console.WriteLine("Return Code: " + responseData["error_code"]);
Console.WriteLine("Return Message: " + responseData["reason"]);
}
else
{
Console.WriteLine("json解析异常!");
}
}
catch (Exception)
{
Console.WriteLine("请检查其它错误");
}
}
}
}
}
const axios = require('axios'); // npm install axios
// 基本参数配置
const apiUrl = 'http://v.juhe.cn/verifybankcard4/query_v2'; // 接口请求URL
const apiKey = '您申请的调用APIkey'; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
const requestParams = {
key: apiKey,
realname: '李云客',
idcard: '370121xxxxxxxx1040',
bankcard: '6321xxxxxxxx432',
mobile: '18988888888',
idtype: '',
code: '',
customer: '',
};
// 发起接口网络请求
axios.get(apiUrl, {params: requestParams})
.then(response => {
// 解析响应结果
if (response.status === 200) {
const responseResult = response.data;
// 网络请求成功。可依据业务逻辑和接口文档说明自行处理。
console.log(responseResult);
} else {
// 网络异常等因素,解析结果异常。可依据业务逻辑自行处理。
console.log('请求异常');
}
})
.catch(error => {
// 网络请求失败,可以根据实际情况进行处理
console.log('网络请求失败:', error);
});
package cn.juhe.test;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;
public class JavaGet {
public static void main(String[] args) throws Exception {
String apiKey = "你申请的key";
String apiUrl = "http://v.juhe.cn/verifybankcard4/query_v2";
HashMap<String, String> map = new HashMap<>();
map.put("key", apiKey);
map.put("realname", "李云客");
map.put("idcard", "370121xxxxxxxx1040");
map.put("bankcard", "6321xxxxxxxx432");
map.put("mobile", "18988888888");
map.put("idtype", "");
map.put("code", "");
map.put("customer", "");
URL url = new URL(String.format("%s?%s", apiUrl, params(map)));
BufferedReader in = new BufferedReader(new InputStreamReader((url.openConnection()).getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response);
}
public static String params(Map<String, String> map) {
return map.entrySet().stream()
.map(entry -> {
try {
return entry.getKey() + "=" + URLEncoder.encode(entry.getValue(), StandardCharsets.UTF_8.toString());
} catch (Exception e) {
e.printStackTrace();
return entry.getKey() + "=" + entry.getValue();
}
})
.collect(Collectors.joining("&"));
}
}
// 基本参数配置
NSString *apiUrl = @"http://v.juhe.cn/verifybankcard4/query_v2"; // 接口请求URL
NSString *apiKey = @"您申请的调用APIkey"; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
NSDictionary *requestParams = @{
@"key": apiKey,
@"realname": @"李云客",
@"idcard": @"370121xxxxxxxx1040",
@"bankcard": @"6321xxxxxxxx432",
@"mobile": @"18988888888",
@"idtype": @"",
@"code": @"",
@"customer": @"",
};
// 发起接口网络请求
NSURLComponents *components = [NSURLComponents componentsWithString:apiUrl];
NSMutableArray *queryItems = [NSMutableArray array];
[requestParams enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *value, BOOL *stop) {
[queryItems addObject:[NSURLQueryItem queryItemWithName:key value:value]];
}];
components.queryItems = queryItems;
NSURL *url = components.URL;
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
// 网络请求异常处理
NSLog(@"请求异常");
} else {
NSError *jsonError;
NSDictionary *responseResult = [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonError];
if (!jsonError) {
// 网络请求成功处理
// NSLog(@"%@", [responseResult objectForKey:@"error_code"]);
NSLog(@"%@", responseResult);
} else {
// 解析结果异常处理
NSLog(@"解析结果异常");
}
}
}];
[task resume];
返回参数说明:
名称 | 类型 | 说明 | |
---|---|---|---|
error_code | int | 返回码 | |
reason | string | 返回码描述 | |
bankcard | string | 银行卡卡号 | |
realname | string | 姓名 | |
idcard | string | 证件号码 | |
res | string | 匹配结果,1:匹配 2:不匹配 | |
jobid | string | 本次查询流水号 | |
mobile | string | 手机号码 |
JSON返回示例:JSON在线格式化工具 >
// 成功返回的JSON示例
{
"reason": "成功",
"result": {
"jobid": "2015120913503797592", // 本次查询流水号
"realname": "***", // 姓名
"bankcard": "***************", // 银行卡卡号
"idcard": "*******************", // 身份证号码
"mobile": "********", // 预留手机号码
"res": "2", // 验证结果,1:匹配 2:不匹配
"message": "认证信息不匹配" // 描述
},
"error_code": 0
}
// 失败返回的JSON示例
{
"reason": "认证失败,银行卡状态异常,详情请咨询您的发卡行",
"result": {
"jobid": "JH2131210301103558285356n3"// 本次查询流水号
},
"error_code": 221303
}
请求Header:
名称 | 值 | |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
请求参数说明:
名称 | 必填 | 类型 | 说明 | |
---|---|---|---|---|
key | 是 | string | 在个人中心->我的数据,接口名称上方查看 | |
realname | 是 | string | 姓名加密 | |
idcard | 是 | string | 身份证号码加密 | |
bankcard | 是 | string | 银行卡卡号加密 | |
bankinfo | 否 | string | 是否返回所属银行,1返回,不传或其他不返回 | |
mobile | 是 | string | 手机号码加密 |
请求代码示例:
curl -k -i "http://v.juhe.cn/verifybankcard4/queryEncry?key=key&realname=257e5ae7xxxxxxxxx9ab8d699&idcard=c9a6bce3xxxxxxxxx9d684cbf&bankcard=ec1a982cxxxxxxxxxc357ee4d&bankinfo=&mobile=6a7cd8c0xxxxxxxxxdc4a31fa"
<?php
/**
* 1429-查询(AES) - 代码参考(根据实际业务情况修改)
*/
// 基本参数配置
$apiUrl = "http://v.juhe.cn/verifybankcard4/queryEncry"; // 接口请求URL
$method = "GET"; // 接口请求方式
$headers = ["Content-Type: application/x-www-form-urlencoded"]; // 接口请求header
$apiKey = "您申请的调用APIkey"; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
$requestParams = [
'key' => $apiKey,
'realname'=> '257e5ae7xxxxxxxxx9ab8d699',
'idcard'=> 'c9a6bce3xxxxxxxxx9d684cbf',
'bankcard'=> 'ec1a982cxxxxxxxxxc357ee4d',
'bankinfo'=> '',
'mobile'=> '6a7cd8c0xxxxxxxxxdc4a31fa',
];
$requestParamsStr = http_build_query($requestParams);
// 发起接口网络请求
$curl = curl_init();
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($curl, CURLOPT_URL, $apiUrl . '?' . $requestParamsStr);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_FAILONERROR, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
if (1 == strpos("$" . $apiUrl, "https://")) {
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
}
$response = curl_exec($curl);
$httpInfo = curl_getinfo($curl);
curl_close($curl);
// 解析响应结果
$responseResult = json_decode($response, true);
if ($responseResult) {
// 网络请求成功。可依据业务逻辑和接口文档说明自行处理。
var_dump($responseResult);
} else {
// 网络异常等因素,解析结果异常。可依据业务逻辑自行处理。
// var_dump($httpInfo);
var_dump("请求异常");
}
import requests
# 1429-查询(AES) - 代码参考(根据实际业务情况修改)
# 基本参数配置
apiUrl = 'http://v.juhe.cn/verifybankcard4/queryEncry' # 接口请求URL
apiKey = '您申请的调用APIkey' # 在个人中心->我的数据,接口名称上方查看
# 接口请求入参配置
requestParams = {
'key': apiKey,
'realname': '257e5ae7xxxxxxxxx9ab8d699',
'idcard': 'c9a6bce3xxxxxxxxx9d684cbf',
'bankcard': 'ec1a982cxxxxxxxxxc357ee4d',
'bankinfo': '',
'mobile': '6a7cd8c0xxxxxxxxxdc4a31fa',
}
# 发起接口网络请求
response = requests.get(apiUrl, params=requestParams)
# 解析响应结果
if response.status_code == 200:
responseResult = response.json()
# 网络请求成功。可依据业务逻辑和接口文档说明自行处理。
print(responseResult)
else:
# 网络异常等因素,解析结果异常。可依据业务逻辑自行处理。
print('请求异常')
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
)
func main() {
// 基本参数配置
apiUrl := "http://v.juhe.cn/verifybankcard4/queryEncry"
apiKey := "您申请的调用APIkey"
// 接口请求入参配置
requestParams := url.Values{}
requestParams.Set("key", apiKey)
requestParams.Set("realname", "257e5ae7xxxxxxxxx9ab8d699")
requestParams.Set("idcard", "c9a6bce3xxxxxxxxx9d684cbf")
requestParams.Set("bankcard", "ec1a982cxxxxxxxxxc357ee4d")
requestParams.Set("bankinfo", "")
requestParams.Set("mobile", "6a7cd8c0xxxxxxxxxdc4a31fa")
// 发起接口网络请求
resp, err := http.Get(apiUrl + "?" + requestParams.Encode())
if err != nil {
fmt.Println("网络请求异常:", err)
return
}
defer resp.Body.Close()
var responseResult map[string]interface{}
err = json.NewDecoder(resp.Body).Decode(&responseResult)
if err != nil {
fmt.Println("解析响应结果异常:", err)
return
}
fmt.Println(responseResult)
}
using System;
using System.Net;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Linq;
namespace Common_API_Test.Test_Demo
{
class Csharp_get
{
static void Main(string[] args)
{
string url = "http://v.juhe.cn/verifybankcard4/queryEncry";
string apiKey = "您申请的调用APIkey";
Dictionary<string, string> data = new Dictionary<string, string>();
data.Add("key", apiKey);
data.Add( "realname", "257e5ae7xxxxxxxxx9ab8d699");
data.Add( "idcard", "c9a6bce3xxxxxxxxx9d684cbf");
data.Add( "bankcard", "ec1a982cxxxxxxxxxc357ee4d");
data.Add( "bankinfo", "");
data.Add( "mobile", "6a7cd8c0xxxxxxxxxdc4a31fa");
using (WebClient client = new WebClient())
{
string fullUrl = url + "?" + string.Join("&", data.Select(x => x.Key + "=" + x.Value));
try
{
string responseContent = client.DownloadString(fullUrl);
dynamic responseData = JsonConvert.DeserializeObject(responseContent);
if (responseData != null)
{
Console.WriteLine("Return Code: " + responseData["error_code"]);
Console.WriteLine("Return Message: " + responseData["reason"]);
}
else
{
Console.WriteLine("json解析异常!");
}
}
catch (Exception)
{
Console.WriteLine("请检查其它错误");
}
}
}
}
}
const axios = require('axios'); // npm install axios
// 基本参数配置
const apiUrl = 'http://v.juhe.cn/verifybankcard4/queryEncry'; // 接口请求URL
const apiKey = '您申请的调用APIkey'; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
const requestParams = {
key: apiKey,
realname: '257e5ae7xxxxxxxxx9ab8d699',
idcard: 'c9a6bce3xxxxxxxxx9d684cbf',
bankcard: 'ec1a982cxxxxxxxxxc357ee4d',
bankinfo: '',
mobile: '6a7cd8c0xxxxxxxxxdc4a31fa',
};
// 发起接口网络请求
axios.get(apiUrl, {params: requestParams})
.then(response => {
// 解析响应结果
if (response.status === 200) {
const responseResult = response.data;
// 网络请求成功。可依据业务逻辑和接口文档说明自行处理。
console.log(responseResult);
} else {
// 网络异常等因素,解析结果异常。可依据业务逻辑自行处理。
console.log('请求异常');
}
})
.catch(error => {
// 网络请求失败,可以根据实际情况进行处理
console.log('网络请求失败:', error);
});
package cn.juhe.test;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;
public class JavaGet {
public static void main(String[] args) throws Exception {
String apiKey = "你申请的key";
String apiUrl = "http://v.juhe.cn/verifybankcard4/queryEncry";
HashMap<String, String> map = new HashMap<>();
map.put("key", apiKey);
map.put("realname", "257e5ae7xxxxxxxxx9ab8d699");
map.put("idcard", "c9a6bce3xxxxxxxxx9d684cbf");
map.put("bankcard", "ec1a982cxxxxxxxxxc357ee4d");
map.put("bankinfo", "");
map.put("mobile", "6a7cd8c0xxxxxxxxxdc4a31fa");
URL url = new URL(String.format("%s?%s", apiUrl, params(map)));
BufferedReader in = new BufferedReader(new InputStreamReader((url.openConnection()).getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response);
}
public static String params(Map<String, String> map) {
return map.entrySet().stream()
.map(entry -> {
try {
return entry.getKey() + "=" + URLEncoder.encode(entry.getValue(), StandardCharsets.UTF_8.toString());
} catch (Exception e) {
e.printStackTrace();
return entry.getKey() + "=" + entry.getValue();
}
})
.collect(Collectors.joining("&"));
}
}
// 基本参数配置
NSString *apiUrl = @"http://v.juhe.cn/verifybankcard4/queryEncry"; // 接口请求URL
NSString *apiKey = @"您申请的调用APIkey"; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
NSDictionary *requestParams = @{
@"key": apiKey,
@"realname": @"257e5ae7xxxxxxxxx9ab8d699",
@"idcard": @"c9a6bce3xxxxxxxxx9d684cbf",
@"bankcard": @"ec1a982cxxxxxxxxxc357ee4d",
@"bankinfo": @"",
@"mobile": @"6a7cd8c0xxxxxxxxxdc4a31fa",
};
// 发起接口网络请求
NSURLComponents *components = [NSURLComponents componentsWithString:apiUrl];
NSMutableArray *queryItems = [NSMutableArray array];
[requestParams enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *value, BOOL *stop) {
[queryItems addObject:[NSURLQueryItem queryItemWithName:key value:value]];
}];
components.queryItems = queryItems;
NSURL *url = components.URL;
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
// 网络请求异常处理
NSLog(@"请求异常");
} else {
NSError *jsonError;
NSDictionary *responseResult = [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonError];
if (!jsonError) {
// 网络请求成功处理
// NSLog(@"%@", [responseResult objectForKey:@"error_code"]);
NSLog(@"%@", responseResult);
} else {
// 解析结果异常处理
NSLog(@"解析结果异常");
}
}
}];
[task resume];
返回参数说明:
名称 | 类型 | 说明 | |
---|---|---|---|
error_code | int | 返回码 | |
reason | string | 返回码描述 | |
res | string | 匹配结果,1:匹配 2:不匹配 | |
jobid | string | 本次查询流水号 |
JSON返回示例:JSON在线格式化工具 >
加密算法:AES/ECB/PKCS5Padding,AES结果无需转小写,经过base64
加密后的数据需要urlencode传入
加密的密钥为:客户个人中心的openid经过md5后结果为小写取前16位
{
"reason": "成功",
"result": {
"jobid": "JH2131191113105116991630Np",/*本次查询流水号*/
"res": "2",/*验证结果,1:匹配 2:不匹配*/
"message": "认证信息不匹配"/*描述*/
},
"error_code": 0
}
--------------------------------失败示例-----------------------------------------------
{
"reason": "认证失败,银行卡状态异常,详情请咨询您的发卡行",
"result": {
"jobid": "JH2131210301103558285356n3"/*本次查询流水号*/
},
"error_code": 221303
}
请求Header:
名称 | 值 | |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
请求参数说明:
名称 | 必填 | 类型 | 说明 | |
---|---|---|---|---|
key | 是 | string | 在个人中心->我的数据,接口名称上方查看 | |
realname | 是 | string | 姓名加密 | |
idcard | 是 | string | 证件号码加密 | |
bankcard | 是 | string | 银行卡卡号加密 | |
mobile | 是 | string | 手机号码加密 | |
idtype | 否 | string | 证件类型,具体见JSON示例。默认:01 | |
code | 否 | string | 发起交易商户业务编码, 具体见JSON示例,如:01 | |
customer | 否 | string | 公司名+产品名称+具体使用该服务的步骤。如:**有限公司+**APP/**产品+注册开户; |
请求代码示例:
curl -k -i "http://v.juhe.cn/verifybankcard4/queryEncry_v2?key=key&realname=257e5ae7xxxxxxxxx9ab8d699&idcard=c9a6bce3xxxxxxxxx9d684cbf&bankcard=ec1a982cxxxxxxxxxc357ee4d&mobile=6a7cd8c0xxxxxxxxxdc4a31fa&idtype=&code=&customer="
<?php
/**
* 1430-查询2.0(AES) - 代码参考(根据实际业务情况修改)
*/
// 基本参数配置
$apiUrl = "http://v.juhe.cn/verifybankcard4/queryEncry_v2"; // 接口请求URL
$method = "GET"; // 接口请求方式
$headers = ["Content-Type: application/x-www-form-urlencoded"]; // 接口请求header
$apiKey = "您申请的调用APIkey"; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
$requestParams = [
'key' => $apiKey,
'realname'=> '257e5ae7xxxxxxxxx9ab8d699',
'idcard'=> 'c9a6bce3xxxxxxxxx9d684cbf',
'bankcard'=> 'ec1a982cxxxxxxxxxc357ee4d',
'mobile'=> '6a7cd8c0xxxxxxxxxdc4a31fa',
'idtype'=> '',
'code'=> '',
'customer'=> '',
];
$requestParamsStr = http_build_query($requestParams);
// 发起接口网络请求
$curl = curl_init();
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($curl, CURLOPT_URL, $apiUrl . '?' . $requestParamsStr);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_FAILONERROR, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
if (1 == strpos("$" . $apiUrl, "https://")) {
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
}
$response = curl_exec($curl);
$httpInfo = curl_getinfo($curl);
curl_close($curl);
// 解析响应结果
$responseResult = json_decode($response, true);
if ($responseResult) {
// 网络请求成功。可依据业务逻辑和接口文档说明自行处理。
var_dump($responseResult);
} else {
// 网络异常等因素,解析结果异常。可依据业务逻辑自行处理。
// var_dump($httpInfo);
var_dump("请求异常");
}
import requests
# 1430-查询2.0(AES) - 代码参考(根据实际业务情况修改)
# 基本参数配置
apiUrl = 'http://v.juhe.cn/verifybankcard4/queryEncry_v2' # 接口请求URL
apiKey = '您申请的调用APIkey' # 在个人中心->我的数据,接口名称上方查看
# 接口请求入参配置
requestParams = {
'key': apiKey,
'realname': '257e5ae7xxxxxxxxx9ab8d699',
'idcard': 'c9a6bce3xxxxxxxxx9d684cbf',
'bankcard': 'ec1a982cxxxxxxxxxc357ee4d',
'mobile': '6a7cd8c0xxxxxxxxxdc4a31fa',
'idtype': '',
'code': '',
'customer': '',
}
# 发起接口网络请求
response = requests.get(apiUrl, params=requestParams)
# 解析响应结果
if response.status_code == 200:
responseResult = response.json()
# 网络请求成功。可依据业务逻辑和接口文档说明自行处理。
print(responseResult)
else:
# 网络异常等因素,解析结果异常。可依据业务逻辑自行处理。
print('请求异常')
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
)
func main() {
// 基本参数配置
apiUrl := "http://v.juhe.cn/verifybankcard4/queryEncry_v2"
apiKey := "您申请的调用APIkey"
// 接口请求入参配置
requestParams := url.Values{}
requestParams.Set("key", apiKey)
requestParams.Set("realname", "257e5ae7xxxxxxxxx9ab8d699")
requestParams.Set("idcard", "c9a6bce3xxxxxxxxx9d684cbf")
requestParams.Set("bankcard", "ec1a982cxxxxxxxxxc357ee4d")
requestParams.Set("mobile", "6a7cd8c0xxxxxxxxxdc4a31fa")
requestParams.Set("idtype", "")
requestParams.Set("code", "")
requestParams.Set("customer", "")
// 发起接口网络请求
resp, err := http.Get(apiUrl + "?" + requestParams.Encode())
if err != nil {
fmt.Println("网络请求异常:", err)
return
}
defer resp.Body.Close()
var responseResult map[string]interface{}
err = json.NewDecoder(resp.Body).Decode(&responseResult)
if err != nil {
fmt.Println("解析响应结果异常:", err)
return
}
fmt.Println(responseResult)
}
using System;
using System.Net;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Linq;
namespace Common_API_Test.Test_Demo
{
class Csharp_get
{
static void Main(string[] args)
{
string url = "http://v.juhe.cn/verifybankcard4/queryEncry_v2";
string apiKey = "您申请的调用APIkey";
Dictionary<string, string> data = new Dictionary<string, string>();
data.Add("key", apiKey);
data.Add( "realname", "257e5ae7xxxxxxxxx9ab8d699");
data.Add( "idcard", "c9a6bce3xxxxxxxxx9d684cbf");
data.Add( "bankcard", "ec1a982cxxxxxxxxxc357ee4d");
data.Add( "mobile", "6a7cd8c0xxxxxxxxxdc4a31fa");
data.Add( "idtype", "");
data.Add( "code", "");
data.Add( "customer", "");
using (WebClient client = new WebClient())
{
string fullUrl = url + "?" + string.Join("&", data.Select(x => x.Key + "=" + x.Value));
try
{
string responseContent = client.DownloadString(fullUrl);
dynamic responseData = JsonConvert.DeserializeObject(responseContent);
if (responseData != null)
{
Console.WriteLine("Return Code: " + responseData["error_code"]);
Console.WriteLine("Return Message: " + responseData["reason"]);
}
else
{
Console.WriteLine("json解析异常!");
}
}
catch (Exception)
{
Console.WriteLine("请检查其它错误");
}
}
}
}
}
const axios = require('axios'); // npm install axios
// 基本参数配置
const apiUrl = 'http://v.juhe.cn/verifybankcard4/queryEncry_v2'; // 接口请求URL
const apiKey = '您申请的调用APIkey'; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
const requestParams = {
key: apiKey,
realname: '257e5ae7xxxxxxxxx9ab8d699',
idcard: 'c9a6bce3xxxxxxxxx9d684cbf',
bankcard: 'ec1a982cxxxxxxxxxc357ee4d',
mobile: '6a7cd8c0xxxxxxxxxdc4a31fa',
idtype: '',
code: '',
customer: '',
};
// 发起接口网络请求
axios.get(apiUrl, {params: requestParams})
.then(response => {
// 解析响应结果
if (response.status === 200) {
const responseResult = response.data;
// 网络请求成功。可依据业务逻辑和接口文档说明自行处理。
console.log(responseResult);
} else {
// 网络异常等因素,解析结果异常。可依据业务逻辑自行处理。
console.log('请求异常');
}
})
.catch(error => {
// 网络请求失败,可以根据实际情况进行处理
console.log('网络请求失败:', error);
});
package cn.juhe.test;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;
public class JavaGet {
public static void main(String[] args) throws Exception {
String apiKey = "你申请的key";
String apiUrl = "http://v.juhe.cn/verifybankcard4/queryEncry_v2";
HashMap<String, String> map = new HashMap<>();
map.put("key", apiKey);
map.put("realname", "257e5ae7xxxxxxxxx9ab8d699");
map.put("idcard", "c9a6bce3xxxxxxxxx9d684cbf");
map.put("bankcard", "ec1a982cxxxxxxxxxc357ee4d");
map.put("mobile", "6a7cd8c0xxxxxxxxxdc4a31fa");
map.put("idtype", "");
map.put("code", "");
map.put("customer", "");
URL url = new URL(String.format("%s?%s", apiUrl, params(map)));
BufferedReader in = new BufferedReader(new InputStreamReader((url.openConnection()).getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response);
}
public static String params(Map<String, String> map) {
return map.entrySet().stream()
.map(entry -> {
try {
return entry.getKey() + "=" + URLEncoder.encode(entry.getValue(), StandardCharsets.UTF_8.toString());
} catch (Exception e) {
e.printStackTrace();
return entry.getKey() + "=" + entry.getValue();
}
})
.collect(Collectors.joining("&"));
}
}
// 基本参数配置
NSString *apiUrl = @"http://v.juhe.cn/verifybankcard4/queryEncry_v2"; // 接口请求URL
NSString *apiKey = @"您申请的调用APIkey"; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
NSDictionary *requestParams = @{
@"key": apiKey,
@"realname": @"257e5ae7xxxxxxxxx9ab8d699",
@"idcard": @"c9a6bce3xxxxxxxxx9d684cbf",
@"bankcard": @"ec1a982cxxxxxxxxxc357ee4d",
@"mobile": @"6a7cd8c0xxxxxxxxxdc4a31fa",
@"idtype": @"",
@"code": @"",
@"customer": @"",
};
// 发起接口网络请求
NSURLComponents *components = [NSURLComponents componentsWithString:apiUrl];
NSMutableArray *queryItems = [NSMutableArray array];
[requestParams enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *value, BOOL *stop) {
[queryItems addObject:[NSURLQueryItem queryItemWithName:key value:value]];
}];
components.queryItems = queryItems;
NSURL *url = components.URL;
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
// 网络请求异常处理
NSLog(@"请求异常");
} else {
NSError *jsonError;
NSDictionary *responseResult = [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonError];
if (!jsonError) {
// 网络请求成功处理
// NSLog(@"%@", [responseResult objectForKey:@"error_code"]);
NSLog(@"%@", responseResult);
} else {
// 解析结果异常处理
NSLog(@"解析结果异常");
}
}
}];
[task resume];
返回参数说明:
名称 | 类型 | 说明 | |
---|---|---|---|
error_code | int | 返回码 | |
reason | string | 返回码描述 | |
res | string | 匹配结果,1:匹配 2:不匹配 | |
jobid | string | 本次查询流水号 |
JSON返回示例:JSON在线格式化工具 >
/**code 商户业务编码 | idtype 证件类型
01 直销银行 | 01 身份证
02 消费金融 | 02 护照
03 银行二三类账户开户 | 03 港澳证(内地居民来往港澳通行证)
04 征信 | 04 台胞证
05 保险 | 11 回乡证(港澳居民来往内地通行证)
06 基金 | 18 台湾居民居住证
19 港澳居民居住证
07 证券 | 20 外国护照
08 租赁 |
09 海关申报 |
99 其他 |
*/
加密算法:AES/ECB/PKCS5Padding,AES结果无需转小写,经过base64
加密后的数据需要urlencode传入
加密的密钥为:客户个人中心的openid经过md5后结果为小写取前16位
{
"reason": "成功",
"result": {
"jobid": "JH2131191113105116991630Np",/*本次查询流水号*/
"res": "2",/*验证结果,1:匹配 2:不匹配*/
"message": "认证信息不匹配"/*描述*/
},
"error_code": 0
}
--------------------------------失败示例-----------------------------------------------
{
"reason": "认证失败,银行卡状态异常,详情请咨询您的发卡行",
"result": {
"jobid": "JH2131210301103558285356n3"/*本次查询流水号*/
},
"error_code": 221303
}
请求Header:
名称 | 值 | |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
请求参数说明:
名称 | 必填 | 类型 | 说明 | |
---|---|---|---|---|
key | 是 | string | 在个人中心->我的数据,接口名称上方查看 | |
aesKey | 是 | string | RSA方式加密后的aes秘钥数组再base64(加密前必须为16位),具体加密算法见下面json示例中说明 | |
realname | 是 | string | 姓名加密 | |
idcard | 是 | string | 身份证号码加密 | |
bankcard | 是 | string | 银行卡卡号加密 | |
mobile | 是 | string | 手机号码加密 | |
bankinfo | 否 | string | 是否返回所属银行,1返回,不传或其他不返回 |
请求代码示例:
curl -k -i "http://v.juhe.cn/verifybankcard4/queryEncryInfo?key=key&aesKey=xxx&realname=257e5ae7xxxxxxxxx9ab8d699&idcard=c9a6bce3xxxxxxxxx9d684cbf&bankcard=ec1a982cxxxxxxxxxc357ee4d&mobile=6a7cd8c0xxxxxxxxxdc4a31fa&bankinfo="
<?php
/**
* 1679-查询(RSA+AES) - 代码参考(根据实际业务情况修改)
*/
// 基本参数配置
$apiUrl = "http://v.juhe.cn/verifybankcard4/queryEncryInfo"; // 接口请求URL
$method = "GET"; // 接口请求方式
$headers = ["Content-Type: application/x-www-form-urlencoded"]; // 接口请求header
$apiKey = "您申请的调用APIkey"; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
$requestParams = [
'key' => $apiKey,
'aesKey'=> 'xxx',
'realname'=> '257e5ae7xxxxxxxxx9ab8d699',
'idcard'=> 'c9a6bce3xxxxxxxxx9d684cbf',
'bankcard'=> 'ec1a982cxxxxxxxxxc357ee4d',
'mobile'=> '6a7cd8c0xxxxxxxxxdc4a31fa',
'bankinfo'=> '',
];
$requestParamsStr = http_build_query($requestParams);
// 发起接口网络请求
$curl = curl_init();
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($curl, CURLOPT_URL, $apiUrl . '?' . $requestParamsStr);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_FAILONERROR, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
if (1 == strpos("$" . $apiUrl, "https://")) {
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
}
$response = curl_exec($curl);
$httpInfo = curl_getinfo($curl);
curl_close($curl);
// 解析响应结果
$responseResult = json_decode($response, true);
if ($responseResult) {
// 网络请求成功。可依据业务逻辑和接口文档说明自行处理。
var_dump($responseResult);
} else {
// 网络异常等因素,解析结果异常。可依据业务逻辑自行处理。
// var_dump($httpInfo);
var_dump("请求异常");
}
import requests
# 1679-查询(RSA+AES) - 代码参考(根据实际业务情况修改)
# 基本参数配置
apiUrl = 'http://v.juhe.cn/verifybankcard4/queryEncryInfo' # 接口请求URL
apiKey = '您申请的调用APIkey' # 在个人中心->我的数据,接口名称上方查看
# 接口请求入参配置
requestParams = {
'key': apiKey,
'aesKey': 'xxx',
'realname': '257e5ae7xxxxxxxxx9ab8d699',
'idcard': 'c9a6bce3xxxxxxxxx9d684cbf',
'bankcard': 'ec1a982cxxxxxxxxxc357ee4d',
'mobile': '6a7cd8c0xxxxxxxxxdc4a31fa',
'bankinfo': '',
}
# 发起接口网络请求
response = requests.get(apiUrl, params=requestParams)
# 解析响应结果
if response.status_code == 200:
responseResult = response.json()
# 网络请求成功。可依据业务逻辑和接口文档说明自行处理。
print(responseResult)
else:
# 网络异常等因素,解析结果异常。可依据业务逻辑自行处理。
print('请求异常')
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
)
func main() {
// 基本参数配置
apiUrl := "http://v.juhe.cn/verifybankcard4/queryEncryInfo"
apiKey := "您申请的调用APIkey"
// 接口请求入参配置
requestParams := url.Values{}
requestParams.Set("key", apiKey)
requestParams.Set("aesKey", "xxx")
requestParams.Set("realname", "257e5ae7xxxxxxxxx9ab8d699")
requestParams.Set("idcard", "c9a6bce3xxxxxxxxx9d684cbf")
requestParams.Set("bankcard", "ec1a982cxxxxxxxxxc357ee4d")
requestParams.Set("mobile", "6a7cd8c0xxxxxxxxxdc4a31fa")
requestParams.Set("bankinfo", "")
// 发起接口网络请求
resp, err := http.Get(apiUrl + "?" + requestParams.Encode())
if err != nil {
fmt.Println("网络请求异常:", err)
return
}
defer resp.Body.Close()
var responseResult map[string]interface{}
err = json.NewDecoder(resp.Body).Decode(&responseResult)
if err != nil {
fmt.Println("解析响应结果异常:", err)
return
}
fmt.Println(responseResult)
}
using System;
using System.Net;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Linq;
namespace Common_API_Test.Test_Demo
{
class Csharp_get
{
static void Main(string[] args)
{
string url = "http://v.juhe.cn/verifybankcard4/queryEncryInfo";
string apiKey = "您申请的调用APIkey";
Dictionary<string, string> data = new Dictionary<string, string>();
data.Add("key", apiKey);
data.Add( "aesKey", "xxx");
data.Add( "realname", "257e5ae7xxxxxxxxx9ab8d699");
data.Add( "idcard", "c9a6bce3xxxxxxxxx9d684cbf");
data.Add( "bankcard", "ec1a982cxxxxxxxxxc357ee4d");
data.Add( "mobile", "6a7cd8c0xxxxxxxxxdc4a31fa");
data.Add( "bankinfo", "");
using (WebClient client = new WebClient())
{
string fullUrl = url + "?" + string.Join("&", data.Select(x => x.Key + "=" + x.Value));
try
{
string responseContent = client.DownloadString(fullUrl);
dynamic responseData = JsonConvert.DeserializeObject(responseContent);
if (responseData != null)
{
Console.WriteLine("Return Code: " + responseData["error_code"]);
Console.WriteLine("Return Message: " + responseData["reason"]);
}
else
{
Console.WriteLine("json解析异常!");
}
}
catch (Exception)
{
Console.WriteLine("请检查其它错误");
}
}
}
}
}
const axios = require('axios'); // npm install axios
// 基本参数配置
const apiUrl = 'http://v.juhe.cn/verifybankcard4/queryEncryInfo'; // 接口请求URL
const apiKey = '您申请的调用APIkey'; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
const requestParams = {
key: apiKey,
aesKey: 'xxx',
realname: '257e5ae7xxxxxxxxx9ab8d699',
idcard: 'c9a6bce3xxxxxxxxx9d684cbf',
bankcard: 'ec1a982cxxxxxxxxxc357ee4d',
mobile: '6a7cd8c0xxxxxxxxxdc4a31fa',
bankinfo: '',
};
// 发起接口网络请求
axios.get(apiUrl, {params: requestParams})
.then(response => {
// 解析响应结果
if (response.status === 200) {
const responseResult = response.data;
// 网络请求成功。可依据业务逻辑和接口文档说明自行处理。
console.log(responseResult);
} else {
// 网络异常等因素,解析结果异常。可依据业务逻辑自行处理。
console.log('请求异常');
}
})
.catch(error => {
// 网络请求失败,可以根据实际情况进行处理
console.log('网络请求失败:', error);
});
package cn.juhe.test;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;
public class JavaGet {
public static void main(String[] args) throws Exception {
String apiKey = "你申请的key";
String apiUrl = "http://v.juhe.cn/verifybankcard4/queryEncryInfo";
HashMap<String, String> map = new HashMap<>();
map.put("key", apiKey);
map.put("aesKey", "xxx");
map.put("realname", "257e5ae7xxxxxxxxx9ab8d699");
map.put("idcard", "c9a6bce3xxxxxxxxx9d684cbf");
map.put("bankcard", "ec1a982cxxxxxxxxxc357ee4d");
map.put("mobile", "6a7cd8c0xxxxxxxxxdc4a31fa");
map.put("bankinfo", "");
URL url = new URL(String.format("%s?%s", apiUrl, params(map)));
BufferedReader in = new BufferedReader(new InputStreamReader((url.openConnection()).getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response);
}
public static String params(Map<String, String> map) {
return map.entrySet().stream()
.map(entry -> {
try {
return entry.getKey() + "=" + URLEncoder.encode(entry.getValue(), StandardCharsets.UTF_8.toString());
} catch (Exception e) {
e.printStackTrace();
return entry.getKey() + "=" + entry.getValue();
}
})
.collect(Collectors.joining("&"));
}
}
// 基本参数配置
NSString *apiUrl = @"http://v.juhe.cn/verifybankcard4/queryEncryInfo"; // 接口请求URL
NSString *apiKey = @"您申请的调用APIkey"; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
NSDictionary *requestParams = @{
@"key": apiKey,
@"aesKey": @"xxx",
@"realname": @"257e5ae7xxxxxxxxx9ab8d699",
@"idcard": @"c9a6bce3xxxxxxxxx9d684cbf",
@"bankcard": @"ec1a982cxxxxxxxxxc357ee4d",
@"mobile": @"6a7cd8c0xxxxxxxxxdc4a31fa",
@"bankinfo": @"",
};
// 发起接口网络请求
NSURLComponents *components = [NSURLComponents componentsWithString:apiUrl];
NSMutableArray *queryItems = [NSMutableArray array];
[requestParams enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *value, BOOL *stop) {
[queryItems addObject:[NSURLQueryItem queryItemWithName:key value:value]];
}];
components.queryItems = queryItems;
NSURL *url = components.URL;
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
// 网络请求异常处理
NSLog(@"请求异常");
} else {
NSError *jsonError;
NSDictionary *responseResult = [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonError];
if (!jsonError) {
// 网络请求成功处理
// NSLog(@"%@", [responseResult objectForKey:@"error_code"]);
NSLog(@"%@", responseResult);
} else {
// 解析结果异常处理
NSLog(@"解析结果异常");
}
}
}];
[task resume];
返回参数说明:
名称 | 类型 | 说明 | |
---|---|---|---|
error_code | int | 返回码 | |
reason | string | 返回码描述 | |
res | string | 匹配结果,1:匹配 2:不匹配 | |
message | string | 匹配信息 | |
jobid | string | 本次查询流水号 |
其他使用说明:
JSON返回示例:JSON在线格式化工具 >
{
"reason": "成功",
"result": {
"jobid": "JH2131191113105116991630Np",/*本次查询流水号*/
"res": "2",/*验证结果,1:匹配 2:不匹配*/
"message": "认证信息不匹配"/*描述*/
},
"error_code": 0
}
--------------------------------失败示例-----------------------------------------------
{
"reason": "认证失败,银行卡状态异常,详情请咨询您的发卡行",
"result": {
"jobid": "JH2131210301103558285356n3"/*本次查询流水号*/
},
"error_code": 221303
}
请求Header:
名称 | 值 | |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
请求参数说明:
名称 | 必填 | 类型 | 说明 | |
---|---|---|---|---|
key | 是 | string | 在个人中心->我的数据,接口名称上方查看 | |
aesKey | 是 | string | RSA方式加密后的aes秘钥数组再base64(加密前必须为16位) | |
realname | 是 | string | 姓名加密 | |
idcard | 是 | string | 证件号码加密 | |
bankcard | 是 | string | 银行卡卡号加密 | |
mobile | 是 | string | 手机号码加密 | |
idtype | 否 | string | 证件类型,具体见JSON示例。默认:01 | |
code | 否 | string | 发起交易商户业务编码, 具体见JSON示例,如:01 | |
customer | 否 | string | 公司名+产品名称+具体使用该服务的步骤。如:**有限公司+**APP/**产品+注册开户; |
请求代码示例:
curl -k -i "http://v.juhe.cn/verifybankcard4/queryEncry_v2Info?key=key&aesKey=xxx&realname=257e5ae7xxxxxxxxx9ab8d699&idcard=c9a6bce3xxxxxxxxx9d684cbf&bankcard=ec1a982cxxxxxxxxxc357ee4d&mobile=6a7cd8c0xxxxxxxxxdc4a31fa&idtype=&code=&customer="
<?php
/**
* 1680-查询2.0(RSA+AES) - 代码参考(根据实际业务情况修改)
*/
// 基本参数配置
$apiUrl = "http://v.juhe.cn/verifybankcard4/queryEncry_v2Info"; // 接口请求URL
$method = "GET"; // 接口请求方式
$headers = ["Content-Type: application/x-www-form-urlencoded"]; // 接口请求header
$apiKey = "您申请的调用APIkey"; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
$requestParams = [
'key' => $apiKey,
'aesKey'=> 'xxx',
'realname'=> '257e5ae7xxxxxxxxx9ab8d699',
'idcard'=> 'c9a6bce3xxxxxxxxx9d684cbf',
'bankcard'=> 'ec1a982cxxxxxxxxxc357ee4d',
'mobile'=> '6a7cd8c0xxxxxxxxxdc4a31fa',
'idtype'=> '',
'code'=> '',
'customer'=> '',
];
$requestParamsStr = http_build_query($requestParams);
// 发起接口网络请求
$curl = curl_init();
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($curl, CURLOPT_URL, $apiUrl . '?' . $requestParamsStr);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_FAILONERROR, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
if (1 == strpos("$" . $apiUrl, "https://")) {
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
}
$response = curl_exec($curl);
$httpInfo = curl_getinfo($curl);
curl_close($curl);
// 解析响应结果
$responseResult = json_decode($response, true);
if ($responseResult) {
// 网络请求成功。可依据业务逻辑和接口文档说明自行处理。
var_dump($responseResult);
} else {
// 网络异常等因素,解析结果异常。可依据业务逻辑自行处理。
// var_dump($httpInfo);
var_dump("请求异常");
}
import requests
# 1680-查询2.0(RSA+AES) - 代码参考(根据实际业务情况修改)
# 基本参数配置
apiUrl = 'http://v.juhe.cn/verifybankcard4/queryEncry_v2Info' # 接口请求URL
apiKey = '您申请的调用APIkey' # 在个人中心->我的数据,接口名称上方查看
# 接口请求入参配置
requestParams = {
'key': apiKey,
'aesKey': 'xxx',
'realname': '257e5ae7xxxxxxxxx9ab8d699',
'idcard': 'c9a6bce3xxxxxxxxx9d684cbf',
'bankcard': 'ec1a982cxxxxxxxxxc357ee4d',
'mobile': '6a7cd8c0xxxxxxxxxdc4a31fa',
'idtype': '',
'code': '',
'customer': '',
}
# 发起接口网络请求
response = requests.get(apiUrl, params=requestParams)
# 解析响应结果
if response.status_code == 200:
responseResult = response.json()
# 网络请求成功。可依据业务逻辑和接口文档说明自行处理。
print(responseResult)
else:
# 网络异常等因素,解析结果异常。可依据业务逻辑自行处理。
print('请求异常')
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
)
func main() {
// 基本参数配置
apiUrl := "http://v.juhe.cn/verifybankcard4/queryEncry_v2Info"
apiKey := "您申请的调用APIkey"
// 接口请求入参配置
requestParams := url.Values{}
requestParams.Set("key", apiKey)
requestParams.Set("aesKey", "xxx")
requestParams.Set("realname", "257e5ae7xxxxxxxxx9ab8d699")
requestParams.Set("idcard", "c9a6bce3xxxxxxxxx9d684cbf")
requestParams.Set("bankcard", "ec1a982cxxxxxxxxxc357ee4d")
requestParams.Set("mobile", "6a7cd8c0xxxxxxxxxdc4a31fa")
requestParams.Set("idtype", "")
requestParams.Set("code", "")
requestParams.Set("customer", "")
// 发起接口网络请求
resp, err := http.Get(apiUrl + "?" + requestParams.Encode())
if err != nil {
fmt.Println("网络请求异常:", err)
return
}
defer resp.Body.Close()
var responseResult map[string]interface{}
err = json.NewDecoder(resp.Body).Decode(&responseResult)
if err != nil {
fmt.Println("解析响应结果异常:", err)
return
}
fmt.Println(responseResult)
}
using System;
using System.Net;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Linq;
namespace Common_API_Test.Test_Demo
{
class Csharp_get
{
static void Main(string[] args)
{
string url = "http://v.juhe.cn/verifybankcard4/queryEncry_v2Info";
string apiKey = "您申请的调用APIkey";
Dictionary<string, string> data = new Dictionary<string, string>();
data.Add("key", apiKey);
data.Add( "aesKey", "xxx");
data.Add( "realname", "257e5ae7xxxxxxxxx9ab8d699");
data.Add( "idcard", "c9a6bce3xxxxxxxxx9d684cbf");
data.Add( "bankcard", "ec1a982cxxxxxxxxxc357ee4d");
data.Add( "mobile", "6a7cd8c0xxxxxxxxxdc4a31fa");
data.Add( "idtype", "");
data.Add( "code", "");
data.Add( "customer", "");
using (WebClient client = new WebClient())
{
string fullUrl = url + "?" + string.Join("&", data.Select(x => x.Key + "=" + x.Value));
try
{
string responseContent = client.DownloadString(fullUrl);
dynamic responseData = JsonConvert.DeserializeObject(responseContent);
if (responseData != null)
{
Console.WriteLine("Return Code: " + responseData["error_code"]);
Console.WriteLine("Return Message: " + responseData["reason"]);
}
else
{
Console.WriteLine("json解析异常!");
}
}
catch (Exception)
{
Console.WriteLine("请检查其它错误");
}
}
}
}
}
const axios = require('axios'); // npm install axios
// 基本参数配置
const apiUrl = 'http://v.juhe.cn/verifybankcard4/queryEncry_v2Info'; // 接口请求URL
const apiKey = '您申请的调用APIkey'; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
const requestParams = {
key: apiKey,
aesKey: 'xxx',
realname: '257e5ae7xxxxxxxxx9ab8d699',
idcard: 'c9a6bce3xxxxxxxxx9d684cbf',
bankcard: 'ec1a982cxxxxxxxxxc357ee4d',
mobile: '6a7cd8c0xxxxxxxxxdc4a31fa',
idtype: '',
code: '',
customer: '',
};
// 发起接口网络请求
axios.get(apiUrl, {params: requestParams})
.then(response => {
// 解析响应结果
if (response.status === 200) {
const responseResult = response.data;
// 网络请求成功。可依据业务逻辑和接口文档说明自行处理。
console.log(responseResult);
} else {
// 网络异常等因素,解析结果异常。可依据业务逻辑自行处理。
console.log('请求异常');
}
})
.catch(error => {
// 网络请求失败,可以根据实际情况进行处理
console.log('网络请求失败:', error);
});
package cn.juhe.test;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;
public class JavaGet {
public static void main(String[] args) throws Exception {
String apiKey = "你申请的key";
String apiUrl = "http://v.juhe.cn/verifybankcard4/queryEncry_v2Info";
HashMap<String, String> map = new HashMap<>();
map.put("key", apiKey);
map.put("aesKey", "xxx");
map.put("realname", "257e5ae7xxxxxxxxx9ab8d699");
map.put("idcard", "c9a6bce3xxxxxxxxx9d684cbf");
map.put("bankcard", "ec1a982cxxxxxxxxxc357ee4d");
map.put("mobile", "6a7cd8c0xxxxxxxxxdc4a31fa");
map.put("idtype", "");
map.put("code", "");
map.put("customer", "");
URL url = new URL(String.format("%s?%s", apiUrl, params(map)));
BufferedReader in = new BufferedReader(new InputStreamReader((url.openConnection()).getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response);
}
public static String params(Map<String, String> map) {
return map.entrySet().stream()
.map(entry -> {
try {
return entry.getKey() + "=" + URLEncoder.encode(entry.getValue(), StandardCharsets.UTF_8.toString());
} catch (Exception e) {
e.printStackTrace();
return entry.getKey() + "=" + entry.getValue();
}
})
.collect(Collectors.joining("&"));
}
}
// 基本参数配置
NSString *apiUrl = @"http://v.juhe.cn/verifybankcard4/queryEncry_v2Info"; // 接口请求URL
NSString *apiKey = @"您申请的调用APIkey"; // 在个人中心->我的数据,接口名称上方查看
// 接口请求入参配置
NSDictionary *requestParams = @{
@"key": apiKey,
@"aesKey": @"xxx",
@"realname": @"257e5ae7xxxxxxxxx9ab8d699",
@"idcard": @"c9a6bce3xxxxxxxxx9d684cbf",
@"bankcard": @"ec1a982cxxxxxxxxxc357ee4d",
@"mobile": @"6a7cd8c0xxxxxxxxxdc4a31fa",
@"idtype": @"",
@"code": @"",
@"customer": @"",
};
// 发起接口网络请求
NSURLComponents *components = [NSURLComponents componentsWithString:apiUrl];
NSMutableArray *queryItems = [NSMutableArray array];
[requestParams enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *value, BOOL *stop) {
[queryItems addObject:[NSURLQueryItem queryItemWithName:key value:value]];
}];
components.queryItems = queryItems;
NSURL *url = components.URL;
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
// 网络请求异常处理
NSLog(@"请求异常");
} else {
NSError *jsonError;
NSDictionary *responseResult = [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonError];
if (!jsonError) {
// 网络请求成功处理
// NSLog(@"%@", [responseResult objectForKey:@"error_code"]);
NSLog(@"%@", responseResult);
} else {
// 解析结果异常处理
NSLog(@"解析结果异常");
}
}
}];
[task resume];
返回参数说明:
名称 | 类型 | 说明 | |
---|---|---|---|
error_code | int | 返回码 | |
reason | string | 返回码描述 | |
res | string | 匹配结果,1:匹配 2:不匹配 | |
message | string | 匹配信息 | |
jobid | string | 本次查询流水号 |
其他使用说明:
JSON返回示例:JSON在线格式化工具 >
/**code 商户业务编码 | idtype 证件类型
01 直销银行 | 01 身份证
02 消费金融 | 02 护照
03 银行二三类账户开户 | 03 港澳证(内地居民来往港澳通行证)
04 征信 | 04 台胞证
05 保险 | 11 回乡证(港澳居民来往内地通行证)
06 基金 | 18 台湾居民居住证
19 港澳居民居住证
07 证券 | 20 外国护照
08 租赁 |
09 海关申报 |
99 其他 |
*/
{
"reason": "成功",
"result": {
"jobid": "JH2131191113105116991630Np",/*本次查询流水号*/
"res": "2",/*验证结果,1:匹配 2:不匹配*/
"message": "认证信息不匹配"/*描述*/
},
"error_code": 0
}
--------------------------------失败示例-----------------------------------------------
{
"reason": "认证失败,银行卡状态异常,详情请咨询您的发卡行",
"result": {
"jobid": "JH2131210301103558285356n3"/*本次查询流水号*/
},
"error_code": 221303
}
服务级错误码参照(error_code):
错误码 | 说明 | |
---|---|---|
221301 | 数据源超时 | |
221303 | 认证失败 认证失败,请稍后重试 认证失败,该卡当日连续多次认证不通过被限制校验,次日恢复 |
|
221306 | 参数错误 参数错误:姓名格式不正确 参数错误:手机号格式不正确 参数错误:身份证格式不正确 参数错误:银行卡号格式不正确 同一银行卡请求过于频繁 |
系统级错误码参照:
错误码 | 说明 | 旧版本(resultcode) | |
---|---|---|---|
10001 | 错误的请求KEY | 101 | |
10002 | 该KEY无请求权限 | 102 | |
10003 | KEY过期 | 103 | |
10004 | 错误的OPENID | 104 | |
10005 | 应用未审核超时,请提交认证 | 105 | |
10007 | 未知的请求源 | 107 | |
10008 | 被禁止的IP | 108 | |
10009 | 被禁止的KEY | 109 | |
10011 | 当前IP请求超过限制 | 111 | |
10012 | 请求超过次数限制 | 112 | |
10013 | 测试KEY超过请求限制 | 113 | |
10014 | 系统内部异常 (调用充值类业务时,请务必联系客服或通过订单查询接口检测订单,避免造成损失) | 114 | |
10020 | 接口维护 | 120 | |
10021 | 接口停用 | 121 |
错误码格式说明(示例:200201):
2 | 002 | 01 | |
---|---|---|---|
服务级错误(1为系统级错误) | 服务模块代码(即数据ID) | 具体错误代码 |
完整示例代码分享:
语言 | 标题 | 提供者 | 时间 | |
---|---|---|---|---|
PHP | 银行卡四元素校验API接口调用示例-PHP版 | SDK社区 | 2020-11-10 14:08:59 |
常见问题:
内容 | 详细 | |
---|---|---|
常见问题: | https://www.juhe.cn/qa/index/1747702531 |
限企业实名用户使用
本接口需提供应用场景审核
个人(基础认证)实名用户无法使用