增值税发票批量查验接口:告别手动查验

2025-07-29

数脉API

增值税发票批量查验接口:告别手动查验

增值税发票最简单、可靠的方式莫过于通过国家税务总局全国增值税发票查验平台。但发票查验作为税务管理流程中至关重要的环节,通过手动录入、一张张查验的方式,查验效率难以满足企业匹配查验增值税发票的需求。为此,数脉API提供增值税发票OCR识别接口+增值税发票查验接口方案,凭借业界领先的算法模型,准确识别增值税发票信息,批量核验发票真伪,为企业接近发票批量查验难题。

 

增值税发票OCR识别接口

原理:基于业界领先的算法模型,增值税发票OCR识别接口可精准识别电子发票/纸质发票中的发票关键信息,返回包括发票代码、开票日期、收款人、购买方信息、合计税额、合计金额等信息。无需手动录入,快速识别发票信息,较手动录入发票信息效率提升90%。

 

价格:5次免费测试调用,低至0.05元/次。

 

示例代码(python):

#!/usr/bin/python

# -*- coding: utf-8 -*-

import requests

import time

import hashlib

 

url = "https://api.shumaidata.com/v2/vat/invoice/ocr"

 

appid = "数脉分配给你的appid"

appsecurity = "数脉分配给你的appsecurity"

timestamp = int(time.time() * 1000)

 

newSign = "{}&{}&{}".format(appid,timestamp,appsecurity)

sign = hashlib.md5(newSign.encode("utf8")).hexdigest()

 

image = "增值税发票照片base64字符串"

params = {"image":image,"appid":appid,"timestamp":timestamp,"sign":sign}

 

headers = {'Content-Type': "application/x-www-form-urlencoded"}

 

response = requests.post(url, data = params, headers = headers)

print (response.text)

 

 

 

增值税发票查验接口

原理:通过对接税务权威数据库,增值税发票查验接口可实时核验发票真伪、状态(如作废、红冲)及全票面信息。支持所有类型增值税发票验真核验。

 

价格:3次免费测试调用,低质0.15元/次。

 

示例代码(python):

#!/usr/bin/python

# -*- coding: utf-8 -*-

import time

import hashlib

import requests

 

url = "https://api.shumaidata.com/v4/invoice/check"

 

appid = "数脉分配给你的appid"

appsecurity = "数脉分配给你的appsecurity"

timestamp = int(time.time() * 1000)

 

newSign = "{}&{}&{}".format(appid,timestamp,appsecurity)

sign = hashlib.md5(newSign.encode("utf8")).hexdigest()

 

invoiceNo = "发票号码"

invoiceDate = "开票日期"

invoiceAmt = "开票金额"

 

data = {"appid":appid,"timestamp":timestamp,"sign":sign,"invoiceNo":invoiceNo,"invoiceDate":invoiceDate,"invoiceAmt":invoiceAmt}

 

response = requests.get(url,params=data)

print (response.text)