When e-invoicing began in Saudi Arabia, QR codes started appearing on receipts and invoices across the Kingdom. Many businesses added one to their invoice template because they were told it was required, without knowing what it should contain. Some generated a QR that simply linked to their website. Others encoded the invoice number in plain text. Neither meets the requirement. The QR code on a Saudi tax invoice has a specific structure, and its purpose is verification.

What's inside: TLV encoding

The ZATCA QR code contains data encoded in a format called TLV — Tag, Length, Value. Each piece of information is stored as a tag number identifying the field, the length of the value, and the value itself. The sequence is then encoded in Base64 to produce the string that becomes the QR image.

For the first phase of e-invoicing, five fields were required:

  • Tag 1: seller's name.
  • Tag 2: seller's VAT registration number.
  • Tag 3: invoice timestamp (date and time).
  • Tag 4: invoice total including VAT.
  • Tag 5: VAT total.

In the integration phase, additional tags carry cryptographic information: the hash of the invoice XML, the digital signature, the public key, and for simplified invoices, the signature of the cryptographic stamp issued by ZATCA. These additions are what link the printed invoice to the electronically signed original.

Why buyers and inspectors care

The QR allows anyone with a compatible reader — including ZATCA's own verification app — to scan the invoice and see the seller, VAT number, date, total, and VAT amount. If those don't match what's printed, something is wrong. In the integration phase, the cryptographic elements allow verification that the invoice hasn't been altered since it was signed.

For buyers, this matters when claiming input VAT. A business that receives an invoice with an invalid or missing QR may face questions about whether the input VAT is recoverable. For inspectors, the QR provides a fast first check during field visits: scanning a sample of receipts at a point of sale shows immediately whether invoicing is compliant.

Simplified versus standard invoices

The QR plays a slightly different role depending on the invoice type. Simplified invoices — issued to consumers, typically at point of sale — must carry a QR generated by the seller's compliant solution at the moment of issue, including the cryptographic stamp elements. These invoices are reported to ZATCA afterward, so the QR is the buyer's main verification tool.

Standard invoices — issued to VAT-registered businesses — go through clearance in the integration phase. ZATCA validates the invoice and returns it, and the cleared invoice includes the QR. The QR therefore reflects an invoice that ZATCA has already accepted.

Common mistakes

Several problems appear repeatedly when we review invoicing setups:

QR codes that encode a URL or plain text instead of TLV data. Seller names that don't match the VAT registration exactly, including Arabic spelling. Timestamps in the wrong format or time zone. Totals in the QR that don't match the printed totals because of rounding differences or discounts applied after generation. And QR codes that are too small or low-resolution to scan reliably on thermal receipts.

Each of these can be avoided when the QR is generated by the invoicing system from the same data as the invoice, rather than added separately by a template or third-party tool.

Testing your own invoices

A quick self-check is worthwhile: scan a few of your recent invoices with ZATCA's verification app or a TLV decoder and confirm that each field matches the printed invoice. If you're in the integration phase, confirm that cryptographic tags are present and that the invoice status in your ERP shows successful clearance or reporting.

Odoo's Saudi localization generates ZATCA-compliant QR codes from invoice data, including integration-phase cryptographic elements, and prints them on invoice and POS receipt layouts. Because the QR is built from the same record as the invoice, the data stays consistent.

If you're not sure what your invoice QR actually contains, request a quote and we'll help you check and correct it.