What is the QR code on an e-invoice?
The QR code on a simplified tax invoice is not decoration — it is a regulated data field. The Zakat, Tax and Customs Authority requires it to carry the invoice's core data encoded in TLV (tag, length, value) and then converted to Base64, so that any inspector or customer can scan it and verify the invoice on the spot.
The five fields and their specification
The tag order is fixed, and changing it makes the code unreadable to the Authority:
| Tag | Field | Example |
|---|---|---|
| 1 | Seller name | Al Nukhba Trading Establishment |
| 2 | The seller's VAT number | 300000000000003 |
| 3 | Invoice date and time(ISO 8601) | 2026-07-25T14:30:00Z |
| 4 | Total including VAT | 115.00 |
| 5 | The VAT amount | 15.00 |
Each field is encoded as a byte for the tag, a byte for the value's length, then the value itself encoded in UTF-8. The five fields are packed one after another, then the whole result is converted to Base64 — which is what you see in the output box above.
The difference between the Phase 1 and Phase 2 codes
The Phase 1 code stops at the five fields. A Phase 2 invoice adds three fields that cannot be generated by hand: the hash of the invoice XML, the digital signature (ECDSA), and the certificate's public key. All three are derived from the business certificate issued by the Authority, which is why no tool on the internet — this one or any other — can generate a valid Phase 2 code.
Common mistakes that invalidate the code
- Writing the date in a local format instead of ISO 8601 — the most common cause of failed verification.
- Putting the total before VAT in tag 4; what is required is the total including VAT.
- Adding a currency symbol inside the numeric value — the figures are written bare.
- Encoding Arabic text in something other than UTF-8, which makes the seller name come out garbled when scanned.
- Changing the tag order — the order is part of the specification, not a matter of judgement.
How to verify the code after generating it
Scan it with the official Fatoora app from the Authority: it decodes the code and shows the five fields in readable form. Any ordinary QR reader will show the Base64 text as it is — which is itself proof that the encoding was done correctly.