财政票据查验服务

支持非税收入类票据、结算类票据、其他财政票据、医疗收费票据等票据的真伪查验,对接权威实时数据源,上传票据查验要素信息,即可返回票据相关信息,支持财政票据的批量查验,适用于企事业单位、医疗机构、金融机构等多种需要对财政类票据进行真伪查验的场景

购买API 票据管理系统

产品体验

剩余条数:0

请输入下列信息,或点击 上传发票图片OCR输入

* *

* *

*

开始核验...

免费试用

李经理 133 7162 1565 info@sinosecu.com.cn

离线识别SDK

支持快速集成到移动端与客户端应用中,支持Windows、Android、iOS等主流系统,无需网络,离线即可实现智能文字识别功能

私有化部署

部署至本地服务器中,在私有化环境中实现文字识别功能,保障数据私密性,支持CPU/GPU环境及国产化操作系统部署

AI硬件

提供多种业务场景的硬件设备,如扫描仪、发票管理系统、护照阅读器、车牌识别系统等,实现物联网信息的实时计算,返回文字识别与真伪核验结果

API文档

接口说明
接口地址: https://netocr.com/verapi/verFinancial.do
接口调用方法: post
接口接收参数:
序号 名称 类型 必填 说明
1 key String 用户ocrKey
2 secret String 用户ocrSecrert
3 invoiceCode String 发票代码
4 invoiceNumber String 发票号码
5 billingDate String 开票日期:YYYY-MM-DD
6 amountTax String 票面金额
7 checkCode String 校验码
8 enableDetail boolean 获取医疗票据明细 0否 1是
9 payer String 交款人姓名

(北京、山西、辽宁、大连、吉林、宁波、安徽、福建、山东、广东、海南、四川、贵州、西藏、陕西、新疆地区必传)

10 idNumber String 交款人身份证号码后六位

(山西、辽宁、湖北、海南、重庆、四川、陕西、新疆地区必传)

11 typeId Integer 财政验真:3017
接口返回值参数说明:
序号 名称 类型 说明
1 checkNum String 查验次数
2 invoiceType String 发票类型 财政医疗票据
3 supervisorAreaCode String 行政区划代码
4 administrativeDivisionName String 所属行政区名称
5 title String 发票标题
6 invoiceCode String 票据代码
7 invoiceNumber String 票据号码
8 billingDate String 开票日期
9 amountTax String 金额合计
10 amountTaxCN String 金额合计(大写)
11 checkCode String 校验码
12 purchaserName String 交款人
13 purchaserTaxNo String 交款人统一社会信用代码
14 salesName String 收款单位
15 receiverName String 收款人
16 recheckName String 复核人
17 entryTag String 入账标识 0未入账 1已入账
18 printTag String 打印标识 0未打印 1已打印
19 redTag String 冲红标识 0正常,1冲红
20 redDate String 冲红日期
21 redTime String 冲红时间
22 redReason String 冲红原因
23 financeSeal String 财政部门印章
24 financeSealNo String 财政部门印章编号
25 invoiceLists String 明细列表
26 invoiceDetails String 项目明细
27 serialNo String 项目序号
28 commodityCode String 项目编号
29 commodityName String 项目名称
30 quantity String 数量
31 unit String 单位
32 amount String 金额
33 notes String 备注
34 specificationModel String 规格标准
35 unitPrice String 单价
36 selfPayAmount String 自负金额
37 categorySelfPayAmount String 分类自负金额
38 otherInfos String 其他信息
39 fieldEn String 英文名称
40 fieldCn String 中文名称
41 fieldValue String 字段值
42 fileUrl String 发票文件链接
状态码说明:
status code message
0 查验成功发票一致(扣费)
-30000 该票今日本平台核验失败已超5次(扣费)
-30001 发票信息不一致(扣费)
-30002 所查发票不存在(扣费)
-30003 超过该张票当天查验次数(请于次日再次查验)
-30004 查询发票不规范
-30005 参数不能为空
-30008 参数长度不正确
-30010 查验异常
-30015 类型错误
-30017 传入参数不正确
-30020 查验失败
-30021 超过一年的不能查验
示例代码
  • 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("typeId","3017")
		  .addFormDataPart("invoiceCode","********")
		  .addFormDataPart("invoiceNumber","*******")
		  .addFormDataPart("billingDate","********")
		  .addFormDataPart("checkCode","*******")
		  .addFormDataPart("amountTax","*******")
		  .build();
		Request request = new Request.Builder()
		  .url("https://netocr.com/verapi/verFinancial.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/verFinancial.do"

    payload = {
    'key': 'M***********g',
    'secret': '3***********6',
    'typeId': '3017',
    'invoiceCode': '*********',
    'invoiceNumber': '*********',
    'billingDate': '********',
    'amountTax': '********',
    'checkCode': '*******',

	}
    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("typeId", "3017");
form.append("invoiceCode", "*********");
form.append("invoiceNumber", "*******");
form.append("billingDate", "******");
form.append("checkCode", "**********");
form.append("amountTax", "**********");




var settings = {
 "url": "https://netocr.com/verapi/verFinancial.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/verFinancial.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','typeId' => '3017','invoiceCode' => '*******','invoiceNumber' => '**********','billingDate' => '********','amountTax' => '*************','checkCode' => '*********'),

		));
		$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/verFinancial.do");
var content = new MultipartFormDataContent();
content.Add(new StringContent("M***********g"), "key");
content.Add(new StringContent("3***********6"), "secret");
content.Add(new StringContent("3017"), "typeId");
content.Add(new StringContent("*******"), "invoiceCode");
content.Add(new StringContent("*********"), "invoiceNumber");
content.Add(new StringContent("*********"), "billingDate");
content.Add(new StringContent("*********"), "amountTax");
content.Add(new StringContent("*********"), "checkCode");

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/v2/verInvoice.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("3017")));
    content.add(web::http::name(U("invoiceCode")), web::http::value(U("**********")));
    content.add(web::http::name(U("invoiceNumber")), web::http::value(U("************")));
    content.add(web::http::name(U("billingDate")), web::http::value(U("*************")));
    content.add(web::http::name(U("amountTax")), web::http::value(U("*************")));
    content.add(web::http::name(U("checkCode")), web::http::value(U("***********")));


    // 创建 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/verFinancial.do"
    method := "POST"

    payload := &bytes.Buffer{}
    writer := multipart.NewWriter(payload)
    _ = writer.WriteField("key", "M***********g")
    _ = writer.WriteField("secret", "3***********6")
    _ = writer.WriteField("typeId", "3017")
    _ = writer.WriteField("invoiceCode", "9********")
    _ = writer.WriteField("invoiceNumber", "*********")
    _ = writer.WriteField("billingDate", "************")
    _ = writer.WriteField("amountTax", "********")
    _ = writer.WriteField("checkCode", "**********")


    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/verFinancial.do',
   'headers': {
   },
   formData: {
     'key': 'M***********g',
     'secret': '3***********6',
     'typeId': '3017',
     'invoiceCode': '***********',
     'invoiceNumber': '************',
     'billingDate': '**************',
     'amountTax': '**************',
     'checkCode': '***********'


   }
};
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": "3017",
            "invoiceCode": "***********",
            "invoiceNumber": "**************",
            "billingDate": "************",
            "amountTax": "************",
            "checkCode": "**********",


        ]

        AF.request("https://netocr.com/verapi/verFinancial.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("invoiceCode", "3005")
                .addFormDataPart("invoiceNumber", "**************")
                .addFormDataPart("billingDate", "************")
                .addFormDataPart("totalAmount", "************")
                .addFormDataPart("checkCode", "************")
                .addFormDataPart("salesTaxNo", "*************")
                .addFormDataPart("orderNo", "************")

                .build();
        Request request = new Request.Builder()
                .url("https://netocr.com/verapi/v2/verInvoice.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介绍

交易记录

请登录后体验

确定 取消