ZATCA & Compliance

ZATCA Phase 2 E-Invoicing in ERPNext: How to Connect ERPNext to Fatoora

ERPNext can be ZATCA Phase 2 compliant, but not out of the box. Here is what you need to add, how onboarding works, and the setup mistakes that lead to rejected invoices.

By CODEXTERS••7 min read

ERPNext is popular with Saudi businesses because it covers accounting, stock, POS and HR in one open-source system. For Wave 25, any business whose taxable revenue passed SAR 187,500 in any year from 2022 to 2025 must connect its invoices to ZATCA by 1 February 2027.

You can keep ERPNext. This guide explains what has to be added, how onboarding works and the setup mistakes we see most often.

What ERPNext needs for Phase 2

Standard ERPNext prints VAT invoices with a QR code, which covers Phase 1. Phase 2 needs more: invoices in ZATCA’s XML format, signed with your certificate, cleared or reported through the Fatoora platform, and stored with their ZATCA status.

This is usually added through a ZATCA compliance app installed on your Frappe site. The right choice depends on your ERPNext version, hosting (Frappe Cloud or self-hosted) and customisations.

  • Check your ERPNext and Frappe versions before choosing an app.
  • Self-hosted sites need the app installed and updated like any other Frappe app.
  • Custom print formats and scripts must not break the XML that ZATCA receives.

Setup mistakes that cause rejections

  • Company VAT number and national address incomplete in the company and address records.
  • B2B customers missing a VAT number or address, so standard invoices fail clearance.
  • Item tax templates missing or wrong, especially for zero-rated and exempt items.
  • Returns created without linking the original invoice.
  • Rounding settings and discounts that make totals differ from ZATCA’s calculation.
  • POS profiles and branches not onboarded as their own invoicing devices.

How onboarding works

You generate a one-time code (OTP) in your Fatoora portal. The compliance app uses it to request a certificate, sends test invoices for ZATCA’s compliance checks, and then gets the production certificate used to sign real invoices.

Generate the OTP only when you are ready, because it expires quickly. Keep track of certificate expiry dates and renew them before they lapse.

How we connect ERPNext to ZATCA

  • Free 15-minute check: your ERPNext version, hosting and invoice flow.
  • Install and configure the compliance app, and fix company, customer and tax data.
  • Onboard each company, branch and POS: you send us the OTP, we connect and test, usually in one day.
  • Monitoring of every invoice, with rejections fixed by us.
  • Certificate renewals and updates when ZATCA changes its rules.

Frequently asked questions

Is ERPNext ZATCA Phase 2 compliant out of the box?+

Not by itself. ERPNext covers Phase 1 VAT invoices with a QR code. Phase 2 is added with a ZATCA compliance app and correct setup.

Does ERPNext POS work with ZATCA?+

Yes, once POS invoices are produced and reported through the integration and each POS is onboarded. POS sales are usually simplified invoices reported within 24 hours.

Can you connect ERPNext on Frappe Cloud?+

Yes. Both Frappe Cloud and self-hosted ERPNext can be connected. Hosting affects how the app is installed and updated, not whether it works.

We are already integrated but invoices get rejected. Can you help?+

Yes. Most rejections come from data or setup issues. We find the cause, fix the setup and resubmit, and keep monitoring after that.

Topics covered

ZATCA ERPNext integrationERPNext ZATCA phase 2ERPNext e-invoicing Saudi ArabiaFrappe ZATCAERPNext Fatoora integrationERPNext wave 25

Related reading

Need help building this?

CODEXTERS designs and builds software across ERP and ERPNext, ZATCA e-invoicing compliance, AI and data platforms, SaaS products, and startup MVPs — for companies of every size.

ERP & ERPNext Compliance AI & Data SaaS & MVP