Validate a ZATCA XML file for free · ZATCA error codes
ZATCA BR-KSA-27: QR code (KSA-14) missing
BR-KSA-27 · Warning
[BR-KSA-27]-The document must contain a QR code (KSA-14), and this code must be base64Binary.
The official rule: the document must contain a QR code (KSA-14), and this code must be base64Binary.
In UBL this is an AdditionalDocumentReference whose cbc:ID is QR, with a cbc:EmbeddedDocumentBinaryObject holding the TLV-encoded QR payload. The payload and cryptographic stamp are produced by a ZATCA-onboarded EGS (for simplified invoices, at signing) or returned after clearance (for standard tax invoices). A file that has not been signed or cleared has no official QR; that is why Valifakt drafts leave the QR out and this warning appears on those drafts.
Use the Fatoora Phase 2 checker to decode a QR that is already in a file and compare tags with the invoice. This page is not tax advice, and Valifakt is not an onboarded EGS — it cannot issue a production QR or stamp.
Why does a Valifakt draft fail this rule?
Because the official rule requires a QR, and drafts are unsigned test files without a stamp or QR. That is expected until your EGS signs or clears the invoice.
What encoding is required?
The official text: base64Binary. The usual content is the ZATCA TLV structure, then base64-encoded.
Where do I get a real QR?
From your ZATCA-onboarded e-invoicing solution, or from the cleared XML Fatoora returns for a standard tax invoice.
Related ZATCA rules
- BR-KSA-03 – Invoice UUID (KSA-1) missing or invalid
- BR-KSA-08 – Seller identification (BT-29) missing or wrong scheme
- BR-KSA-26 – Previous invoice hash (PIH, KSA-13) is not base64 SHA-256
- BR-KSA-39 – Seller VAT number (BT-31) missing
- BR-KSA-40 – Seller VAT number (BT-31) is not 15 digits starting and ending with 3
- BR-KSA-04 – Invoice issue date (BT-2) is in the future or invalid
- BR-KSA-06 – Invoice transaction code (KSA-2) missing or invalid
- BR-KSA-17 – Credit or debit note missing the reason (KSA-10)
Validate a ZATCA XML file for free Pricing
Not tax advice. Valifakt is not a ZATCA-onboarded e-invoicing solution (EGS). Official rule text is quoted from the ZATCA SDK validation-rules XSL.