发票识别信息说明(供单据详情接口用)
业务说明 不同的发票类型其识别结果的数据结构也不相同下面罗列了下不同发票其对应的数据格式
invoiceInfo报文示例
"invoiceInfo": {
"supplierName": "杭州****有限公司",
"supplierAddress": "浙江省杭州市余杭区*****0571-263****",
"supplierAccount": "中国工商银行股份有限公司杭州分行120202********",
"totalPriceAmount": 1.83,
"supplierTaxNumber": "91330*******NB273",
"buyerName": "杭州每刻科技有限公司",
"invoiceCode": "033****0411",
"invoiceRemark": null,
"checkCode": "61095******099784640",
"taxItems": [
{
"taxRate": 0.09,
"approvedDeductionAmount": 0.17,
"approvedTaxAmount": 0.17,
"freeTax": false,
"transferOut": false,
"unTaxAmount": 1.83
}
],
"taxRate": 0,
"ticketData": null,
"buyerAccount": "",
"invoiceNumber": "618***66",
"totalPriceAndTax": 2,
"invoiceCcy": null,
"invoiceSheet": "0",
"issueDate": "2020年04月04日",
"totalTaxAmount": 0.17,
"items": [
{
"name": "*运输服务*地铁票",
"priceAmount": 1.83,
"taxRate": 0.09,
"taxAmount": 0.17,
"num": 1,
"specificationModel": "",
"unit": "",
"unitPrice": 1.834862,
"taxRateMark": null,
"taxRateMarkDesc": null
}
],
"buyerTaxNumber": "91330******927699X",
"buyerAddressPhone": ""
}
参数说明
| 参数名 | 类型 | 备注 |
|---|---|---|
| supplierName | String | 销方名称 |
| supplierAddress | String | 销方地址+电话 |
| supplierAccount | String | 销方账户(销方开户行+账户) |
| totalPriceAmount | String | 不含税金额 |
| supplierTaxNumber | String | 销方税号 |
| buyerName | String | 购方名称 |
| buyerTaxNumber | String | 购方税号 |
| invoiceCode | String | 发票代码 |
| invoiceNumber | String | 发票号码 |
| issueDate | String | 开票日期 |
| issueDateDesc | String | 开票日期格式化 |
| checkCode | String | 校验码 |
| taxItems | List | 抵扣税额合计 |
| taxRate | String | 税率 |
| ticketData | json | 发票的一些相关信息,见下表 |
| buyerAccount | String | 购方账户(购方开户行+账户) |
| totalPriceAndTax | String | 价税合计 |
| totalTaxAmount | String | 税额 |
| items | List | 货物明细 详细信息见下表 |
| buyerAddressPhone | String | 购方地址和电话 |
taxItemsDto抵扣税额合计
| 参数名 | 类型 | 备注 |
|---|---|---|
| detailAmount | BigDecimal | 明细金额(废弃) |
| taxRate | BigDecimal | 税率 |
| approvedDeductionAmount | BigDecimal | 抵扣税额 |
| approvedTaxAmount | BigDecimal | 税额 |
| transferOut | boolean | 是否转出 |
| unTaxAmount | BigDecimal | 未税金额 |
itemDto货物明细
| 参数名 | 类型 | 备注 |
|---|---|---|
| name | String | 货物名称 |
| priceAmount | BigDecimal | 金额 |
| taxRate | BigDecimal | 税率 |
| taxAmount | BigDecimal | 税额 |
| num | float | 数量 |
| specificationModel | String | 规格型号 |
| unit | String | 单位 |
| unitPrice | BigDecimal | 单价 |
| taxRateMark | String | 税率标记 |
| taxRateMarkDesc | String | 税率标记描述 |
各发票格式说明
纸质发票或电子发票:(以下发票类型ticketData信息为空)
- VAT_PAPER(增值税普通发票(纸质))
- VAT_ELECTRONIC(增值税普通发票(电子))
- SPECIAL_VAT_PAPER(增值税专用发票(纸质))
- SPECIAL_VAT_ELECTRONIC(增值税专用发票(电子))
- QUOTA_PAPER(定额发票)
- OTHER(其他发票)
- RECEIPT_PAPER(小票)
- TOLLS_VAT(增值税通行费发票)
- SHIPMENT_VAT(增值税电子普票(运输服务))
- MACHINE_PAPER(机打发票)
- VAT_PAPER_VOLUME(增值税普通发票(卷票))
- BLOCK (区块链发票)
- MACHINE_PAPER_ELECTRONIC(机打电子发票)
- MEDICAL_ELECTRONIC(财政发票-医疗(电子))
- MEDICAL_PAPER(财政发票-医疗(纸质))
- ELECTRONIC_SPECIAL_VAT_INVOICE(电子发票(增值税专用发票))
- ELECTRONIC_VAT_INVOICE(电子发票(普通发票))
- ELECTRONIC_SHIPMENT_VAT_INVOICE(电子发票(普通发票)(客运服务))
{
"supplierName": "xx销售公司(销售方名称)",
"supplierAddress": "浙江省杭州市余杭区XXXXX(销售方地址)",
"totalPriceAmount": 45.28,
"invoiceNumber": "xx34302840xx(发票号码)",
"totalPriceAndTax": 48,
"buyerName": "每刻科技(购买方名称)",
"issueDate": "2019年08月242日",
"totalTaxAmount": 2.72,
"invoiceCode": "xxx123214123xx(发票代码)",
"items": [
{
"name": "餐饮服务*拿铁",
"priceAmount": 22.64,
"taxRate": 0.06,
"taxAmount": 1.36,
"unitPrice": 22.640000,
"num": 1.000000,
"taxRateMark": ""
},
{
"name": "餐饮服务*摩卡",
"priceAmount": 22.64,
"taxRate": 0.06,
"taxAmount": 1.36,
"unitPrice": 22.640000,
"num": 1.000000
}
],
// 抵扣税额明细
"taxItems": [
{
"detailAmount" : 22.64,
"unTaxAmount":22.64,
"taxRate" : 0.06,
"approvedDeductionAmount" : 0.00,
"approvedTaxAmount" : 1.36,
"transferOut": false
}
],
"buyerTaxNumber": "TX213213214324(购买方税号)",
"checkCode": "xxx123213xx(发票验证码)"
}
PASSENGER_PAPER(客运汽车票 ) :
{
‘code’: "6300161320", //发票代码
’number‘: '15064112', //发票号码
'time': '2017年11月21日 21:53', //时间
'departureStation': '杭州', //出发车站
'arrivalStation': '金华', //达到车站
'total': '74.00', //总金额
'name': '张三', //姓名
'kind': '交通', //发票消费类型
// 抵扣税额明细
"taxItems": [
{
"detailAmount" : 22.64,
"unTaxAmount":22.58,
"taxRate" : 0.06,
"approvedDeductionAmount" : 0.00,
"approvedTaxAmount" : 1.36,
"transferOut": false
}
]
}
TRAIN_PAPER(火车票):
{
'number': 'Z125C004574', //号码
'time': '2017年11月21日 21:53', //乘车时间
'name': '张三', //乘车人姓名
"departureStation": "珠海",, //上车车站
"arrivalStation": "深圳北", //下车车站
'trainNumber': 'G7383', //车次
'seatType': '二等座', //座位类型
'total': '74.00', //总金额
'kind': '交通', //发票消费类型
// 抵扣税额明细
"taxItems": [
{
"detailAmount" : 22.64,
"unTaxAmount":22.58,
"taxRate" : 0.06,
"approvedDeductionAmount" : 0.00,
"approvedTaxAmount" : 1.36,
"transferOut": false
}
]
}
TAXI_PAPER(出租车票):
{
'code': '133011680478', //发票代码
'number': '01670989', //发票号码
'date': '2017年08月29日', //乘车日期
'getOnTime': '12:47', //上车时间
'getOutTime': '12:52', //下车时间
'mileage': '1.9', //里程
'totalPriceAmount': '11.00', //总金额
"totalPriceAndTax": "46.00",
'place': '浙江省杭州市', //发票所在地
// 抵扣税额明细
"taxItems": [
{
"detailAmount" : 22.64,
"unTaxAmount":22.64,
"taxRate" : 0.06,
"approvedDeductionAmount" : 0.00,
"approvedTaxAmount" : 1.36,
"transferOut": false
}
]
}
FLIGHT_PAPER(航空运输电子客票行程单):
{
'userName': '张三', //乘机人姓名
'identityCardNo': '256548545211254523', //身份证号
'number': '1506498784112', //电子客票号码
'checkCode': '2345', //验证码
'date': '2018年04月04日', //填开日期
'agentcode': 'XMN098,0987677', //销售单位代号
'fillUnit': '上海XXXXXX旅行社有限公司', //填开单位
'fare': '730.00', //票价
'tax': '10.00', //税费
'fuelSurcharge': '10.00', //燃油附加费
'caacDevelopmentFund': '50.00', //民航发展基金
'insurance': '10.00', //保险费
'total': '800.00', //总额
'printNumber':'29466448465', //印刷序号
'flights': [ //航班信息
{
'from': '上海', //出发站
'to': '北京', //到达站
'flight_number': 'GS7563', //航班号
'date': '2018年02月20日', //乘机日期
'time': '12:34', //乘机时间
'seat': 'N' //座位等级
},
{
'from': '北京', //出发站
'to': '伦敦', //到达站
'flight_number': 'QR890', //航班号
'date': '2018年02月21日', //乘机日期
'time': '15:06', //乘机时间
'seat': 'S' //座位等级
}
],
'kind': '交通', //发票消费类型
// 抵扣税额明细
"taxItems": [
{
"detailAmount" : 22.64,
"unTaxAmount":22.58,
"taxRate" : 0.06,
"approvedDeductionAmount" : 0.00,
"approvedTaxAmount" : 1.36,
"transferOut": false
},
{
"detailAmount" : 50,
"unTaxAmount":50,
"taxRate" : 0.00,
"approvedDeductionAmount" : 0.00,
"approvedTaxAmount" : 0.00
}
]
}
TOLLS_PAPER(通行费发票):
{
'code': '6300161320', //发票代码
'number': '15064112', //发票号码
'date': '2018年01月10日', //日期
'time': '2017年11月21日 21:53', //时间
'entrance': '4001', //入口
'exit': '6754', //出口
'totalPriceAndTax': '74.00', //总金额
'kind': '交通', //发票消费类型
// 抵扣税额明细
"taxItems": [
{
"detailAmount" : 22.64,
"unTaxAmount":22.64,
"taxRate" : 0.06,
"approvedDeductionAmount" : 0.00,
"approvedTaxAmount" : 1.36
}
]
}
SHIP_PAPER( 船票)
{
'code': '6300161320', //发票代码
'number': '15064112', //发票号码
'departureStation':'蛇口', //其实车站
'arrivalStation':'香港', //结束车站
'total': '74.00', //总金额
'name': '张三', //乘车人姓名
'time': '2017年11月21日 21:53', //时间
'date': '2018年01月10日', //日期
'currencyCode': 'CNY' //币种
}
USED_CAR_PAPER(二手车销售统一发票)
{
'code': '6300161320', //发票代码
'number': '15064112', //发票号码
'date': '2018年01月10日', //日期
'supplierName': 'xx销售公司(销售方名称)',
'supplierId': 'XX销售公司代码',
"buyerName": "每刻科技(购买方名称)",
"buyerId": "购买方代码",
'carCode':'LVSHKAXXXXX61612', //车架号/车辆识别代码
'carModel':'丰田牌CAF7150N4', // 厂牌型号
'companyName': 'xxx二手车交易管理有限公司', // 二手车市场
'companyTaxNumber': '15260000000000000G', // 二手车市场纳税人识别号
'licensePlate': '浙A88888', // 车牌号
'registrationNumber': '320027731473', // 登记证号
}
VEHICLE_PAPER(机动车销售统一发票)
{
'code': '6300161320', //发票代码
'number': '15064112', //发票号码
'date': '2018年01月10日', //日期
'supplierName': 'xx销售公司(销售方名称)',
"buyerName": "每刻科技(购买方名称)",
"buyerId": "购买方代码",
'carCode':'LVSHKAXXXXX1612', //车架号/车辆识别代码
'carModel':'丰田牌CAF7150N4', // 厂牌型号
'machineCode': '123001221606', // 机打代码
'machineNumber': '00213744', // 机打号码
'taxAuthoritiesCode': '144030613', // 主管税务机关代码
'certificateNumber': 'YE80X1001351257', // 合格证号
'total': '1000000.00', // 总金额
'taxRate': '7%', // 税率
}
SHIPMENT_VAT(增值税电子发票-运输服务)
{
"supplierName": "北京XX科技有限公司",
"supplierAddress": "北京市XXXXX楼二层208号010-62682929",
"totalPriceAmount": 245.97,
"supplierTaxNumber": "91110108MA01G0FB09",
"buyerName": "深圳市XXXX科技有限公司",
"invoiceCode": "011001900711",
"checkCode": "12785712140226992584",
"taxItems": [{
"detailAmount": 245.97,
"unTaxAmount":245.97,
"taxRate": 0.0,
"approvedDeductionAmount": 0.0,
"approvedTaxAmount": 0.0,
"transferOut": false
}],
"invoiceNumber": "11252818",
"totalPriceAndTax": 245.97,
"issueDate": "2020年08月14日",
"totalTaxAmount": 0.0,
"items": [{
"name": "*运输服务*客运服务费",
"priceAmount": 245.97,
"taxRate": 0.0,
"taxAmount": 0.0,
"unitPrice": 245.970000,
"num": 1.000000,
"taxRateMark": ""
}],
"buyerTaxNumber": "91440300MA5DN8GX7L"
}
系统生成发票
该类型发票并不是真实存在的,当财务在费用上新增税行,或者某些特殊场景下,会自动生成新的税行,该税行会使用下方的两个发票类型,存储在空发票上。
- TAX_DEDUCTION
- SYS_TAX_DEDUCTION
{
// 抵扣税额明细
"taxItems": [
{
"detailAmount" : 22.64,
"unTaxAmount":22.64,
"taxRate" : 0.06,
"approvedDeductionAmount" : 0.00,
"approvedTaxAmount" : 1.36
}
]
}
更新记录
2020-09-08:更新飞机票字段(之前返回出去的某些字段有误如:user_name)
2020-09-08:更新客运汽车票字段
2021-04-22:补充区块链发票
2021-07-29:抵扣税额明细taxItems中增加是否转出字段transferOut
2021-12-13:发票货物明细增加单价unitPrice和数量num
2022-03-24:发票货物明细增加税率标记taxRateMark
2022-04-07: 航空运输电子客票行程单新增“印刷序号”字段printNumber
2022-10-19: 新增全电发票三种发票类型(电子发票(增值税专用发票),电子发票(普通发票),电子发票(普通发票)(客运服务))
2023-02-17 抵扣税额明细新增未税金额(unTaxAmount)