ZATCA Troubleshooting

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.

Qeemah Team • Published: • Updated: • 8 min read
ZATCA Outage & Invoice Submission Failure Protocol (2027 SOP)

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 an ICV counter 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 ResponseLikely CauseImmediate Recovery ActionModify XML?
HTTP 502 / 503 / 504 or TimeoutBranch connectivity drop or transient Fatoora outageExponential backoff retry in strict ICV order with identical XML payloadNo
HTTP 429 Too Many RequestsBurst concurrency above Fatoora rate limitPace submissions via worker queue — see API-429 Fix GuideNo
HTTP 401 UnauthorizedExpired or revoked Production CSID (PCSID)Renew PCSID via Fatoora onboarding API, then drain queued invoicesNo (re-auth)
HTTP 400 / 422 (BR-KSA-*)Invalid XML data (VAT ID, National Address, rounding)Diagnose in ZATCA Error Code Directory, fix & re-signYes

2. Contingency Workflow: Simplified (B2C) vs. Standard (B2B)

A) Simplified B2C Invoices (POS & Retail)

ZATCA’s Reporting model is designed for zero checkout downtime:

  1. Sign every simplified invoice locally using your active CSID private key and print the 9-tag TLV QR code immediately for the customer.
  2. Enqueue the signed XML in strict ascending ICV sequence (101, 102, 103).
  3. Drain the queue automatically once connectivity restores inside the 24-hour reporting SLA.
  4. 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)

  1. Hold the document in Pending Clearance—do not email or WhatsApp an uncleared B2B tax invoice to the buyer.
  2. Automatically retry clearance on a backoff schedule using the exact same invoice ID and ICV.
  3. Once Fatoora returns CLEARED, embed the cleared XML into the final PDF/A-3 and dispatch automatically.

3. Protecting PIH Hash Chaining & ICV Sequence Integrity

  1. Single-Writer FIFO Queue per EGS Unit: Never transmit Invoice #102 before #101 clears or reports, or you risk PIH hash-chain breaks.
  2. Idempotent Retries on Timeouts: If a timeout happens mid-flight, check ZATCA’s duplicate/warning response before generating a replacement document.
  3. Local Pre-Submission Validation: Run local BR-KSA validation 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 503 and 429 spikes without breaking ICV/PIH order.
  • Live ZATCA Compliance Dashboard: Displays Cleared, Reported, Pending, and Rejected statuses with plain-language fixes.
  • Offline-Resilient Cloud POS: Cashiers keep issuing signed B2C receipts during internet drops and sync seamlessly once back online.

Explore Qeemah’s ZATCA Phase 2 Engine | Book a Live Demo

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.

Recommended next steps

Share this article