ZATCA Phase 1 E-Invoicing

ZATCA compliance is a two-phase journey. Phase 1 — the generation phase — has been mandatory since December 2021. Every VAT-registered business in Saudi Arabia must produce invoices in a structured electronic format (XML), with a QR code embedded on every simplified invoice. A standard printed invoice or a Word document is no longer compliant. If your ERPNext is issuing invoices without a ZATCA QR code and without the correct XML structure, you are already non-compliant. GSA configures Phase 1 in ERPNext so every invoice your business issues meets the ZATCA standard — and so your system is ready for Phase 2 clearance when your wave arrives.

ZATCA Phase 1, known as the generation phase, was the first step in Saudi Arabia's e-invoicing rollout. It became mandatory for all VAT-registered businesses on 4 December 2021. Phase 1 does not require real-time communication with ZATCA — it requires that your billing system produces invoices in the correct format, with the correct content.

There are two invoice types under ZATCA. Standard invoices (B2B) must be produced in a structured XML format following the UBL 2.1 standard, with a specific set of required fields including the seller's VAT number, the buyer's VAT number, the invoice total, VAT amount, and a cryptographic hash and UUID. Simplified invoices (B2C) must include a QR code that encodes the seller name, VAT number, invoice date, invoice total, and VAT amount in a Base64-encoded TLV format.

GSA configures ERPNext to generate both invoice types correctly. The Sales Invoice form in ERPNext is extended to capture all ZATCA-required fields. When a sales invoice is submitted, the system automatically generates the compliant XML, computes the QR code, and stamps it on the printed invoice. The invoice PDF that comes out of your system is a ZATCA-compliant document — not a workaround and not a manual post-processing step.

Phase 1 is also the technical prerequisite for Phase 2. The XML schema, the certificate setup, the invoice UUID chain, and the cryptographic signing all start in Phase 1. GSA builds Phase 1 in a way that is directly extendable to Phase 2 clearance — so when your business receives its ZATCA wave notification, the Phase 2 integration is an addition to an existing foundation, not a rebuild from scratch.

Scope of Service

  • ERPNext Sales Invoice form extended to capture all ZATCA Phase 1 required fields (seller VAT number, buyer VAT number, invoice UUID, invoice hash)
  • Standard (B2B) invoice: structured XML generated in UBL 2.1 format on every submitted invoice
  • Simplified (B2C) invoice: QR code generated in ZATCA-compliant Base64 TLV format and embedded on the printed invoice
  • ZATCA-compliant invoice PDF template: correct layout, field order, Arabic and English labels, QR code placement
  • Cryptographic hash and UUID chain configured — required for Phase 2 certificate signing
  • VAT number validation on customer and supplier records — flags missing or malformed VAT numbers before invoice submission
  • Tax invoice vs. simplified invoice logic built in: system automatically selects the correct type based on whether the customer has a VAT number
  • ZATCA Phase 1 compliance report: lists all invoices with their XML status, QR code status, and any missing fields
  • Staff training on the invoice workflow in Arabic and English
  • Phase 2 readiness: Phase 1 is built as a foundation — Phase 2 clearance integration is a direct extension, not a rebuild

Right For You If…

  • VAT-registered businesses in KSA using ERPNext that are not yet producing ZATCA-compliant invoices — every invoice currently issued is technically non-compliant
  • Businesses that received a ZATCA Phase 2 wave notification and realise they haven't completed Phase 1 yet
  • Companies issuing invoices from ERPNext without a QR code, without an XML structure, or using a custom invoice template that was not built for ZATCA
  • Finance teams who want to fix their ZATCA compliance status before an audit or a ZATCA spot-check
  • Businesses planning a new ERPNext implementation and want Phase 1 built correctly from day one rather than retrofitted later
  • Any business that wants Phase 2 clearance in the future — Phase 1 is the required foundation and must be in place first

Ready to get started?

Talk to our team. We'll understand your business and tell you honestly what we can do for you.