Every simplified tax invoice must carry a QR code from Phase 1, encoding basic invoice and seller data. In Phase 2, the QR code carries 9 tags in TLV Base64 format, adding security data such as the invoice hash and cryptographic signature. For tax invoices (B2B) in Phase 2, the QR code is generated by ZATCA during clearance and you print it on the invoice. Customers can scan the QR code with ZATCA’s VAT app to verify the invoice.
Which invoices need a QR code?
| Invoice | Phase 1 (generation) | Phase 2 (integration) |
|---|---|---|
| Simplified tax invoice (B2C) and its notes | Mandatory, with basic invoice and seller information | Mandatory, 9 tags (TLV Base64), generated by your solution |
| Tax invoice (B2B/B2G) and its notes | Not mandated by the Phase 1 rules | Mandatory on the invoice; the QR value is generated by ZATCA at clearance |
Many businesses already print a QR code on all invoices in Phase 1. It helps customers and is ready for Phase 2.
Phase 1 QR code contents
The Phase 1 QR code contains basic data, encoded in TLV (tag-length-value) and Base64:
- Seller’s name
- Seller’s VAT registration number
- Invoice date and time (timestamp)
- Invoice total including VAT
- VAT total
Phase 2 QR code contents
The Phase 2 QR code keeps the five Phase 1 fields and adds the security elements defined in ZATCA’s Security Features Implementation Standard, for a total of 9 tags:
- Hash of the XML invoice
- Cryptographic (ECDSA) signature
- Public key of the e-invoicing unit
- ZATCA’s signature of the cryptographic stamp (for simplified invoices)
ZATCA’s technical specifications are the reference for developers. Your e-invoicing solution should produce the QR code automatically, never by hand.
Who generates the QR code?
- Simplified invoices: your e-invoicing solution generates and stamps the QR code before giving the invoice to the customer.
- Tax invoices in Phase 2: your solution sends the invoice for clearance; ZATCA returns the QR code string with its stamp, and you print that QR code on the human-readable invoice.
How customers verify a QR code
ZATCA’s guideline describes the steps:
- The customer scans the e-invoice QR code with ZATCA’s VAT app.
- The app checks that the QR code content is compliant.
- The app shows the QR code data and the verification result.
Practical tips
- Print the QR code large and clear enough to scan (around 2–3 cm or more).
- The seller name in the Phase 2 QR code must match the seller name in the XML.
- Don’t create QR codes in a separate design tool. They must come from the invoice data.
- Check one invoice per month with the VAT app.
LUBA ERP prints the Phase 1 QR code on every invoice and uses the cleared QR code returned by ZATCA in Phase 2. See LUBA ERP ZATCA e-invoicing software or go back to the ZATCA e-invoicing rules guide.
Sources
Frequently asked questions
Is a QR code mandatory on invoices in Saudi Arabia?
Yes for simplified tax invoices from Phase 1. In Phase 2, both simplified and standard tax invoices carry a QR code; for standard invoices it is generated by ZATCA at clearance.
What information is in the ZATCA QR code?
Phase 1: seller name, VAT number, invoice timestamp, total including VAT and VAT total. Phase 2 adds security fields such as the invoice hash, cryptographic signature and public key, for 9 tags in total.
What format is the ZATCA QR code?
The data is encoded in TLV (tag-length-value) and Base64, as defined in ZATCA’s Security Features Implementation Standard.
Who creates the QR code on a B2B invoice in Phase 2?
ZATCA generates the QR code string during clearance and returns it with the cleared invoice. You print it on the invoice you share.
How can a customer check an invoice QR code?
By scanning it with ZATCA’s VAT app, which verifies the QR code content and shows the result.
Can I add the QR code to an invoice made in Word or Excel?
No. Invoices must be generated by a compliant e-invoicing solution, and the QR code must be produced automatically from the invoice data.
