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