ZATCA QR code checker for Saudi tax invoices

Use this ZATCA QR code checker to read the QR code on a Saudi tax invoice. Paste the QR text or upload a photo to see the fields and format checks.

Updated

On this page (5)

Use this free tool to see what a Saudi tax invoice's QR code contains. Paste the text from a QR scanner or upload a photo. The checker decodes tags 1 to 9, checks the format of tags 1 to 5 and reports which of tags 6 to 9 are present. Everything runs in your browser. Nothing you type or upload is sent anywhere.

Check a ZATCA invoice QR code

Paste the long Base64 text shown by a phone QR scanner.

This runs in your browser. Nothing you type or upload is sent anywhere.

What a ZATCA QR code contains

ZATCA uses a Tag-Length-Value (TLV) format for invoice QR codes. The data is encoded as Base64 text. Each field has a one-byte tag, a one-byte length and a value. Tags 1 to 5 hold UTF-8 text.

The ZATCA Security Features Implementation Standards, version 1.2, section 4, defines these fields.

TagFieldWhat it contains
1Seller nameThe seller's name
2Seller VAT numberThe seller's VAT registration number
3Time stampThe invoice date and time in ISO 8601 format
4Invoice totalThe total amount including VAT
5VAT totalThe total VAT amount
6Invoice hashThe cryptographic hash of the XML invoice
7Digital signatureThe ECDSA signature of the invoice hash
8Public keyThe ECDSA public key
9ZATCA stamp signatureZATCA's signature of the cryptographic stamp, for simplified tax invoices and their notes

Tags 1 to 5 have applied since 4 December 2021. Tags 6 to 9 apply from 1 January 2023. Tag 9 is used only for simplified tax invoices and their associated notes.

Phase 1 required a QR code on simplified tax invoices. Phase 2 adds cryptographic information to support the integration requirements.

How to read the ZATCA QR code checker results

The checker reads the fields found in the QR code and checks their structure. It shows the invoice details, then the format checks, then a table of all decoded fields.

Each check has one of four statuses:

StatusMeaning
PassedThe field or format meets the rule being checked
CheckSomething needs your attention or further review
FailedA required field is missing or a format rule was not met
NoteAdditional information about the result

A passed check means that the particular field passed the checker's rule. It does not mean ZATCA has accepted the invoice.

Phase 1 and Phase 2 fields

If the QR code has none of tags 6 to 8, the checker reports it as a Phase 1 QR code. Those fields contain the seller details, time stamp and amounts, but not the cryptographic information required for Phase 2.

A Phase 2 QR code includes the invoice hash, signature and public key in tags 6 to 8. Tag 9 applies to simplified tax invoices and their notes.

The checker also identifies missing, repeated or unknown tags. These results help you locate a format problem before reviewing the signed XML.

Read more about the difference in Phase 1 and Phase 2 QR codes.

VAT amounts and percentages

The checker compares the VAT total with the amount before VAT. A result other than 15% deserves a look, but it does not automatically mean the invoice is wrong.

For example, zero-rated or mixed lines can change the VAT share of an invoice. Review the invoice lines and their tax treatment before treating a percentage difference as an error.

The checker also checks whether the total and VAT values are plain numbers and whether the VAT total exceeds the invoice total.

QR length and field format

ZATCA limits the encoded Base64 text to 700 characters. The checker reports when the text exceeds that limit.

It also checks the TLV structure, the seller VAT number format and the ISO 8601 time stamp. A code may contain readable values while still having a missing tag or an incorrect field layout.

What the QR code checker cannot confirm

Reading a QR code is a format check. It cannot establish that an invoice's cryptographic signature is valid or that ZATCA accepted the invoice.

Those checks require the signed XML invoice and ZATCA's response.

The QR code may contain an invoice hash, a digital signature and a public key. Their presence tells you which data is included, but the checker does not verify the signature against the signed document.

For Phase 2, simplified tax invoices must be reported to ZATCA within 24 hours. Standard tax invoices must be cleared before they are given to the buyer. The QR code alone does not tell you whether either step has succeeded.

How Raseedo creates QR codes for WooCommerce invoices

Raseedo is a WordPress plugin for Saudi e-invoicing in WooCommerce. The free plugin creates a signed UBL 2.1 XML simplified tax invoice when an eligible order reaches Processing or Completed.

Each invoice includes a QR code with ZATCA's TLV fields, including the invoice hash and digital signature. Raseedo reports the invoice to ZATCA in the background and stores the signed XML, ZATCA status and validation messages on your WordPress site.

Your customer can open a bilingual Arabic and English invoice page through their WooCommerce order page or order email. The invoice page shows the QR code alongside the invoice details.

See Arabic and English invoices for how the customer invoice page works.

Frequently asked questions

Can this checker confirm that my invoice is valid?

It can check the QR code's fields and format. It cannot verify the cryptographic signature or confirm ZATCA's acceptance. You need the signed XML and ZATCA's response for those checks.

Why does my QR code have only five tags?

Tags 1 to 5 contain the seller name, VAT number, time stamp, invoice total and VAT total. These were the fields required for Phase 1. Phase 2 adds tags 6 to 8 for the cryptographic information, plus tag 9 for simplified tax invoices and their notes.

Is a QR code required on every Saudi tax invoice?

Under Phase 1, simplified tax invoices must carry a QR code, while it is optional for standard tax invoices. Phase 2 has additional QR code requirements, including the cryptographic fields used in the integration process.

Create ZATCA invoices in WooCommerce

Download the free Raseedo plugin to issue signed XML invoices with QR codes and report them to ZATCA.