Build Fully Digitalized E-Fapiao (全电发票) Issuance Data
Skill: Convert sale data into the fully digitalized e-fapiao payload submitted to the national e-invoice service platform
Region: China (中国) Category: E-Invoicing — 电子发票 (fapiao / 发票) Does: Takes ordinary sale data and maps it onto the fully digitalized e-fapiao (全电发票 / 数电发票) dataset issued through the national e-invoice service platform (电子发票服务平台) under Golden Tax Phase IV (金税四期), as either a special or general VAT e-fapiao (增值税专用发票 / 增值税普通发票). System: 电子发票服务平台 (national e-invoice service platform) — Golden Tax IV (金税四期), administered by the State Taxation Administration (国家税务总局 / STA)
The fully digitalized e-fapiao is portal-mediated: the issuing data is entered or pushed through the STA e-invoice service platform (web, app, or the platform's interface), and the platform assigns the 20-digit fapiao number (发票号码) and applies the electronic seal — you do not mint the legal number yourself. There is no fixed national XML/JSON schema published for general third-party use; field names below follow the platform's data model and the STA's data-format ("数据规范") documentation. Confidence is at the example level only; the platform-issued OFD/PDF/XML rendering is the authoritative artifact.
When this applies
- A taxpayer enrolled on the fully digitalized e-fapiao program issues an invoice for a sale of goods or services to a business or individual buyer.
- Replaces the legacy paper/VAT control-system fapiao (税控发票, the old 增值税发票管理系统 / 金税盘 · 税控盘 flow); the e-fapiao carries no paper "联" (copies) and no pre-printed invoice code (发票代码) — the 20-digit 发票号码 alone identifies it.
- A special VAT e-fapiao (增值税专用发票) lets a general-VAT-payer buyer deduct input VAT (进项税额); a general VAT e-fapiao (增值税普通发票) does not.
Input data required
| Input | Field (platform data model) |
|---|---|
| Invoice type: special / general (专用 / 普通) | 发票种类 |
| Seller name + Unified Social Credit Code (统一社会信用代码 / 纳税人识别号) | 销售方名称 / 销售方纳税人识别号 |
| Buyer name + tax ID (for 专票, the 统一社会信用代码 is mandatory) | 购买方名称 / 购买方纳税人识别号 |
| Issue date | 开票日期 |
| Line items: name (with tax-classification code 税收分类编码), spec, unit, quantity, unit price | 项目名称 / 规格型号 / 单位 / 数量 / 单价 |
| Per-line amount excl. VAT and VAT rate (13% / 9% / 6% / etc.) | 金额 / 税率 |
| Per-line VAT amount | 税额 |
| Whether amounts are tax-inclusive (含税) or tax-exclusive (不含税) | 含税标志 |
| Remarks (备注), drawer (开票人) | 备注 / 开票人 |
The platform returns the assigned 20-digit 发票号码 and a digital seal; you store these on the issued record.
Field structure (issuance record, conceptual)
e-fapiao (全电发票)
├── 发票种类 invoice type: 01 special (增值税专用发票) / 02 general (增值税普通发票)
├── 开票日期 issue date (YYYY-MM-DD)
├── 销售方 (seller) 名称 / 纳税人识别号(统一社会信用代码) / 地址电话 / 开户行账号
├── 购买方 (buyer) 名称 / 纳税人识别号 / 地址电话 / 开户行账号
├── 明细 (line items[]) 项目名称 · 税收分类编码 / 规格型号 / 单位 / 数量 / 单价 / 金额 / 税率 / 税额
├── 合计金额 total amount excl. VAT (合计金额)
├── 合计税额 total VAT (合计税额)
├── 价税合计 grand total incl. VAT (大写 + 小写)
├── 备注 remarks
└── 开票人 drawer
(platform-assigned on issuance: 20-digit 发票号码, 电子签章)
Calculation rules
- Per line: 税额 = 金额 (tax-exclusive amount) × 税率. If a line is captured tax-inclusive, derive 金额 = 含税金额 ÷ (1 + 税率), then 税额 = 含税金额 − 金额.
- 合计金额 = Σ line 金额; 合计税额 = Σ line 税额; 价税合计 = 合计金额 + 合计税额 (and must also be written in Chinese capitals, 大写).
- VAT rates by supply: 13% (general goods, most processing/repair), 9% (transport, postal, construction, real estate, agricultural products, some basic services), 6% (modern/financial services, R&D, IT). Small-scale taxpayers use the levy rate (征收率, e.g. 3% / 1%) instead of these rates.
- Only a special VAT e-fapiao issued to a buyer's correct 纳税人识别号 supports the buyer's input-VAT (进项税额) deduction.
Worked example (general structure of the issued e-fapiao)
发票种类: 增值税专用发票 (special VAT e-fapiao)
发票号码: 24312000000012345678 ← 20-digit, platform-assigned
开票日期: 2026-05-18
销售方 名称: 上海示例科技有限公司
纳税人识别号(统一社会信用代码): 91310115MA1K3XYZ7A
购买方 名称: 北京采购贸易有限公司
纳税人识别号(统一社会信用代码): 91110108MA00ABCD1B
明细:
项目名称 税收分类编码 数量 单价 金额 税率 税额
*信息技术服务*软件开发 3040201010000000000 1 100000.00 100000.00 6% 6000.00
合计金额(不含税): 100000.00
合计税额: 6000.00
价税合计(小写): ¥106000.00
价税合计(大写): 壹拾万陆仟元整
备注: 合同号 HT-2026-0518
开票人: 张伟
The seller submits these data through the 电子发票服务平台; the platform issues the e-fapiao (OFD/PDF/XML) bearing the 发票号码 and electronic seal.
Validation checklist
- Correct invoice type chosen (增值税专用发票 vs 增值税普通发票); 专票 only where the buyer can/should deduct input VAT
- Seller 统一社会信用代码 / 纳税人识别号 valid; buyer 纳税人识别号 present and correct (mandatory for 专票)
- Each line has a valid tax-classification code (税收分类编码), unit, quantity, unit price, 金额, 税率, 税额
- VAT rate matches the supply type (13% / 9% / 6%, or small-scale 征收率); 税额 = 金额 × 税率 per line
- 合计金额 + 合计税额 = 价税合计; 大写 amount matches the 小写 amount
- Issued via the 电子发票服务平台; the platform-assigned 20-digit 发票号码 and electronic seal are stored on the record
- Issuing credit / red-letter (红字) reversal handled through the platform, not by editing an issued e-fapiao
Last updated: 2026-06-04 — confirm the active schema version, field codes, and portal/API requirements against the current State Taxation Administration (STA) specifications before use.