ZATCA e-invoice QR (Saudi FATOORA)

ZATCA (Zakat, Tax and Customs Authority) of Saudi Arabia mandates a QR on every tax invoice issued in the Kingdom. Phase 1 is simplified TLV; Phase 2 adds cryptographic sealing via integration with the FATOORA platform. Non-compliant invoices are refused by the buyer's accounting software and invalid for VAT reclaim.

Canonical spec: ZATCA E-Invoicing Resolution & Implementing Regulations — current through 2026.
Phase 1 (Generation): in effect since 4 December 2021. All VAT-registered businesses must issue digital invoices with the QR.
Phase 2 (Integration): rolling out by business-size wave since 1 January 2023. Adds digital signature + ZATCA clearance for standard invoices and real-time reporting for simplified invoices.

What it is

The QR encodes a Base64 string. Decode the Base64 to get a binary TLV sequence with 5 mandatory fields in fixed order:

TagFieldTypeNotes
01Seller nameUTF-8 stringCommercial name of the seller. Arabic and Latin both accepted.
02VAT registration number15 digitsStarts with 3 for Saudi entities. Format: 3XXXXXXXXXXXXX3.
03Invoice timestampISO 8601e.g. 2026-04-18T10:30:00Z. Must include timezone.
04Invoice total (with VAT)Decimal stringe.g. 115.00. Currency is implicitly SAR.
05VAT amountDecimal stringe.g. 15.00. Currently 15% standard rate.
06Invoice hash (Phase 2)Base64 SHA-256SHA-256 of the canonical invoice XML.
07Digital signature (Phase 2)Base64ECDSA over the invoice hash using the seller's CSID certificate.
08Public key (Phase 2)Base64 X.509Seller's ECDSA public key (from the CSID).
09ZATCA stamp (Phase 2)Base64ZATCA's countersignature. Present only after ZATCA clearance.

Each TLV record is 1 tag byte + 1 length byte + <length> value bytes. The whole sequence is then Base64-encoded to become the QR payload.

Phase 1 (simplified) vs Phase 2 (integration)

AspectPhase 1Phase 2
QR contentTags 01–05 onlyTags 01–05 plus 06, 07, 08, optionally 09
ZATCA integrationNone — offlineReal-time API for simplified invoices, clearance flow for standard invoices
Certificates requiredNoYes — CSID (Cryptographic Stamp Identifier) issued by ZATCA
Effective date2021-12-04 (all businesses)2023-01-01 (rolling waves by revenue)
Invoice scopeB2C (simplified) + B2B (standard)B2C simplified: real-time report. B2B standard: clearance (pre-validation) before issuing.

Canonical test vectors

Example TLV (before Base64):

01 0A "Acme Saudi" 02 0F "300000000000003" 03 14 "2026-04-18T10:30:00Z" 04 06 "115.00" 05 05 "15.00"

After Base64 encoding:

AQpBY21lIFNhdWRpAg8zMDAwMDAwMDAwMDAwMDMDFDIwMjYtMDQtMThUMTA6MzA6MDBaBAYxMTUuMDAFBTE1LjAw
CaseInputsBase64 prefix
Phase 1, minimal simplifiedseller=Acme Saudi
vat=300000000000003
time=2026-04-18T10:30:00Z
total=115.00
vat_amount=15.00
AQpBY21lIFNhdWRp...
Arabic seller nameseller=شركة أكمي
vat=300000000000003
...
Seller name UTF-8-encoded inside TLV before Base64.
Phase 2 standard invoiceAll of the above plus hash=<SHA-256 Base64>
signature=<ECDSA Base64>
public_key=<X.509 Base64>
Much longer Base64. Decoders must tolerate extra tags beyond 05.

Common pitfalls

Scanner compatibility

ReaderSupportNotes
ZATCA FATOORA appNativeOfficial Ministry app; verifies Phase 2 signatures against the ZATCA PKI.
Saudi accounting software (SAP B1, Oracle, Microsoft Dynamics)Native (post-2023)Localised Saudi builds have ZATCA parsing in the AP pipeline.
iOS CameraRaw Base64Not recognised as a tax invoice. User must open the FATOORA app.
Android Camera / Google LensRaw Base64Same — no native parsing.
Third-party audit tools (PwC, KPMG, Deloitte Saudi units)NativeAudit-technology suites parse + verify Phase 2 signatures.

See also

Spec references verified 2026-04-18 (ZATCA E-Invoicing Resolution, current). Next review: 2026-07-18.