BOT Solutions

Live sandbox · requests hit real ZATCA clearance

Sandbox Playground

Edit the request on the left and press Send — this fires a real call to the sandbox at and clears the invoice with ZATCA. Nothing here is simulated. Change external_invoice_id before resending the same example twice; it's the API's idempotency key.

— unchecking sets "include_xml": false in the request below

Request

POST
Uses the credentials above

Response

Not sent yet
 
Response will appear here after you send a request.

What if ZATCA itself is down?

This isn't something you can trigger from this page on demand — the sandbox shares its timeout setting across everyone testing it, so we don't let visitors shorten it live. Instead, here's a real response we captured during an actual forced-timeout test against this same sandbox, so you know exactly what to expect.

What you'd receive

Real captured example HTTP/1.1 502 Bad Gateway { "error": "ZatcaUnavailable", "message": "ZATCA did not respond in time", "external_invoice_id": "POS-2026-00451", "erp_invoice": "ACC-SINV-2026-00123", "retry": "hourly batch retries automatically; poll invoice_status" }

What happens next

  1. Your invoice was already created in ERPNext before the ZATCA call — that part never depends on ZATCA being up.
  2. You get this 502 back within seconds, not left hanging on a long timeout.
  3. Nothing is lost or duplicated. The invoice sits ready to send.
  4. A background job retries automatically, once per hour — no action needed from you.
  5. Poll GET invoice_status any time to check; once ZATCA responds you get the full normal result.
  6. You never need to resubmit the same invoice, however long the outage lasts.