Skip to main content
POST
/
doc-agent
/
api
/
v1
/
capability
/
fiscal-bill
/
verify
cURL
curl --request POST \
  --url https://agents.textin.com/doc-agent/api/v1/capability/fiscal-bill/verify \
  --header 'Content-Type: application/json' \
  --header 'x-ti-app-id: <x-ti-app-id>' \
  --header 'x-ti-secret-code: <x-ti-secret-code>' \
  --data '
{
  "bill_amount": "20.00",
  "bill_code": "51060123",
  "bill_date": "20230411",
  "bill_no": "0272000001",
  "check_code": "7ffdbe",
  "id_card_last6": "083411",
  "mode": "detail",
  "payer_name": "张某某"
}
'
{
  "code": 200,
  "data": {
    "result": {
      "accounting_status": "",
      "bill_code": "51060123",
      "bill_date": "2023-04-11",
      "bill_name": "四川省医疗门诊收费票据(电子)",
      "bill_no": "0272000001",
      "bill_status": "01",
      "check_code": "7ffdbe",
      "code": 1000,
      "collector": "工行自助机",
      "file_type": "pdf",
      "file_url": "http://example.com/archive/xxxxx.pdf",
      "fiscal_seal": "",
      "fiscal_seal_no": "",
      "item_details": [
        {
          "amount": "1.0000",
          "code": "",
          "index": 1,
          "name": "●挂号费",
          "paid_amount": "",
          "paid_amount_rate": "",
          "quantity": "1.0",
          "remark": "",
          "standard": "",
          "type": "",
          "unit": "次"
        },
        {
          "amount": "19.0000",
          "code": "",
          "index": 2,
          "name": "材料费",
          "paid_amount": "",
          "paid_amount_rate": "",
          "quantity": "1.0",
          "remark": "",
          "standard": "",
          "type": "",
          "unit": "次"
        }
      ],
      "item_list": [
        {
          "amount": "1.00",
          "code": "",
          "index": 1,
          "name": "挂号费",
          "paid_amount": "",
          "paid_amount_rate": "",
          "quantity": "",
          "remark": "",
          "standard": "",
          "type": "",
          "unit": ""
        },
        {
          "amount": "19.00",
          "code": "",
          "index": 2,
          "name": "其他门急诊收费项目",
          "paid_amount": "",
          "paid_amount_rate": "",
          "quantity": "",
          "remark": "",
          "standard": "",
          "type": "",
          "unit": ""
        }
      ],
      "message": "处理成功",
      "other_info": [
        {
          "en_value": "",
          "key": "ywlsh",
          "label": "业务流水号",
          "value": "MZ20230411XXXXXXXX"
        },
        {
          "en_value": "",
          "key": "mzh",
          "label": "门诊号",
          "value": "23031500000"
        },
        {
          "en_value": "",
          "key": "jzrq",
          "label": "就诊日期",
          "value": "20230411"
        },
        {
          "en_value": "",
          "key": "yljglx",
          "label": "医疗机构类型",
          "value": "中医医院"
        },
        {
          "en_value": "",
          "key": "yblx",
          "label": "医保类型",
          "value": ""
        },
        {
          "en_value": "",
          "key": "grxjzf",
          "label": "个人现金支付",
          "value": "20.00"
        }
      ],
      "payee": "某某骨科医院",
      "payer": "张某某",
      "payer_tax_id": "513124********3411",
      "print_status": "",
      "query_count": 1,
      "remark": "",
      "reviewer": "工行自助机",
      "supplementary_info": "",
      "time": "2026-05-06 11:47:17",
      "total_amount": "20.00",
      "total_amount_cn": "贰拾元整",
      "void_date": "",
      "void_reason": "",
      "void_time": ""
    }
  },
  "message": "OK"
}

财政电子票据验真错误码

响应中 data.result.code 的含义如下:
错误码说明
1000成功
999其它错误
1001网站访问异常
1002超出该张票据最大查验次数
1003验证码错误
1006未查询到当前发票数据
1007当前地区维护中,请稍后
1008开票日期超出范围,仅可查验最近一年内开具的电子票据
1009局端请求异常
1010税局服务异常,建议 15-20 分钟后重试

Headers

x-ti-app-id
string
required
x-ti-secret-code
string
required

Body

application/json
bill_amount
string

票据金额

bill_code
string

票据代码

bill_date
string

开票日期(格式: yyyyMMdd,如 "20240226")

bill_no
string

票据号码

check_code
string

校验码

id_card_last6
string

身份证后六位(明细版中用于路由判断:传了则走地方版,部分地区票据必填)

mode
string

查验模式:

  • "national": 全国版,走财政部全国网站查验,速度快,部分票据可能无明细,仅支持开票时间在一年内的电子票据
  • "detail": 明细版,根据是否传入 id_card_last6 + payer_name 自动判断走地方版或全国明细版 默认 "national"
payer_name
string

交款人(明细版中用于路由判断:传了则走地方版,部分票据必填)

Response

200 - application/json

OK

code
integer

业务状态码

Example:

200

data
object
message
string

状态说明

Example:

"OK"