BR-KSA-27: QR code is missing from the invoice

A warning: the invoice is accepted with a note; fix the cause in the next invoices.

Official text

The document must contain a QR code (KSA-14), and this code must be base64Binary.

Warning · Source: ZATCA E-Invoicing SDK 238-R3.3.8 · Electronic Invoice XML Implementation Standard v1.2, 19 May 2023, §13.3.1, p. 54 · Checked: 26 October 2026

What it means

The invoice file must carry the QR code inside it, Base64 encoded with type text/plain. The code is a TLV string holding the seller name, VAT number, time, amounts, hash and signature.

When it happens

How to fix it

  1. Build the code after signing, since its last fields take the hash and signature.
  2. Put it in AdditionalDocumentReference with the ID QR.
  3. Try the code in our free QR generator to check the first five fields.

Example

Wrong: raises BR-KSA-27
<cac:AdditionalDocumentReference>
  <cbc:ID>QR</cbc:ID>
  <cac:Attachment>
    <cbc:EmbeddedDocumentBinaryObject mimeCode="text/plain"></cbc:EmbeddedDocumentBinaryObject>
  </cac:Attachment>
</cac:AdditionalDocumentReference>
Correct
<cac:AdditionalDocumentReference>
  <cbc:ID>QR</cbc:ID>
  <cac:Attachment>
    <cbc:EmbeddedDocumentBinaryObject mimeCode="text/plain">ARlBbCBTYWxhbSBTdXBwbGllcy…</cbc:EmbeddedDocumentBinaryObject>
  </cac:Attachment>
</cac:AdditionalDocumentReference>

We ran the wrong example through ZATCA's SDK 238-R3.3.8 on 26 October 2026 and it raised BR-KSA-27, along with BR-CL-KSA-14, BR-KSA-28, BR-KSA-30. The example is an excerpt of ZATCA's sample Simplified/Invoice/Simplified_Invoice.xml with one change; the sample without it does not raise the code.

Related codes

Terms on this page

Frequently asked questions

What does BR-KSA-27 mean?

The invoice file must carry the QR code inside it, Base64 encoded with type text/plain. The code is a TLV string holding the seller name, VAT number, time, amounts, hash and signature.

Is the invoice rejected when BR-KSA-27 appears?

A warning: the invoice is accepted with a note; fix the cause in the next invoices. This is its severity in ZATCA's SDK 238-R3.3.8.

How do I fix BR-KSA-27?

1. Build the code after signing, since its last fields take the hash and signature. 2. Put it in AdditionalDocumentReference with the ID QR. 3. Try the code in our free QR generator to check the first five fields.

Last updated: 26 October 2026 · What we don't do · Methodology · Correct us · Changelog

First published 2026-10-26 · Archived copy

First 500 restaurants, cafés, bakeries and sweet shops: a SAR 99 monthly cap.

Instead of SAR 149, per branch, for a full year. Free to join, no commitment.

Reserve your seat