E-Invoicing and ERP: A Practical ZATCA Compliance Guide
TranquilTRANQUIL

E-Invoicing and ERP

A Practical ZATCA Compliance Guide

Home/Blog/E-Invoicing and ERP: A Practical ZATCA Compliance Guide
vatTax
September 18, 202511 min read
Share:

Why E-Invoicing Compliance Is an ERP Question

In Saudi Arabia an invoice is no longer just a document you send a customer. Under the integration phase, a standard tax invoice between businesses goes to ZATCA's Fatoora platform for clearance before the buyer receives it, and a simplified invoice must be reported within 24 hours of issue. A wrong VAT number, a rounding difference or a credit note that does not reference its original invoice is no longer an internal error to fix at month-end. It can stop the invoice itself.

And invoices do not come from nowhere. Their data comes from the customer master, item prices, tax settings, the sales order and the delivery note. If that data lives in one system and invoicing in another, you are copying and reconciling forever. That is why e-invoicing and ERP integration is really about data quality across the business, not just the screen that prints the invoice.

This guide covers the two phases and wave deadlines, what your system must support technically, the onboarding steps with ZATCA, operating controls after go-live, special cases, and the mistakes we see most often.

The Two Phases

ItemPhase 1: GenerationPhase 2: Integration
Start4 December 2021 for all VAT payersIn waves from 1 January 2023
Core requirementIssue and store invoices electronically with a compliant solutionConnect the solution to Fatoora and exchange invoices with it
FormatStructured electronic invoice; handwritten invoices bannedXML to ZATCA's technical specification, with a cryptographic stamp
QR codeMandatory on simplified, optional on standardMandatory on both, with extra data
Link to ZATCANo transmissionClearance for standard invoices; reporting within 24 hours for simplified

Clearance versus reporting

  • Standard tax invoices (B2B and B2G) are submitted to ZATCA and cleared in real time before they are shared with the buyer. A rejected invoice is not a valid invoice until it is corrected.
  • Simplified tax invoices (B2C) go to the customer immediately and are reported to ZATCA within 24 hours.
  • Credit and debit notes follow the path of the invoice type they relate to.

A simplified invoice may also be used for a B2B supply of SAR 1,000 or less. Above that, a standard invoice carrying the buyer's name, address and VAT number is required.

The QR code

In Phase 1 the QR code holds five fields: seller name, seller VAT number, invoice timestamp, invoice total including VAT, and VAT total. Phase 2 adds the invoice hash, the cryptographic stamp and the public key, so anyone scanning it can verify the invoice has not been altered.

Wave Deadlines: Which One Is Yours?

ZATCA brings businesses into Phase 2 in waves based on VAT-able turnover in specified reference years, and notifies each business at least six months before its date. Recent waves:

WaveTurnover thresholdReference yearsIntegration window
24Above SAR 375,0002022 to 20241 April to 30 June 2026
25Above SAR 187,5002022 to 2025From 1 February 2027

The practical rule: plan around your own ZATCA notification and the official announcements, not another company's deadline or an old threshold someone mentioned. If your turnover is near the next threshold, start preparing now. Real integration takes weeks of set-up and testing.

What about "Phase 3"?

You will see "Phase 3" in marketing material. At the time of writing, ZATCA's published framework has two phases, and it expands through further Phase 2 waves. Check any new obligation against ZATCA's own publications before acting on it. Our article on ERP and the Phase 3 discussion looks at this in more detail.

What Your ERP Must Support

1. XML to the UBL 2.1 standard

ZATCA's specification builds on UBL 2.1. The system must produce XML with every mandatory field: seller and buyer details, VAT numbers, line items, VAT per line, supply date and currency. Document types are coded 388 for a tax invoice, 381 for a credit note and 383 for a debit note; standard and simplified invoices are distinguished by the invoice subtype code, not the type code.

2. Cryptographic stamp and certificate management

Each invoice is stamped with a certificate issued by ZATCA to the invoicing unit. Any change after stamping breaks the hash. The system has to request certificates, store the private key securely, and track and renew certificates before they expire.

3. Hash chain and counter

Each invoice carries the hash of the previous invoice from the same unit plus a sequential counter, so removing an invoice from the middle of the chain is detectable. The system must therefore block deletion of issued invoices; errors are fixed with credit or debit notes.

4. API connection to ZATCA

Submitting standard invoices for clearance, reporting simplified ones, and handling responses: accepted, accepted with warnings, or rejected with an error code. If the connection drops, invoices should queue and retry automatically.

5. Credit and debit notes

An issued invoice cannot be cancelled. Corrections go through a credit note (to reduce the amount or record a return) or a debit note (to increase it), referencing the original invoice and stating the reason. Line-level partial credits matter: returning one item should not require reversing the whole invoice.

6. VAT categories

The standard rate is 15%, but there are zero-rated supplies such as exports, exempt supplies and out-of-scope items. Each has its own category code on the invoice and should be set on the item or customer, not chosen by staff invoice by invoice.

7. Retention

VAT records must generally be kept for at least six years, with longer periods for certain capital assets and real estate. The system should store the stamped XML exactly as issued and retrieve it on demand.

Why a Standalone Invoicing Tool Is Rarely Enough

AreaSeparate invoicing toolInvoicing inside ERP
Data entryInvoice data exported or re-keyed from the main systemInvoice created straight from the order or delivery
Journal entryNeeds transfer or later reconciliationPosted automatically with the invoice
InventoryDisconnected from the invoiceRelieved on the linked delivery
VAT returnAssembled from two sourcesDrawn from one dataset
Credit notesHard to tie to physical returnsLinked to the return and the original invoice

A separate tool can be a sensible stopgap for a legacy system that cannot be upgraded quickly. Over time, though, every hand-off between systems is a place where the invoices ZATCA holds and your ledger can drift apart.

If your current system cannot integrate

  • Upgrade: sensible if the vendor has a compliant release with a firm date ahead of your wave and the system otherwise meets your needs.
  • Connect a specialist solution by API or middleware: quick, but make sure accounting entries and returns stay consistent between systems, and agree who owns differences.
  • Move to an integrated ERP: sensible if the system is already struggling with inventory or reporting, turning a compliance deadline into a chance to fix wider problems.

Compare options on total three-year cost, not set-up fees, and on whether they can be live before your wave date.

Onboarding With Fatoora, Step by Step

  1. Assess: can your system produce XML and stamp invoices? Are customer and supplier records complete with VAT numbers and addresses? Is every item's VAT category right?
  2. Clean master data: complete B2B customers' VAT numbers, standardise addresses and review item tax categories. This usually takes longer than expected.
  3. Identify invoicing units: every device or system that issues invoices, such as the sales server and each branch till, is a separate unit that needs its own certificate.
  4. Register: the system generates a key pair and a certificate signing request for each unit. You generate a one-time password in the Fatoora portal, valid for a short time, and submit it with the request; ZATCA issues a compliance certificate for testing.
  5. Pass compliance checks: submit test documents covering standard and simplified invoices with credit and debit notes for each, and confirm they are accepted.
  6. Get the production certificate: once checks pass, request the production certificate used for live invoices.
  7. Go live and monitor: watch the status of every invoice daily, alert on rejections, and name the person who fixes them.

Illustrative Example: Where Invoices Get Stuck

Hypothetical example: a distributor issuing about 1,200 invoices a month, two-thirds of them standard invoices to shops and restaurants, sees a batch rejected or returned with warnings in the first week after integration. The causes: B2B customers recorded without a VAT number or with a truncated one; buyer addresses missing the city or postal code; credit notes for returns issued without referencing the original invoice; and small rounding differences between the sum of line VAT and invoice-level VAT, left over from an old calculation method.

None of that is a technical failure in the strict sense. These were data and process problems that existed before integration; integration exposed them. Cleaning data before go-live matters more than any technical setting.

Special Cases to Handle

Advance payments

VAT is due on the earliest of supply, invoice issue or receipt of payment, to the extent of the payment. An advance received before delivery is taxable on receipt and needs an invoice. The final invoice on delivery then deducts the advance.

Hypothetical example: a SAR 200,000 supply contract (before VAT) with 30% paid upfront. The advance invoice is SAR 60,000 plus SAR 9,000 VAT. On delivery, the final invoice shows SAR 200,000 plus SAR 30,000 VAT, less the SAR 60,000 and SAR 9,000 already invoiced, leaving SAR 140,000 plus SAR 21,000 VAT due. The system must link the two so VAT is not charged twice.

Government contracts

Since 1 November 2021, VAT on government contracts is due on the earlier of the payment order or receipt of payment. Contractors and suppliers to government entities need their invoicing timing set up accordingly.

Multiple branches and tills

Every till issuing simplified invoices is an invoicing unit with its own certificate and hash chain. Ten branches with three tills each can mean thirty units, which makes certificate tracking and reporting monitoring a daily job rather than a one-off set-up.

Controls After Go-Live

  • Daily rejection review: a rejected standard invoice means the customer has no valid invoice and collection will slip.
  • Numbering and sequence: keep an internal invoice number alongside the UUID and investigate any gaps.
  • Credit note authority: restrict who may issue credit notes, since they cut revenue and VAT.
  • Monthly reconciliation: compare cleared and reported invoices with revenue in the general ledger before preparing the VAT return.
  • Certificate calendar: track expiry dates for every unit so a branch does not suddenly stop invoicing.

VAT returns are monthly for businesses with taxable turnover above SAR 40 million a year and quarterly for others, due by the last day of the following month. With invoices and entries in one system, preparing the return takes hours rather than days.

Penalties: What to Know

ZATCA publishes a schedule of e-invoicing violations, covering failure to issue electronic invoices, missing QR codes, deleting or altering invoices after issue, and failing to integrate on time, with penalties typically escalating from a warning to fines on repeat. Because amounts and details can change, use the schedule on ZATCA's website rather than figures quoted in articles. Separately, late VAT filing carries a penalty of 5% to 25% of the tax due, and late payment 5% of unpaid tax for each month of delay.

How Tranquil Helps

Tranquil includes e-invoicing as part of the system, compliant with Phase 1 and Phase 2, with real-time integration with ZATCA, automatic validation, and scheduled reports and deadline alerts. Invoices connect directly to accounting and finance, sales and inventory, so there is no hand-off between systems. See also our Saudi e-invoicing resource and our article on accounting software features.

Frequently Asked Questions

What is the difference between Phase 1 and Phase 2?

Phase 1, from 4 December 2021, requires invoices to be issued and stored electronically with a compliant solution. Phase 2 adds integration with Fatoora: real-time clearance of standard invoices before they are shared, reporting of simplified invoices within 24 hours, and cryptographic stamping.

How do I find out my integration date?

ZATCA notifies businesses in each wave at least six months ahead, based on VAT-able turnover in the reference years. Rely on that notice and ZATCA's announcements.

Can I cancel an e-invoice after issuing it?

No. Correct it with a credit or debit note that references the original and states the reason. The note goes through the same stamping and submission rules.

Is there a Phase 3?

ZATCA's published framework has two phases, expanding through further Phase 2 waves. Verify any new requirement against official ZATCA publications.

How long does integration take?

It depends on data quality and the number of invoicing units. The technical part can take days if the system is ready; cleaning customer and item data can take weeks. You can talk to the Tranquil team to assess your readiness.