ERROR
ZATCA-00024 PIH Chain Mismatch (Previous Invoice Hash)
The Previous Invoice Hash (PIH) in the current invoice does not match the hash of the last successfully reported/cleared invoice.
⚠️ What Causes This Error?
Common reasons why you might see ZATCA-00024
- ✗ Gap in invoice sequence — one or more invoices were skipped
- ✗ Hash calculation error in the EGS software
- ✗ System restart without preserving the last invoice hash
- ✗ Concurrent invoice generation creating a hash chain conflict
✅ How to Fix This Error
Follow these steps to resolve ZATCA-00024
1
Verify PIH Value
Ensure the PIH matches the SHA-256 hash of the last submitted invoice XML exactly.
2
Check for Missing Invoices
Look for any gaps in the invoice sequence that might have broken the hash chain.
3
Re-sync Hash Chain
Re-sync the hash chain with ZATCA's last accepted hash value from their API.
4
Ensure Sequential Processing
Process invoices sequentially, not in parallel, to maintain hash chain integrity.
Fix ZATCA Errors Automatically
Qeemah validates invoices before submission and prevents ZATCA-00024 errors from happening.