AI & software development · Jeddah · Dubai · Karachi
Get a quote

Saudi Arabia

ZATCA e-invoicing: what your billing software needs to do

A plain-language checklist of what ZATCA e-invoicing asks of billing and point-of-sale software in Saudi Arabia, for finance and IT teams.

E-invoicing in Saudi Arabia is not a PDF sent by email. ZATCA, the Zakat, Tax and Customs Authority, sets rules for how an invoice is created, what it contains and how it reaches the authority. If your billing or point-of-sale system does not follow them, the invoice is not valid.

This checklist explains those rules in plain language, so a finance or IT team can check its own software. ZATCA updates its guidance, so confirm the details that apply to your company on the ZATCA website before you build.

The two phases

Phase 1, generation. Since 4 December 2021, every VAT-registered business must issue invoices from an electronic system. Handwritten invoices and invoices typed in a word processor are not accepted. The system must store invoices and stop them from being changed or deleted.

Phase 2, integration. From 1 January 2023, ZATCA has been bringing businesses in by groups, based on revenue. In this phase your system connects to ZATCA’s platform, called Fatoora, and sends invoices to it. ZATCA notifies each group in advance of its date.

Most of the work is in Phase 2.

Two kinds of invoice, two routes

  • Standard tax invoice (business to business). The invoice goes to ZATCA first. ZATCA checks it, stamps it and returns it. Only then do you give it to your customer. This is called clearance.
  • Simplified tax invoice (business to consumer, such as a shop receipt). You give it to the customer at once and report it to ZATCA within 24 hours. This is called reporting.

Your software has to know which kind each invoice is and send it by the right route. Credit notes and debit notes follow the same rules as the invoice they correct.

What every invoice must carry

  1. The right format. XML that follows the UBL 2.1 standard, or a PDF/A-3 file with that XML inside it.
  2. A unique identifier (UUID) for each invoice.
  3. An invoice counter that goes up by one and never resets.
  4. The hash of the previous invoice. Each invoice is linked to the one before it, so a missing or changed invoice can be detected.
  5. A QR code with the seller, the VAT number, the time, the totals and the cryptographic data.
  6. A cryptographic stamp, which is a digital signature that proves where the invoice came from.
  7. Arabic. Invoice content must be available in Arabic. Many businesses print Arabic and English side by side.

What the system itself must do

  • Onboard each device or unit with ZATCA. Every system that issues invoices registers through the Fatoora portal and receives a certificate, first for compliance testing and then for production.
  • Never allow an issued invoice to be edited or deleted. Corrections are made with credit and debit notes.
  • Keep the counter and the hash chain safe, including after a crash or a restore from backup.
  • Handle rejection. If ZATCA rejects a standard invoice, the user needs to see why and be able to fix and resend it.
  • Work when the connection drops. A point of sale cannot stop selling. Simplified invoices are queued and reported when the connection returns, within the 24-hour limit.
  • Keep records of what was sent and what ZATCA answered.

Where projects go wrong

From our own integration work, the format is rarely the hard part. The problems are usually these:

  • More than one place issues invoices. A cashier desk, a pharmacy counter and a back-office screen each need to be onboarded and to follow the same rules.
  • Old data. Customer records without a VAT number or a proper address fail validation for standard invoices.
  • Corrections. Staff who are used to editing an invoice need a new habit: issue a credit note.
  • Backups. A restore that brings back an old counter breaks the chain.

A checklist for your team

  1. Do we know our Phase 2 date and group?
  2. Does our system produce UBL 2.1 XML with a UUID, counter, previous hash, QR code and stamp?
  3. Does it send standard invoices for clearance and report simplified ones within 24 hours?
  4. Is every device or unit that issues invoices onboarded on Fatoora?
  5. Are edit and delete blocked on issued invoices, with credit and debit notes in their place?
  6. What happens when the internet or ZATCA’s platform is unavailable?
  7. Is our customer data complete enough to pass validation?

If the answer to any of these is “not sure”, that is where to start.

Meezotech has connected a healthcare billing and point-of-sale system to ZATCA alongside health insurance approvals. You can read that case study, see our custom software work in Saudi Arabia, or ask us to review your system.

More on: Saudi Arabia All articles

Have a project in mind?

Tell us what you need. You get a scoped estimate and a proposed team within 48 hours.

Get a quote