ERROR
ZATCA-00027 Invalid Invoice Counter Value
The Invoice Counter Value (ICV) is not sequential or contains an invalid number.
⚠️ What Causes This Error?
Common reasons why you might see ZATCA-00027
- ✗ Counter reset unexpectedly after a system restart or crash
- ✗ Duplicate counter value used for two different invoices
- ✗ Gap in counter sequence with skipped numbers
- ✗ Non-integer or negative counter value submitted
✅ How to Fix This Error
Follow these steps to resolve ZATCA-00027
1
Ensure Sequential ICV
ICV must be strictly sequential with no gaps and no duplicates.
2
Use Persistent Storage
Store the counter in a database or persistent file, never only in memory.
3
Implement Atomic Increment
Use atomic counter increment operations to prevent race conditions.
4
Check Last Accepted ICV
After a system restart, verify the last accepted ICV with ZATCA before resuming.
Fix ZATCA Errors Automatically
Qeemah validates invoices before submission and prevents ZATCA-00027 errors from happening.