PIH
Invoice hash-chaining of ZATCA e-invoicing, Phase 2.
Definition
The PIH links each invoice to the previous one, blockchain-style: the SHA-256 hash (Base64-encoded) of invoice N-1 is inserted into invoice N. An EGS's very first invoice uses a fixed seed value (the Base64 of "0"). Together with the UUID and the ICV (Invoice Counter Value), the PIH guarantees integrity and continuity of the sequence.
Origin
Defined by ZATCA in the "E-Invoicing Detailed Technical Guidelines" (Version 2, FATOORA, Nov. 2022); the hash relies on SHA-256 (FIPS 180-4).
Example in context
KSA-13 field of the ZATCA UBL XML: NWZlY2ViNjZmZmM4NmYzOGQ5NTI3ODZjNmQ2OTZjNzk= (initial Base64 PIH) for the first invoice.
Related terms
- EGS Unit — unit that computes the PIH.
- ZATCA TLV QR — encodes the invoice hash.