FinchContext
Run with

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


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


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


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.