银行卡实名认证

翔云银行卡实名认证服务接口,核查银行卡号、姓名、身份证号、手机号与权威实时数据是否一致,核验返回匹配或不匹配的结果,标准化HTTP、WebService服务接口,适用于在线支付、网络借贷、社交软件等各种需要对银行卡信息进行真伪核验的实名认证场景

购买API API文档

产品体验

剩余条数:0

• step1:请输入银行卡号或点击 上传身银行卡图片

*

• step2:请输入姓名及身份证号或点击 上传身份证图片

*

*

开始核验...

API文档

接口说明
接口地址: https://netocr.com/verapi/verbankOrd.do
接口调用方法: post
接口接收参数:
序号 名称 类型 必填 说明
1 key String 用户ocrKey
2 secret String 用户ocrSecrert
3 bankNo String 银行卡号
4 trueName String 姓名
5 idenNo String 身份证号
6 tel String 手机号
7 typeId Integer 银行卡实名认证标准版:3011
8 format String 返回格式(xml或者json),如果format为空,则默认返回xml
状态码说明:
status code message
0000 认证信息匹配
0001 认证信息不匹配
0002 参数为空或不合法
0003 获取商户信息失败
0004 获取商户费率失败
0005 获取商户可用条数失败
0006 商户资金不足
0007 商户订单号重复
0008 验证异常
0009 身份证名字转码错误
0010 银行卡格式错误或银行规则未配置复
0011 银行卡不支持
0012 未获取到可用渠道
veritem code message
00 匹配(扣费)
01 验证信息未通过(扣费)
01 银行卡状态错误(扣费)
01 密码错误(扣费)
01 无效卡号(扣费)
01 未开通此功能(扣费)
01 银行卡与证件不符(扣费)
01 银行卡与姓名不符(扣费)
01 请求要素不合法(扣费)
01 响应码设置异常(扣费)
01 不支持该银行验证(扣费)
02 请求银行超时
03 解密失败
03 核对 md5值异常
03 核对 md5值不通过
03 报文解析异常
03 请求银行超时
03 请求银行异常
03 解析银行返回报文失败
03 发送银行加密异常
03 其他错误
03 商户不存在
示例代码
  • Java
  • python
  • javascript
  • PHP
  • C#
  • C++
  • GO
  • Node.js
  • ios
  • Android

package com.test;

import okhttp3.*;
import org.json.JSONObject;
import java.io.*;
/**
 * 需要添加依赖
 * 
 * 
 *     com.squareup.okhttp3
 *     okhttp
 *     4.12.0
 * 
 */
class Sample {

	static final OkHttpClient HTTP_CLIENT = new OkHttpClient().newBuilder().build();

	public static void main(String []args) throws IOException{
		MediaType mediaType = MediaType.parse("text/plain");
		RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
		  .addFormDataPart("key","M***********g")
		  .addFormDataPart("secret","3***********6")
		  .addFormDataPart("trueName","陈**")
		  .addFormDataPart("idenNo","13***************3")
		  .addFormDataPart("typeId","3011")
		  .addFormDataPart("tel","173*******")
		  .addFormDataPart("bankNo","6235*************")
		  .addFormDataPart("format","json")
		  .build();
		Request request = new Request.Builder()
		  .url("https://netocr.com/verapi/verbankOrd.do")
		  .method("POST", body)
		  .build();
		Response response = HTTP_CLIENT.newCall(request).execute();
		System.out.println(response.body().string());
	}
}

import requests
import json

def main():

    url = "https://netocr.com/verapi/verbankOrd.do"

    payload = {
    'key': 'M***********g',
    'secret': '3***********6',
    'trueName': '陈**',
    'idenNo': '13***************3',
    'typeId': '3011',
    'tel': '173*******',
    'bankNo': '6235*************',
    'format': 'json'
	}
    files=[

    ]
	headers = {}

    response = requests.request("POST", url, headers=headers, data=payload, files=files)

    print(response.text)

	if __name__ == '__main__':
	    main()

var form = new FormData();
form.append("key", "M***********g");
form.append("secret", "3***********6");
form.append("idenNo", "13***************3");
form.append("trueName", "陈**");
form.append("typeId", "3011");
form.append("tel", "173*******");
form.append("bankNo", "6235************");
form.append("format", "json");

var settings = {
 "url": "https://netocr.com/verapi/verbankOrd.do",
 "method": "POST",
 "timeout": 0,
 "processData": false,
 "mimeType": "multipart/form-data",
 "contentType": false,
 "data": form
};

$.ajax(settings).done(function (response) {
 console.log(response);
});

<?php
class Sample {

	public function run() {
		$curl = curl_init();
		curl_setopt_array($curl, array(

			CURLOPT_URL => 'https://netocr.com/verapi/verbankOrd.do',
			CURLOPT_RETURNTRANSFER => true,
			CURLOPT_ENCODING => '',
			CURLOPT_MAXREDIRS => 10,
			CURLOPT_TIMEOUT => 0,
			CURLOPT_FOLLOWLOCATION => true,
			CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
			CURLOPT_CUSTOMREQUEST => 'POST',
			CURLOPT_POSTFIELDS => array('key' => 'M***********g','secret' => '3***********6','trueName' => '陈**','idenNo' => '13***************3','typeId' => '3011','tel' => '173*****','bankNo' => '6235************','format' => 'json'),

		));
		$response = curl_exec($curl);
        curl_close($curl);
        echo $response;
	}
}
$rtn = (new Sample())->run();
print_r($rtn);

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://netocr.com/verapi/verbankOrd.do");
var content = new MultipartFormDataContent();
content.Add(new StringContent("M***********g"), "key");
content.Add(new StringContent("3***********6"), "secret");
content.Add(new StringContent("3011"), "typeId");
content.Add(new StringContent("陈**"), "trueName");
content.Add(new StringContent("13***************3"), "idenNo");
content.Add(new StringContent("6235*************"), "bankNo");
content.Add(new StringContent("173*********"), "tel");
content.Add(new StringContent("json"), "format");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());

#include 
#include 
#include 

int main() {
    // 创建 HTTP 客户端
    web::http::client::http_client client(U("https://netocr.com/verapi/verbankOrd.do"));

    // 构建请求内容
    web::http::multipart_content content;
    content.add(web::http::name(U("key")), web::http::value(U("M***********g")));
    content.add(web::http::name(U("secret")), web::http::value(U("3***********6")));
    content.add(web::http::name(U("typeId")), web::http::value(U("3011")));
    content.add(web::http::name(U("trueName")), web::http::value(U("陈**")));
    content.add(web::http::name(U("idenNo")), web::http::value(U("13***************3")));
    content.add(web::http::name(U("tel")), web::http::value(U("173**********")));
    content.add(web::http::name(U("bankNo")), web::http::value(U("6235*************")));
    content.add(web::http::name(U("format")), web::http::value(U("json")));

    // 创建 HTTP 请求
    web::http::http_request request(web::http::methods::POST);
    request.headers().set_content_type(U("multipart/form-data; boundary=") + content.boundary());
    request.set_body(content);

    // 发送请求并获取响应
    web::http::http_response response = client.request(request).get();

    // 确保请求成功
    if (response.status_code() == web::http::status_codes::OK) {
        // 读取响应内容
        std::wstring responseString = response.extract_string().get();
        std::wcout << "Response: " << responseString << std::endl;
    } else {
        std::cerr << "Request failed with status code " << response.status_code() << std::endl;
    }
    return 0;
}

package main

import (
  "fmt"
  "bytes"
  "mime/multipart"
  "net/http"
  "io/ioutil"
)

func main() {
    url := "https://netocr.com/verapi/verbankOrd.do"
    method := "POST"

    payload := &bytes.Buffer{}
    writer := multipart.NewWriter(payload)
    _ = writer.WriteField("key", "M***********g")
    _ = writer.WriteField("secret", "3***********6")
    _ = writer.WriteField("typeId", "3011")
    _ = writer.WriteField("trueName", "陈**")
    _ = writer.WriteField("idenNo", "13***************3")
    _ = writer.WriteField("bankNo", "6235*************")
    _ = writer.WriteField("tel", "173*******")
    _ = writer.WriteField("format", "json")
    err := writer.Close()
    if err != nil {
     fmt.Println(err)
     return
    }

    client := &http.Client { }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
     fmt.Println(err)
     return
    }
    req.Header.Set("Content-Type", writer.FormDataContentType())
    res, err := client.Do(req)
    if err != nil {
     fmt.Println(err)
     return
    }
    defer res.Body.Close()

    body, err := ioutil.ReadAll(res.Body)
    if err != nil {
     fmt.Println(err)
     return
    }
    fmt.Println(string(body))
}

var request = require('request');
var options = {
   'method': 'POST',
   'url': 'https://netocr.com/verapi/verbankOrd.do',
   'headers': {
   },
   formData: {
     'key': 'M***********g',
     'secret': '3***********6',
     'typeId': '3011',
     'trueName': '陈**',
     'idenNo': '13***************3',
     'bankNo': '6235*************',
     'tel': '173*******',
     'format': 'json'
   }
};
request(options, function (error, response) {
   if (error) throw new Error(error);
   console.log(response.body);
});

import Alamofire

class Sample {

    func performNetworkRequest() {
        let parameters: [String: Any] = [
            "key": "M***********g",
            "secret": "3***********6",
            "typeId": "3011",
            "trueName": "陈**",
            "idenNo": "13***************3",
            "bankNo": "6235*************",
            "tel": "173*******",
            "format": "json"
        ]

        AF.request("https://netocr.com/verapi/verbankOrd.do", method: .post, parameters: parameters)
            .response { response in
                switch response.result {
                case .success(let responseData):
                    if let data = responseData {
                        let responseString = String(data: data, encoding: .utf8)
                        print("Response: \(responseString ?? "")")
                    }
                case .failure(let error):
                    print("Error: \(error.localizedDescription)")
                }
            }
    }
}
let sample = Sample()
sample.performNetworkRequest()
	

import android.util.Log;
import okhttp3.*;
import java.io.IOException;

public class Sample {

    private static final OkHttpClient HTTP_CLIENT = new OkHttpClient.Builder().build();

    public static void performNetworkRequest() {
        MediaType mediaType = MediaType.parse("text/plain");
        RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
                .addFormDataPart("key", "M***********g")
                .addFormDataPart("secret", "3***********6")
                .addFormDataPart("typeId", "3011")
                .addFormDataPart("trueName", "陈**")
                .addFormDataPart("idenNo", "13***************3")
                .addFormDataPart("bankNo", "6235*************")
                .addFormDataPart("tel", "173*******")
                .addFormDataPart("format", "json")
                .build();
        Request request = new Request.Builder()
                .url("https://netocr.com/verapi/verbankOrd.do")
                .method("POST", body)
                .build();

        HTTP_CLIENT.newCall(request).enqueue(new Callback() {
            @Override
            public void onFailure(Call call, IOException e) {
                Log.e("Sample", "Error: " + e.getMessage());
                // 处理请求失败情况
            }

            @Override
            public void onResponse(Call call, Response response) throws IOException {
                if (response.isSuccessful()) {
                    String responseData = response.body().string();
                    // 在这里处理响应结果
                    Log.d("Sample", "Response: " + responseData);
                } else {
                    Log.e("Sample", "Response code: " + response.code());
                    // 处理响应失败情况
                }
            }
        });
    }
}
	
查看详细API介绍

交易记录

请登录后体验

确定 取消