E-Invoicing: Technical requirements and integration with the Tax Authority (ZATCA)
E-Invoicing (E-Invoicing): Technical Requirements and Integration with ZATCA
E-Invoicing (Fatoora): A professional guide explaining the technical requirements for applying ZATCA invoices, how to integrate with the Zakat, Tax and Customs Authority, clarifying the QR code, and identifying common errors that lead to invoice rejection—Digital Salla.
- Fundamental concept of E-Invoicing (Phase 1 vs. Phase 2).
- Technical requirements: XML, UUID, Hash, and Digital Signatures.
- How the Integration (Linking) process works via APIs.
- Analyzing the QR Code: Mandatory fields for B2B and B2C.
- The difference between “Clearance” (Standard) and “Reporting” (Simplified).
- Common errors in implementation and how to avoid them.
1) The Concept of E-Invoicing
E-Invoicing (Fatoora) is the process of generating, storing, and exchanging invoices in a structured electronic format (XML or PDF with embedded XML). It is designed to fight the shadow economy and increase transparency between the taxpayer and the Authority.
2) Phase 1 vs. Phase 2 (The Strategic Difference)
ZATCA has implemented the system in two distinct stages:
- Phase 1 (Generation): Requires issuing and storing invoices via a compliant system. No direct connection to ZATCA was mandatory.
- Phase 2 (Integration): Requires a Live API Connection. Each invoice must be validated or reported to ZATCA as it is issued.
3) The Integration Path (Visual Logic)
How an invoice travels from your ERP to ZATCA and then to the Client?
4) Technical Requirements for Phase 2
To integrate with the Authority, your system must support:
Sales Controls Template - Excel Template
- XML Format (UBL 2.1): The universal language for business documents.
- UUID: A unique 128-bit identifier for every single invoice.
- Cryptographic Stamp: A digital signature that proves the invoice hasn’t been altered after issuance.
- Hash Chain: Each invoice is linked to the one before it, preventing anyone from deleting a past invoice.
5) Decoding the QR Code Requirements
The QR Code is the visual proof of compliance. It must contain (encoded in Base64):
- Seller’s Name.
- Seller’s VAT Registration Number.
- Invoice Timestamp (Date & Time).
- Invoice Total (Including VAT).
- VAT Amount.
- Phase 2 extra: Digital signature and Hash of the XML.
6) Clearance vs. Reporting Processes
The workflow depends on the type of invoice:
| Invoice Type | Process | Description |
|---|---|---|
| Standard (B2B) | Clearance | Must be sent to ZATCA and “Stamped” before giving it to the client. |
| Simplified (B2C) | Reporting | Issued to the client immediately, then “Reported” to ZATCA within 24 hours. |
7) Operational Controls & Readiness Checklist
To ensure your E-Invoicing System is compliant:
ZATCA Integration Quality Gate
- Is your system on the ZATCA Certified Solution list?
- Can your system generate invoices in Offline Mode and sync later?
- Are Prohibited Functions (like changing old invoices or multiple sequences) blocked?
- Have you completed the “Onboarding” process on the Fatoora Portal?
- Do you have an Archiving Policy to store invoices for 6-10 years?
8) Common Errors and How to Prevent Them
- Incorrect VAT Calculation: Calculating VAT on the total instead of line-by-line (ZATCA requires line-level precision).
- Invalid Date Format: Using ISO formats that the Authority doesn’t accept. Fix: Use the exact XSD Schema provided by ZATCA.
- Sequence Gaps: Missing an invoice number in the chain. Fix: Ensure your ERP has a robust auto-sequencing engine.
- Wrong Invoice Type: Issuing a “Standard” invoice for a retail customer. Fix: Configure “Customer Type” validation in the master data.
9) Frequently Asked Questions
Does ZATCA store my actual invoice data?
Yes. For Standard invoices, they clear and store the data in real-time. For Simplified, they receive a summary reporting file.
What happens if my Internet is down?
ZATCA allows for “Delayed Reporting” in case of technical issues, but the system must timestamp the invoice locally and sync as soon as the connection is restored.
Is the QR code mandatory for B2B invoices?
In Phase 1, it was optional for B2B. In Phase 2, it is mandatory for all electronic invoices.
10) Conclusion
E-Invoicing and integration with ZATCA is more than just a regulatory hurdle; it is the final piece of the Digital Transformation puzzle. By aligning your ERP system with the technical requirements of XML, API integration, and secure hashing, you protect your entity from massive fines and ensure its reputation as a compliant, modern institution. This integration creates a safer business environment where data drives the economy, and transparency build trust with both the Authority and your global partners.
Action Step Now (30 minutes)
- Check your ZATCA Wave date based on your 2022/2023 revenue.
- Ask your ERP provider: “Are we ready for Phase 2 API Integration?”.
- Scan one of your current invoices with the official ZATCA App to verify QR compliance today.