ZATCA Outage & Invoice Submission Failure Protocol (2027 SOP)
Operational SOP for Saudi businesses when ZATCA Fatoora returns HTTP 503, 429 rate limits, or submission failures: B2C 24-hour retry queues, B2B clearance fallback, and PIH safety.
Summarize or verify this guide with AI:
Opens your preferred AI assistant with this article and ZATCA compliance context pre-loaded.
Direct Answer: Operational SOP for ZATCA Outages & Failed Submissions
Golden Rule During Fatoora Errors: Immediately separate transient network/gateway failures (
HTTP 5xx, timeouts,429 Rate Limit) from payload rejections (HTTP 400/422 BR-KSA-*). Never delete an invoice or skip anICVcounter during recovery.
Even well-engineered ERPs encounter branch internet drops, Fatoora maintenance windows, or burst HTTP 429 throttling. Follow this 2027 operational SOP to keep revenue moving while staying compliant with ZATCA Phase 2.
1. Quick Triage Matrix: Failure Type vs. Required Action
| HTTP / API Response | Likely Cause | Immediate Recovery Action | Modify XML? |
|---|---|---|---|
HTTP 502 / 503 / 504 or Timeout | Branch connectivity drop or transient Fatoora outage | Exponential backoff retry in strict ICV order with identical XML payload | No |
HTTP 429 Too Many Requests | Burst concurrency above Fatoora rate limit | Pace submissions via worker queue — see API-429 Fix Guide | No |
HTTP 401 Unauthorized | Expired or revoked Production CSID (PCSID) | Renew PCSID via Fatoora onboarding API, then drain queued invoices | No (re-auth) |
HTTP 400 / 422 (BR-KSA-*) | Invalid XML data (VAT ID, National Address, rounding) | Diagnose in ZATCA Error Code Directory, fix & re-sign | Yes |
2. Contingency Workflow: Simplified (B2C) vs. Standard (B2B)
A) Simplified B2C Invoices (POS & Retail)
ZATCA’s Reporting model is designed for zero checkout downtime:
- Sign every simplified invoice locally using your active
CSIDprivate key and print the 9-tag TLV QR code immediately for the customer. - Enqueue the signed XML in strict ascending
ICVsequence (101,102,103). - Drain the queue automatically once connectivity restores inside the 24-hour reporting SLA.
- For force-majeure outages lasting >24 hours, log exact outage timestamps and notify ZATCA support while flushing the backlog immediately upon recovery.
B) Standard B2B & B2G Invoices (Clearance)
- Hold the document in
Pending Clearance—do not email or WhatsApp an uncleared B2B tax invoice to the buyer. - Automatically retry clearance on a backoff schedule using the exact same invoice ID and ICV.
- Once Fatoora returns
CLEARED, embed the cleared XML into the finalPDF/A-3and dispatch automatically.
3. Protecting PIH Hash Chaining & ICV Sequence Integrity
- Single-Writer FIFO Queue per EGS Unit: Never transmit Invoice
#102before#101clears or reports, or you riskPIHhash-chain breaks. - Idempotent Retries on Timeouts: If a timeout happens mid-flight, check ZATCA’s duplicate/warning response before generating a replacement document.
- Local Pre-Submission Validation: Run local
BR-KSAvalidation before queueing—debug any rejected XML instantly in our free ZATCA XML Validator & Viewer or review our Top 15 ZATCA Rejection Errors Troubleshooting Guide.
Automated Outage Resilience in Qeemah Cloud
Qeemah Cloud removes manual API babysitting for finance and store teams:
- Order-Preserving Retry Queues: Automatically recovers from
503and429spikes without breakingICV/PIHorder. - Live ZATCA Compliance Dashboard: Displays
Cleared,Reported,Pending, andRejectedstatuses with plain-language fixes. - Offline-Resilient Cloud POS: Cashiers keep issuing signed B2C receipts during internet drops and sync seamlessly once back online.
Frequently Asked Questions
What should POS cashiers do if internet or ZATCA Fatoora goes down during B2C sales?
Do not halt checkout. Continue issuing locally signed B2C simplified invoices containing your CSID cryptographic stamp and 9-tag TLV QR code, queue them strictly in ICV/PIH order, and automatically report batches once connectivity returns within the 24-hour window.
Can we send an uncleared B2B tax invoice to a customer during a Fatoora outage?
No. Standard B2B/B2G tax invoices require real-time Fatoora clearance before legal issuance. Keep the invoice queued in Pending Clearance status and automatically retry until ZATCA returns CLEARED with its cryptographic stamp.
Should we delete a failed invoice in our ERP and issue a new number?
Never delete an invoice once an ICV and PIH hash have been assigned—doing so breaks the cryptographic chain for all subsequent invoices. Fix the underlying validation issue and resubmit, or issue a Credit Note (381) for already-accepted documents.