Official text
Previous invoice hash (KSA-13) must exist in an invoice.Warning · Source: ZATCA E-Invoicing SDK 238-R3.3.8 · Electronic Invoice XML Implementation Standard v1.2, 19 May 2023, §13.3.1, p. 58 · Checked: 26 October 2026
What it means
Every invoice must carry the PIH reference, even the first one on a device (which carries the fixed value ZATCA published).
When it happens
- The first invoice after onboarding, and the system does not know the starting value.
- The system lost the last invoice hash after a reinstall or a data wipe.
How to fix it
- For the first invoice, use the fixed value given in the text of rule
BR-KSA-26. - Store each invoice's hash after it is accepted, somewhere that survives a reinstall.
- Add the PIH reference to every invoice and note.
Example
<cac:AdditionalDocumentReference> <cbc:ID>ICV</cbc:ID> <cbc:UUID>10</cbc:UUID> </cac:AdditionalDocumentReference> <!-- no PIH reference -->
<cac:AdditionalDocumentReference>
<cbc:ID>ICV</cbc:ID>
<cbc:UUID>10</cbc:UUID>
</cac:AdditionalDocumentReference>
<cac:AdditionalDocumentReference>
<cbc:ID>PIH</cbc:ID>
<cac:Attachment>
<cbc:EmbeddedDocumentBinaryObject mimeCode="text/plain">NWZlY2Vi…</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-61. 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
- BR-KSA-26 Previous invoice hash (PIH) is in the wrong form
- BR-KSA-33 Invoice counter (ICV) is missing
- BR-KSA-56 Credit or debit note without the original invoice number
Terms on this page
Frequently asked questions
What does BR-KSA-61 mean?
Every invoice must carry the PIH reference, even the first one on a device (which carries the fixed value ZATCA published).
Is the invoice rejected when BR-KSA-61 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-61?
1. For the first invoice, use the fixed value given in the text of rule BR-KSA-26. 2. Store each invoice's hash after it is accepted, somewhere that survives a reinstall. 3. Add the PIH reference to every invoice and note.
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.