Guide
Connecting ERPNext to ZATCA's Fatoora platform: what does Phase 2 require?
What Phase 2 (integration) of Saudi e-invoicing requires, and how ERPNext is connected to the Fatoora platform of the Zakat, Tax and Customs Authority.
FoundationCX team FoundationCX
E-invoicing in Saudi Arabia comes in two phases. Phase 1 (generation) requires issuing invoices electronically from a compliant system. Phase 2 (integration) requires your system to connect directly to Fatoora, the platform of the Zakat, Tax and Customs Authority (ZATCA). ZATCA brings businesses into Phase 2 in successive waves, notifying each one.
What Phase 2 requires
According to the technical guidelines published on ZATCA’s site:
- A standard invoice format: invoices are issued as XML to the set specification, with a QR code.
- A cryptographic stamp: the system stamps each invoice cryptographically and chains it to the previous invoice.
- Onboarding the issuing unit: the system (or each issuing point) is registered on Fatoora and receives its own certificate before going live.
- Two invoice types, two routes:
- Standard tax invoices (business to business) are sent to the platform for clearance before they reach the buyer.
- Simplified tax invoices (to consumers) are reported to the platform within 24 hours of issue.
And ERPNext?
ERPNext does not ship Phase 2 integration in its core, but there are open-source apps built for it that support Phase 2, such as ksa_compliance and zatca_erpgulf. The real work is not writing code from scratch but:
- choosing the right app for your ERPNext version and installing it;
- setting up company, item and tax data the way ZATCA expects;
- onboarding the issuing unit on Fatoora, in the simulation environment first;
- testing every invoice type and credit and debit note, and handling what the platform rejects;
- moving to production, and following any update ZATCA makes to the specification.
Questions to ask any implementer
- Which app will you use, and who updates it when ZATCA changes the specification?
- Have you tested every document type in the simulation environment before go-live?
- Where are the signing certificates and keys kept, and who can reach them?
- What happens if the connection to the platform fails at the moment an invoice is issued?
How we help
We implement ERPNext in Arabic and set up its Fatoora integration for each client on request: we choose the right app, configure it and test it in the simulation environment before go-live. ERP service
Comparing systems? ERPNext or Odoo?
Sources: ZATCA e-invoicing page, Detailed Guidelines for E-Invoicing and the Detailed Technical Guidelines. This article is general information, not tax advice; check details and your wave date with your accountant and ZATCA.