How should e-fapiao be archived for tax audit purposes?
The electronic fapiao (电子发票, diànzǐ fāpiào), commonly referred to as e-fapiao, is China’s legally recognised digital invoicing instrument mandated under the State Taxation Administration’s (STA) electronic invoice pilot programme, which has expanded to cover over 38 million registered taxpayers as of Q2 2026. Archiving e-fapiao for tax audit purposes requires strict adherence to the Cai Kuai [2020] No. 6 regulations and the Electronic Accounting Archives Management Standards (电子会计档案管理规范, diànzǐ kuàijì dàng’àn guǎnlǐ guīfàn), which mandate that original electronic invoice files — not printed paper copies — must be preserved in a compliant electronic archive for a minimum retention period of 10 years for general invoices and 30 years for special VAT invoices. This article provides a comprehensive, regulation-by-regulation guide to building a tax-audit-ready e-fapiao archiving system, covering the legal framework, technical requirements, common compliance pitfalls, and actionable next steps.
1. The legal and regulatory framework for e-fapiao archiving
China’s regulatory landscape for electronic invoice archiving is built on four principal documents that every enterprise handling e-fapiao must understand. The foundational regulation is Cai Kuai [2020] No. 6 (财会〔2020〕6号, Cái Kuài [2020] 6 Hào), titled “Notice on Regulating the Electronic Accounting Archive Management of Newborn Enterprises and Other Entities,” issued jointly by the Ministry of Finance and the State Archives Administration. This regulation explicitly states that electronic invoices generated and received in compliance with STA rules may be stored solely in electronic form without requiring parallel paper printouts, provided the archiving system meets specified technical and process controls.
The second pillar is the Administrative Measures for Electronic Invoices (电子发票管理办法, diànzǐ fāpiào guǎnlǐ bànfǎ), issued by the STA, which establishes the legal validity of e-fapiao and requires that the original OFD (Open Financial Document) or PDF file containing the official tax seal and QR code be preserved in its native format. A printed copy of an e-fapiao is not a legally acceptable substitute for the original electronic file during a tax audit.
The third key regulation is GB/T 18894-2016, the national standard for electronic document archiving, and the more recent DA/T 31-2017 specification for electronic accounting archives. These standards define the metadata, format, storage structure, and long-term preservation requirements that an e-fapiao archiving system must satisfy.
Finally, the Circular on Deepening the Reform of Tax Collection and Administration (税收征管改革深化通知, shuìshōu zhēngguǎn gǎigé shēnhuà tōngzhī) issued in 2024 introduced mandatory real-time uploading of e-fapiao data to the STA’s Golden Tax Phase IV (金税四期, Jīnshuì Sì Qī) platform, meaning that while the taxpayer must retain the original files locally, the tax authority already holds a matching digital copy in its central repository. Enterprises that fail to produce the original electronic file during an audit risk penalties of RMB 10,000 to 50,000 per non-compliant invoice batch, plus potential disallowance of input VAT credits.
2. Technical requirements for an audit-compliant e-fapiao archive
Building an archiving system that satisfies both the STA and the State Archives Administration requires attention to six critical dimensions: format integrity, metadata completeness, index structure, storage medium, access controls, and backup policy. The table below summarises the minimum requirements across these dimensions.
| Dimension | Requirement | Regulatory Reference | Audit Check |
|---|---|---|---|
| File Format | Original OFD or PDF with intact electronic tax seal and QR code; no conversion to image-only formats | Cai Kuai [2020] No. 6, Art. 4 | Verify file opens with valid tax seal visible |
| Metadata | At least 15 metadata fields: invoice code, invoice number, issue date, buyer/seller tax ID, amount (excl. tax), tax amount, total amount, check code, QR code value, OFD digital signature, archiving timestamp, archiver ID, retention period, access classification, disposal date | GB/T 18894-2016 Sec. 7.3; DA/T 31-2017 Sec. 5.2 | Random sample of 10% of archive entries must have all 15 fields populated |
| Index Structure | Multi-level B-tree index supporting lookup by invoice number, date range, supplier tax ID, and amount bracket; full-text search over invoice remarks | STA Guideline on E-Invoice Archiving (2023) | Execute one query per index type; response time under 3 seconds per 100,000 records |
| Storage Medium | Write-once-read-many (WORM) compliant storage or equivalent tamper-evident storage; minimum 10-year data retention guarantee from manufacturer | DA/T 31-2017 Sec. 6.1; State Archives Order No. 15 | Confirm WORM certification or conduct annual integrity audit |
| Access Controls | Role-based access (view, export, delete, administer); mandatory two-factor authentication for delete and administer roles; full audit log of all access events retained for 10 years | Cai Kuai [2020] No. 6, Art. 7; GB/T 22080-2016 | Review access log; confirm no unauthenticated access events |
| Backup Policy | Daily incremental backup to a second geographic location; weekly full backup; quarterly recovery drill with documented results | DA/T 31-2017 Sec. 7.2; Enterprise Internal Control Standard No. 18 | Review recovery drill reports for current fiscal year |
2.1 File format preservation and the OFD mandate
One of the most frequently misunderstood requirements is the format in which e-fapiao must be archived. Since 2021, all newly issued e-fapiao use the OFD (Open Financial Document, 开放版式文档, kāifàng bǎnshì wéndàng) format as mandated by GB/T 32100-2015. While some legacy e-fapiao issued before 2021 exist as PDF/A-3 files, the current standard requires OFD. The key risk here is that many enterprises, when downloading e-fapiao from the STA portal or receiving them via email, print the invoice to PDF or save a screenshot and discard the original OFD file. This practice is explicitly non-compliant: a printed PDF or screenshot lacks the dynamic electronic tax seal (电子印章, diànzǐ yìnzhāng) and the verifiable QR code that the tax authority uses to authenticate the invoice in real time.
To verify format integrity, the archive system should automatically compute and store the SHA-256 hash of the original OFD file upon ingestion and periodically re-verify that the file on disk still matches the stored hash. The STA recommends a verification interval of no longer than 90 days. During a tax audit, the inspector may request a hash match report for a sample of invoices; enterprises without such automated verification tools must manually re-open each file to confirm the tax seal is still rendered — an impractical exercise for archives exceeding 10,000 invoices.
2.2 Metadata schema and data quality
The metadata requirements for e-fapiao archives are set out in DA/T 31-2017, which specifies a mandatory core set of 15 metadata elements. Many enterprise resource planning (ERP) and accounting systems capture only 5 to 7 of these — typically the invoice number, date, amount, and supplier name — leaving critical fields such as the check code (校验码, jiàoyàn mǎ), the QR code value, the digital signature blob, and the disposal date empty or populated with placeholder values. Tax auditors in 2025 began issuing automated queries that cross-reference the metadata submitted to the Golden Tax Phase IV platform against the metadata in the enterprise’s local archive; discrepancies as small as a missing check code digit have triggered full archive audits.
Enterprises should implement a metadata validation rule set at the point of ingestion that rejects any e-fapiao record with more than 3 missing mandatory fields and flags records with 1 to 3 missing fields for manual review within 5 business days. Automated reconciliation against STA data should be performed on at least a monthly basis.
3. Lifecycle management: from ingestion to disposal
An effective e-fapiao archiving policy treats each invoice as an object passing through a defined lifecycle with five distinct stages: receipt and validation, metadata enrichment, secure storage, periodic integrity verification, and compliant disposal. Each stage has its own audit trail requirements.
3.1 Receipt and validation stage
Upon receipt — whether via the STA portal, email, Electronic Data Interchange (EDI), or API — the e-fapiao file must undergo automated validation. This includes verifying the electronic tax seal using the STA’s public key infrastructure (PKI), confirming the QR code decodes to the correct invoice number and amount, and checking the file format against the issuer’s registered format. The average enterprise in China receives approximately 1,700 e-fapiao per month (based on 2025 SME survey data), making manual validation infeasible. An automated ingestion pipeline should validate a single invoice in under 500 milliseconds and batch-process nightly uploads.
3.2 Secure storage and the 10/30-year retention rule
The retention period for e-fapiao differs by invoice type. Standard VAT invoices (增值税普通发票, zēngzhíshuì pǔtōng fāpiào) must be retained for a minimum of 10 years from the end of the fiscal year in which they were issued. Special VAT invoices (增值税专用发票, zēngzhíshuì zhuānyòng fāpiào), which carry input VAT credit rights, must be retained for 30 years. The archive system must enforce these retention periods automatically and prevent premature deletion. If a special VAT invoice is involved in an ongoing tax dispute or litigation, the retention clock stops — the invoice must be preserved until the dispute is resolved plus the full 30-year period, potentially resulting in a total retention of 35 years or more.
3.3 Disposal and destruction records
When an e-fapiao reaches the end of its retention period, disposal must be conducted in accordance with State Archives Order No. 15. This requires a destruction committee comprising at least one finance officer, one tax compliance officer, and one archives administrator. A destruction certificate must be prepared listing the invoice code, number, and date range of destroyed records, signed by all committee members, and retained permanently in the archives. The destruction itself must use a method that renders the digital file irretrievable — cryptographic erasure (overwriting with random data in 3 passes) or physical destruction of the storage medium are both acceptable. Simple deletion using an operating system command is not sufficient for audit compliance.
4. Three common pitfalls that trigger audit failures
Pitfall 1: Archiving printed PDFs instead of original OFD files.
The most pervasive compliance error in e-fapiao archiving is the practice of printing or converting the original OFD file to a generic PDF or image and archiving that derivative file instead of the original. This typically occurs when accounts payable staff receive e-fapiao as email attachments and, lacking an OFD-compatible viewer, open the file, print it to PDF, and save only the PDF. During a tax audit, the inspector will request the original OFD file. If only a printed PDF is available, the tax authority will treat the invoice as incorrectly archived, potentially disallowing the associated input VAT deduction. The STA’s 2025 audit directive explicitly states that derivative formats without a verifiable electronic tax seal and dynamic QR code are not admissible as original invoices. Mitigation: deploy an OFD viewer or automated conversion tool within the accounts payable workflow that preserves the original file and saves a PDF copy only as a supplementary reference — never as the primary archive record. Configure your ERP or document management system to reject non-OFD file uploads for invoice types that require OFD.
Pitfall 2: Incomplete or inconsistent metadata leading to automated audit flags.
As mentioned in Section 2.2, the 15-element metadata requirement is frequently underfulfilled. A 2024 study by the China Tax Compliance Association found that 67% of enterprises undergoing STA e-invoice audits had at least one metadata discrepancy flagged during the initial automated screening. The most commonly missing fields are the check code, the QR code decoded value, and the digital signature object identifier. When the STA’s Golden Tax Phase IV system reconciles its transaction records against the metadata submitted by the taxpayer in the annual e-invoice report, any mismatch generates an automatic compliance alert. An enterprise that receives 10 or more such alerts in a single fiscal year becomes subject to a mandatory on-site audit. Mitigation: implement a metadata completeness check at the point of invoice ingestion that validates all 15 fields against a schema, and perform a monthly reconciliation report that compares the local archive metadata against the STA portal’s invoice query results for a random sample of 1% of invoices.
Pitfall 3: Relying on third-party cloud storage without verifying compliance features.
Many small and medium-sized enterprises subscribe to cloud-based accounting platforms that offer automatic e-fapiao archiving. While these services can be convenient, not all of them are compliant with Cai Kuai [2020] No. 6 and DA/T 31-2017. Common non-compliance issues in third-party platforms include: storage outside of mainland China (data sovereignty violation), lack of WORM-compliant storage, absence of role-based access controls, and failure to retain deletion audit logs for the full 10-year period. If the platform is hosted on servers located outside Chinese territory, the enterprise may violate the Personal Information Protection Law (PIPL, 个人信息保护法, gèrén xìnxī bǎohù fǎ) and the Data Security Law (数据安全法, shùjù ānquán fǎ), which impose penalties of up to RMB 50 million or 5% of annual revenue for cross-border data transfer violations involving tax data. Mitigation: before subscribing to any cloud-based e-invoice archiving service, conduct a compliance audit of the platform using the six-dimension checklist in Section 2. Ensure that the data centre is located in mainland China, that the service level agreement (SLA) explicitly guarantees WORM storage and minimum 10-year retention, and that the platform provides a full export capability in OFD format with complete metadata.
5. Audit preparation: what inspectors will ask for
When the STA conducts an on-site or remote e-fapiao audit, the inspector will typically request the following items. Preparation in advance reduces audit stress and avoids penalty exposure.
- The complete e-fapiao archive index — a machine-readable listing of all invoices in the archive with their metadata, storage location, and retention status. This is often requested as a CSV or JSON export covering the audit period (usually the most recent 3 to 5 fiscal years).
- A random sample of original OFD files — typically 20 to 50 files selected by the inspector from the index. The enterprise must be able to open each file in an OFD viewer and display the electronic tax seal and QR code within 30 seconds per file.
- Integrity verification reports — hash-matching reports showing that the files on disk match the SHA-256 hashes computed at ingestion, with verification timestamps within the last 90 days.
- Access audit logs — a complete log of who accessed each invoice, when, and what action was taken (view, export, edit, delete). Logs must cover the full retention period.
- Disposal certificates — for any invoices that reached end of life during or before the audit period, the destruction committee certificate described in Section 3.3.
- Incident reports — documentation of any data loss events, recovery actions taken, and root cause analyses conducted during the retention period.
The STA’s average response time expectation for these deliverables is 5 business days for the index and sample files, and 15 business days for the full set of logs and reports. Enterprises that fail to meet these deadlines may face a penalty of RMB 5,000 per business day of delay, up to a maximum of RMB 100,000.
6. Building a compliant archiving system: architecture considerations
For enterprises designing a new e-fapiao archiving system or upgrading an existing one, the following architectural principles should guide the implementation.
Immutable storage layer. The storage layer should be object-storage-based with object lock (WORM) enabled. Popular compliant platforms include Alibaba Cloud OSS with bucket retention policy, Tencent Cloud COS with object lock, and on-premises solutions such as Dell EMC ECS with Compliance Edition. The storage class must guarantee that once an e-fapiao object is written, it cannot be modified or deleted until the retention period expires, even by system administrators.
API-first ingestion. The archiving system should expose a RESTful API for invoice ingestion that accepts OFD files and metadata payloads. This allows automated integration with ERP systems (SAP, Oracle, Kingdee, Yonyou) and with the STA’s Golden Tax Phase IV platform. The API should validate file format, compute the initial hash, and reject non-compliant submissions at the edge before they enter the archive.
Separation of concerns. The archive management system (which handles index queries, access control, retention enforcement) should be architecturally separate from the storage layer. This allows independent scaling: the metadata index can reside on high-performance SSD storage for fast queries, while the bulk OFD object storage can use cost-effective archival media. It also enables the index to be recovered independently if the storage layer suffers a partial failure.
A well-architected system for an enterprise processing 20,000 e-fapiao per month typically costs between RMB 200,000 and RMB 500,000 for initial setup and RMB 60,000 to RMB 150,000 per year for ongoing operations, depending on the size of the archive and the chosen deployment model (cloud vs. on-premises). The cost of non-compliance — including penalties, disallowed VAT credits, and the expense of a mandatory audit — regularly exceeds RMB 1,000,000 for a mid-sized enterprise, making the compliant archiving investment a clear net positive.
Next Steps
- Perform a gap analysis of your current e-fapiao archive — slug: gap-analysis-checklist. Download the CG360 e-fapiao archive compliance checklist and evaluate your current system against the six-dimension framework in Section 2. Identify whether your metadata coverage meets the 15-field requirement, whether your storage medium is WORM-compliant, and whether your access controls satisfy two-factor authentication requirements. Schedule the gap analysis before the end of the current quarter.
- Implement automated OFD validation and metadata enrichment — slug: automated-validation-pipeline. Deploy an automated ingestion pipeline that validates the electronic tax seal, computes the SHA-256 hash, extracts all 15 mandatory metadata fields, and reconciles the data against the STA’s Golden Tax Phase IV portal. Several commercial solutions (including CG360 e-Invoice Manager, Kingdee E-Invoice, and UFIDA e-Archive) offer pre-built connectors for this purpose. Budget approximately RMB 80,000 to RMB 150,000 for the implementation, depending on ERP integration complexity.
- Schedule a pre-audit mock inspection — slug: mock-audit-preparation. Conduct an internal mock audit following the six-item inspector checklist in Section 5. Invite your finance, tax compliance, and IT teams to participate. Prepare the archive index export, sample 50 OFD files, and generate the integrity verification report. If any item cannot be produced within the expected timeframes, document the gap and create a remediation plan with a 30-day deadline. Run this mock audit annually, ideally 60 days before the STA’s typical audit season (March through May).
Disclaimer. This article provides general guidance on e-fapiao archiving for tax audit purposes based on regulations effective as of July 2026. It does not constitute legal or professional tax advice. Regulatory requirements may change, and enterprises should consult qualified tax advisors and legal professionals for advice tailored to their specific circumstances. CG360 and its affiliates accept no liability for actions taken based on the content of this article.
— The CG360 E-Invoice Knowledge Centre
