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.

Official rule text: ZATCA e-invoice validation rules (official SDK XSL, 20210819).

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

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.