Rule BR-KSA-26 in Saudi e-invoicing
The previous invoice hash must be a base64 SHA-256 computed the standard's way.
Steps: remove UBLExtensions, the QR reference and cac:Signature; canonicalize with C14N11; SHA-256 to bytes; base64. The first document uses a fixed value, the base64 of the hexadecimal hash of "0".
The XML standard does not say which rules are errors and which are warnings; this classification is not confirmed by an official document.
| Identifier | BR-KSA-26 |
|---|---|
| Effect | Error: the document is rejected |
| Applies to | Standard tax invoice and Simplified tax invoice |
In JooDax
BuiltThe programs cut the three blocks from the text and drop the declaration, with no C14N engine, because they write the document in canonical form to begin with (decision D-01); the genesis value matches the standard exactly.
crates/jdx-einvoice-sa/src/xml.rs
Fields it checks
Other rules on the same fields
- BR-KSA-61 · Every document must contain the previous invoice hash.
Validation rules — E-invoicing in Saudi Arabia (FATOORA)
Sources
- Electronic Invoice XML Implementation Standard to the E-Invoicing resolution dated 2023-05-19 (v1.2) — ZATCA
- Security Features Implementation Standards to the E-Invoicing resolution dated 2023-05-19 (v1.2) — ZATCA
Checked on: 4 November 2026. What concerns JooDax is taken from the programs’ own code.