Since ZATCA's e-invoicing rules (known as Fatoora) started in December 2021, receipts given to consumers in Saudi Arabia carry a QR code. Scan it and you see who issued the invoice and how much VAT was charged. Here is what goes into that code and how to make or check one. This is a plain-language summary; ZATCA's own documents are the authority.
Who needs the QR code
VAT-registered businesses must include a QR code on simplified tax invoices, the B2C receipts given to customers. In phase 2, standard (B2B) tax invoices carry one too.
The five fields in a basic ZATCA QR
| Tag | Field | Example |
|---|---|---|
| 1 | Seller name | Bobs Records |
| 2 | VAT registration number | 310122393500003 |
| 3 | Invoice date and time | 2022-04-25T15:30:00Z |
| 4 | Invoice total, including VAT | 1000.00 |
| 5 | VAT total | 150.00 |
How the code is encoded (TLV and Base64)
The fields are not stored as plain text. Each one is written as TLV: one byte for the tag number, one byte for the length of the value in bytes, then the value itself in UTF-8 (so Arabic seller names work). The five fields are joined and the result is encoded as Base64. That Base64 string is what the QR code holds. A common mistake is encoding the fields as JSON or plain text, which scanner apps used by inspectors won't read.
The ZATCA QR code generator builds this string for you and matches ZATCA's published sample exactly.
Phase 1 and phase 2
- Phase 1 (generation), from 4 December 2021: invoices issued electronically, with the five-field QR code on simplified invoices.
- Phase 2 (integration), rolled out in waves since 1 January 2023: businesses that ZATCA notifies must connect their invoicing system to the Fatoora platform. Every invoice is signed, and the QR code gains extra fields: the invoice hash, a digital signature, the public key and ZATCA's stamp.
If ZATCA has notified your business for phase 2, your invoices must come from a compliant, connected e-invoicing system. A five-field QR code alone isn't enough.
How to check the QR code on an invoice
- Scan the QR with any scanner app and copy the text it shows (a long string of letters, often ending in
=). - Paste it into the reader on the ZATCA QR page.
- Check the seller name, VAT number (15 digits, starting and ending with 3), date and amounts. The reader also says whether the phase 2 signature fields are present.
Working out the VAT figure
Tag 5 must be the VAT on the invoice. For a VAT-inclusive total at 15%, divide by 1.15 to get the net amount. The Saudi VAT calculator does this to the halala and passes the figures to the QR tool.
Frequently asked questions
What time zone should the invoice time use?
The timestamp is written in ISO 8601 format. The ToolPeasy generator converts your local time to UTC and marks it with Z, which is unambiguous.
Can the seller name be in Arabic?
Yes. Values are UTF-8, so Arabic names encode correctly, as long as each field stays under 255 bytes.
Is a ZATCA QR code the same as a payment QR?
No. It only shows invoice details for verification; it can't be used to pay.