ZATCA Phase 2 Integration: What Your ERP Actually Has to Do
In this article
- Phase 1 vs Phase 2: what changed
- Who is in scope and when: the waves
- What the ERP must produce for every invoice
- Clearance vs reporting: standard and simplified invoices
- Onboarding: CSIDs, OTPs and the Fatoora portal
- How SAP Business One and Odoo projects typically handle it
- SAP Business One
- Odoo
- Testing checklist before you switch to production
- Common failures I see in Phase 2 projects
- Key takeaways
- Frequently asked questions
- What is the difference between clearance and reporting in ZATCA Phase 2?
- What is a CSID?
- Which businesses are in the latest ZATCA wave?
- Does SAP Business One support ZATCA Phase 2?
- Does Odoo support ZATCA Phase 2?
ZATCA phase 2 integration means your ERP must do three things it did not do in Phase 1: generate every invoice and note in ZATCA’s structured XML format with additional fields, stamp it cryptographically, and transmit it to the Fatoora platform, where tax invoices are cleared before you share them and simplified invoices are reported within 24 hours of issue. It is rolled out in waves by revenue; the latest announced wave covers taxpayers with VAT-subject revenue above SAR 187,500, with a 1 February 2027 deadline.
I own SAP Business One as IT Manager at NAF Company and I lead Odoo projects as a PM, so I sit on the company’s side of these integrations. The vendor’s statement that the solution is “ZATCA compliant” is true and also not enough: the master data, the invoice numbering, the credit-note discipline and the month-end rejections are yours. This article explains what the integration really involves so you can hold the vendor to it.
Phase 1 vs Phase 2: what changed
Phase 1, the Generation Phase, started on 4 December 2021. It required every VAT-registered business to stop issuing handwritten or spreadsheet invoices and to generate and store invoices in a compliant electronic solution, with a QR code on simplified invoices. Nothing was sent to the authority.
Phase 2, the Integration Phase, keeps every Phase 1 requirement and adds the connection to ZATCA. In the authority’s own summary of the latest wave, Phase 2 requires integrating e-invoicing solutions with the Fatoora platform, issuing e-invoices in a specific format, and including additional fields on invoices. The official overview is on the ZATCA e-invoicing pages.
| Requirement | Phase 1 (Generation) | Phase 2 (Integration) |
|---|---|---|
| Invoice creation | Electronic solution, no paper or free-form documents | Same, in ZATCA’s XML standard with additional mandatory fields |
| QR code | Required on simplified invoices | Required, with extended content including the stamp |
| Cryptographic stamp | Not required | Required; applied by your solution for simplified invoices, by ZATCA for cleared tax invoices |
| Connection to ZATCA | None | Mandatory: clearance of tax invoices, reporting of simplified invoices |
| Device onboarding | None | Each invoicing solution unit onboarded with a certificate (CSID) |
| Timing | All taxpayers from 4 December 2021 | Waves from 1 January 2023, by revenue threshold |
Who is in scope and when: the waves
ZATCA notifies the taxpayers in each wave directly and publishes the criteria at least six months before the integration date. The thresholds have dropped wave by wave, from the largest companies in 2023 to very small businesses now. The twenty-fifth wave, announced in July 2026, covers all taxpayers whose VAT-subject revenue exceeded SAR 187,500 in any of 2022, 2023, 2024 or 2025, and requires integration with Fatoora no later than 1 February 2027. The authority’s announcement is on its news page for Wave 25.
Two practical points follow. First, the test is revenue in any of the look-back years, so a company that had one strong year is in scope even if it has since shrunk. Second, the notification date is the start of your project, not the deadline. Six months is enough for a disciplined ERP integration and not enough for one that begins with a vendor search in month four.
What the ERP must produce for every invoice
Under Phase 2 each invoice, credit note and debit note leaves your system as an XML document that follows ZATCA’s implementation standard, with a human-readable version (typically a PDF/A-3 with the XML embedded) for the customer. Beyond the ordinary commercial content, the solution must add security fields that make the document unique and tamper-evident:
- A UUID for every document, distinct from your visible invoice number.
- A hash of the invoice and the hash of the previous invoice, which chains documents together so a missing or altered invoice is detectable.
- An invoice counter that increments per solution unit.
- A cryptographic stamp: for simplified invoices your solution signs the XML with the certificate issued to it; for tax invoices ZATCA applies its stamp during clearance.
- A QR code whose content is extended in Phase 2 to include the stamp and hash elements.
- Arabic content: tax invoices and simplified invoices must be in Arabic; bilingual layouts are permitted.
The solution must also block functions ZATCA treats as tampering risks, such as deleting or editing an issued invoice, uncontrolled log changes and backdating. For the ERP owner this is the practical meaning of compliance: after go-live, corrections are made with credit and debit notes that reference the original, never by editing the original.
Clearance vs reporting: standard and simplified invoices
The two document types take two different paths, and your ERP must know which path each customer is on.
| Tax invoice (B2B, B2G) | Simplified tax invoice (B2C) | |
|---|---|---|
| Model | Clearance | Reporting |
| When it goes to ZATCA | Before you share it with the customer; ZATCA validates and stamps it | After issue; you must report it within 24 hours |
| Who stamps | ZATCA, during clearance | Your solution, with its own certificate |
| Typical source | ERP sales invoices to registered customers | Point of sale, retail, cash sales |
| Customer data needed | Customer VAT number and address on the record | Minimal |
| Failure mode | Rejected invoice cannot be legally shared | Unreported invoices accumulate past the window |
The row that matters most is customer data. A B2B invoice goes to the clearance endpoint, and the clearance will fail if the customer’s VAT number or address is missing or malformed. That is a master-data clean-up task, and it belongs to your finance team, not to the vendor.
Onboarding: CSIDs, OTPs and the Fatoora portal
Each invoicing solution unit (an ERP instance, a POS terminal, a branch system) must be onboarded with ZATCA and issued a Cryptographic Stamp Identifier, or CSID, which is the certificate that identifies it and authorizes it to call the clearance and reporting APIs. The sequence is the same regardless of product:
- Complete the company master data: legal name, VAT number, commercial registration or other identification scheme, and the full national address including district, building number and plot. Onboarding and later clearance both check these.
- Test in the sandbox: ZATCA’s developer sandbox lets the vendor prove the XML, stamp and QR generation with a test VAT number and pre-set credentials.
- Test in simulation: the pre-production environment uses your own company and one-time passwords from the Fatoora simulation portal; its invoices are not legally valid, which is exactly why it is the right place to run your month-end scenarios.
- Generate an OTP in the Fatoora portal for the production unit. OTPs expire quickly, so coordinate the person with portal access and the person running the onboarding.
- Request the compliance CSID: the solution generates a key pair and certificate signing request and exchanges the OTP for a compliance certificate.
- Pass the compliance checks: the unit submits sample documents of each type it will issue (invoice, credit note, debit note, standard and simplified as applicable) and ZATCA validates them.
- Receive the production CSID and switch the unit to production. In Odoo this is a one-way switch once an invoice is submitted; expect the same seriousness from any product.
- Plan renewal and revocation: certificates expire and units get retired. Record who renews, when, and how a retired unit is revoked in the portal.
How SAP Business One and Odoo projects typically handle it
SAP Business One
SAP Business One does not include a native Saudi Phase 2 switch, so SAP B1 projects in the Kingdom use a partner add-on or connector. These typically read the posted A/R invoice, credit memo and debit documents through the DI API or Service Layer, build the XML, apply the stamp, call Fatoora, and write the status, UUID, hash and QR data back into user-defined fields and tables on the document. Because this is a separate product, confirm four things in writing: which add-on, how it is licensed, which SAP B1 version and database (SQL Server or HANA) it is certified for, and what happens to it when you apply a new SAP B1 patch level.
Odoo
Odoo ships Saudi localization modules: a base accounting package with the Phase 1 QR code, an e-invoicing module that enables the Phase 2 API integration, and a point-of-sale variant for simplified invoices. The ZATCA API mode (sandbox, simulation, production) is set in accounting settings, each sales journal is onboarded separately with its own OTP, and the invoice’s chatter shows the result in plain language: accepted, accepted with warnings, or rejected. Rejected invoices remain in a rejected state and are not legally valid until corrected and retried, and the generated XML and PDF are attached permanently. Invoices with a related contact are treated as B2B and sent for clearance, which is why the customer record matters so much.
Testing checklist before you switch to production
Run this in the simulation environment with real-shaped data. Each item should be executed by your own key user, not by the vendor, and the evidence (screenshots and the ZATCA response) filed.
- Standard tax invoice to a registered customer: cleared on first attempt.
- Standard tax invoice to a customer with a missing VAT number: rejected, and the rejection is visible to the user who posted it.
- Simplified invoice from each POS or cash channel: reported, QR scans correctly on a phone.
- Credit note and debit note referencing an original invoice, both standard and simplified.
- Invoice with a global discount and with line discounts: VAT rounding matches the ERP totals.
- Zero-rated, exempt and export invoices, and a reverse-charge supplier bill if applicable.
- Bilingual print layout: Arabic mandatory fields present, company address complete.
- A hundred invoices in one batch: counter and previous-hash chain intact.
- Fatoora unavailable for an hour: documents queue and are reported within the window afterward, nothing is lost.
Common failures I see in Phase 2 projects
- Incomplete seller master data. Missing district or building number in the company record stops onboarding and clearance. Fix it before the vendor arrives.
- Customer records without VAT numbers. Every B2B customer needs a validated VAT number and address. Export your customer list and clean it in week one.
- Editing issued invoices. Users who are used to “fixing” an invoice must learn credit and debit notes. This is training, not software.
- More than one invoicing system, one onboarding. ERP, POS and a branch system each need their own unit and certificate.
- Nobody owns rejections. Assign a person who checks rejected and warning documents daily, especially in the last three days of the month.
- Certificates nobody tracks. Put CSID expiry in your IT renewals calendar next to domain names and SSL certificates.
Key takeaways
- Phase 2 adds a structured XML format with security fields, a cryptographic stamp, and a live connection to Fatoora on top of Phase 1.
- Tax invoices are cleared by ZATCA before you share them; simplified invoices are stamped by your solution and reported within 24 hours.
- Waves are announced at least six months ahead; the latest announced threshold is SAR 187,500 with a 1 February 2027 deadline.
- Onboarding runs sandbox, simulation, OTP, compliance CSID, compliance checks, production CSID; the production switch is one-way.
- Odoo includes the Saudi modules; SAP Business One uses partner add-ons that need their own owner and upgrade plan.
- Most failures are master data, user habits and ownership of rejections, which are the company’s responsibility, not the vendor’s.
Frequently asked questions
What is the difference between clearance and reporting in ZATCA Phase 2?
Clearance applies to tax invoices between businesses: the invoice is sent to ZATCA first, validated and stamped, and only then shared with the customer. Reporting applies to simplified invoices to consumers: your solution stamps and issues them, then reports them to ZATCA within 24 hours. Your ERP must route each document correctly.
What is a CSID?
A Cryptographic Stamp Identifier is the certificate ZATCA issues to each invoicing solution unit after onboarding. A compliance CSID is used to pass the compliance checks; a production CSID is issued afterward and used to stamp simplified invoices and call the clearance and reporting APIs. It expires and must be renewed.
Which businesses are in the latest ZATCA wave?
The twenty-fifth wave, announced in July 2026, covers taxpayers whose VAT-subject revenue exceeded SAR 187,500 in any of 2022, 2023, 2024 or 2025, with integration required by 1 February 2027. ZATCA notifies each targeted taxpayer directly and announces later waves at least six months before their integration date.
Does SAP Business One support ZATCA Phase 2?
Yes, through partner add-ons rather than a built-in switch. The add-on generates the XML, applies the stamp and QR code, submits to Fatoora and writes the result back to the document. Confirm the add-on’s licensing, supported SAP B1 version and database, and who supports it after patches before you sign.
Does Odoo support ZATCA Phase 2?
Yes. Odoo’s Saudi localization includes an e-invoicing module for the Phase 2 API integration and a point-of-sale variant for simplified invoices, with sandbox, simulation and production modes. Each sales journal is onboarded with an OTP from the Fatoora portal, and rejected invoices stay invalid until corrected and retried.
If you have received a ZATCA notification or expect one, I can review your ERP, master data and vendor proposal from the company’s side and run the simulation testing with your team before the production switch. See my systems integration service, the related comparison of SAP Business One and Odoo for Saudi companies, or contact me to talk through your timeline.