504 Bad Gateway

We are currently facing a 504 Bad Gateway issue with the ZATCA server. Kindly look into this matter urgently.

We are also getting lot of Bad Gateway responses. Please look into this issue..

Thanks for reaching out,

In case of power failure or internet connectivity issues, you should share the generated invoice & submit it once fixed & report failure to ZATCA, please refer to the “ e-invoicing guideline, see Section 10 for an in-depth description of ‘Failure Scenarios.’” For a more in-depth description with the details.

Also, regarding your question on what to do with the invoices if getting one of the following responses:

0 – no response,

500 – Internal Server Error

502 – Bad Gateway

503 – Service Unavailable

504 – Gateway Timeout

You should resubmit the invoices to ZATCA without changing UUID, ICV, and other identifiers, only changing such identifiers if the invoice got rejected by ZATCA when issuing a corrective invoice. A detailed description of scenarios is below:

If ZATCA’s servers are non-responsive

In reporting API (B2C invoices), the taxpayer’s solution (EGS) should be attempting to report invoices and continue in this way until a successful reported response, maintaining the official timeline of reporting, invoices to ZATCA within 24 hours of issuing. You can share the invoice with the client & report it once the service is back within 24 hours.

In clearance API (B2B invoices), the taxpayer’s solution should re-try to clear the invoice, if servers remain non-responsive, taxpayer shares uncleared invoice, keeps records of the transaction (Art. 7.5) and confirms the existing contact details of buyer, and taxpayer’s solution will continue attempting to clear the invoice and once clearance is successful, taxpayer re-share the cleared invoice with the buyer.

If failure is on the taxpayer’s side

In reporting API (B2C invoices), the taxpayer shares the invoice with the buyer. Then he has officially 24 hours to report the invoice to ZATCA. EGS can share the invoice anytime once the issue is fixed (power failure, connectivity issue, etc.). In case the taxpayer is not able to submit the invoice within 24 hours, he should inform ZATCA through the dedicated form on ZATCA’s website. Once the EGS’s function is restored, the taxpayer should notify ZATCA & immediately report the invoice to ZATCA.

In the clearance API (B2B invoices), similar steps to be followed as reporting, the taxpayer merchant processes transactions, shares the uncleared invoice, keeps records of the transaction (Art. 7.5), and confirms the existing contact details of the buyer, after the issue is fixed. The invoice is cleared, and the taxpayer re-sends the cleared invoice to the buyer.

For other scenarios, please refer to the “e-invoicing guideline,” section 10.

If you require any further assistance, please don’t hesitate to reach out to our support team via the email below.

SP mail: sp_support@zatca.gov.sa

1 Like

Now the service is down {“httpCode”:“500”,“httpMessage”:“URL Open error”,“moreInformation”:“Could not connect to endpoint”}

Same here, API returning 500 for all the document reporting…

We are continuously facing the issue with error “Server Error/500”since 2025-10-20 11:06:34.

We are also facing this issue. Time from the issue start is ‘2025-10-20 10:46:00’.

We are also facing the issue from yesterday. 504 & 500 responses

We are continuously facing the issue with error “Server Error/500”since 2025-10-20 11:06:34.