支持非税收入类票据:非税收入通用票据、非税收入一般缴款书真伪查验,结算类票据:资金往来结算票据真伪查验,其他财政票据:公益事业捐赠票据、医疗收费票据、社会团体会费票据真伪查验,上传票据查验要素信息,即可返回票据相关信息,有助于财务管理智能化
Java财政票据查验接口代码示例:
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/v2/verFinancial.do")
.method("POST", body)
.build();
Response response = HTTP_CLIENT.newCall(request).execute();
System.out.println(response.body().string());
}
}
适用于企事业单位、医疗机构、金融机构等多种需要对财政类票据进行真伪查验的场景
企事业单位:可通过财政票据查验接口助力医保报销平台快速核验医疗票据的真伪,确保报销依据的真实性和合法性
标签:查验,addFormDataPart,接口,票据,build,new,真伪 From: https://blog.csdn.net/weixin_41711744/article/details/141609182