The QR code on a Saudi e-invoice — what it carries and why it exists
The small square on a Saudi invoice is not decoration: it is the invoice's encoded summary, readable and checkable by any phone. This guide explains what the code carries on a simplified invoice, how its source changes in Phase 2, and why some printed codes fail to scan.
What is inside a simplified invoice's code?
The code encodes five data items in a structured format (TLV — each item tagged and length-marked): the seller's registered name, their VAT registration number, the invoice date and time, the invoice total including VAT, and the VAT amount itself. A phone reads the five fields and displays them, so the code can be matched against the paper carrying it — if a number or amount differs, the invoice is not what it claims to be.
The code began in Phase 1 (the generation phase), when invoices were produced electronically without live connection. Its presence on a printed invoice from a connected system is what separates it from an ordinary receipt — and its absence from a consumer invoice is a sign the issuing system is not where it should be.
What changes in Phase 2?
In the integration phase the code is no longer built from invoice data alone: it is derived from the cryptographic stamp the invoice receives on clearance (for business tax invoices) or reporting (for simplified ones). The code thereby ties the invoice to its record at ZATCA — the code on a cleared invoice carries the trace of that clearance itself, not merely a summary the seller typed.
That is why a non-integrated system cannot produce a valid Phase 2 code however similar the paper looks. The CSID explainer shows how the stamp is built, and the invoice-fields guide shows the two templates the code sits on.
Why does a code fail to scan?
The causes are more practical than technical: a code printed too small or faded after the invoice was photocopied twice; a code generated by a Phase 1 system on an invoice claiming Phase 2; or missing fields in the encoded data because the firm's base data — registered name or VAT number — is wrong in the system at source.
The simplest test is in your hand: scan your own issued invoices with your phone before a customer does. If the phone reads it and shows the right figures, the code is sound; if not, the problem is in your system today, cheaper than a customer or an inspector finding it tomorrow.
Keep reading
Guides
Plain answers for small trade firms in the UAE and Saudi Arabia: chasing payment, retention, VAT invoices, deposits…
Read →Contractor quote format (Saudi)
What a strong contractor quote contains in Saudi Arabia: measured items, exclusions, a payment schedule, the advanc…
Read →Advances & payment schedules
How the advance payment works in Saudi contracts, how it is recovered through mustakhlasat, and how to build a sche…
Read →Chasing payment (Saudi)
Why a Saudi contractor's payment stalls at certification, not the due date — following a mustakhlas through the app…
Read →Asked often, answered straight.
What does the QR code on a Saudi invoice contain?+
On a simplified invoice: five TLV-encoded fields — the seller's registered name, VAT number, timestamp, total including VAT, and the VAT amount. In Phase 2 the code is derived from the invoice's cryptographic stamp after clearance or reporting.
Is the QR code required on every invoice?+
Simplified (consumer) invoices have carried it since Phase 1. In Phase 2, standard tax invoices carry a code derived from their cryptographic stamp — the code is part of the integrated invoice either way.
I am looking for a ZATCA QR generator — is this it?+
This guide explains the code; it does not generate one. A valid code is produced by an invoicing system actually connected to the platform as part of issuing the invoice itself; a separate generator pasting a code onto a page does not make the invoice compliant.
How does a customer verify my invoice?+
By scanning the code with a phone camera or verification app: the encoded fields appear and can be matched against the printed invoice — name, VAT number, total and tax.