Getting 504 errors from ZATCA side

Hi, what is the health status of ZATCA server? we are constantly getting 504 “Gateway Time-out” error in the last 3 hours

Dear @Maala

Please find the below instructions on how to deal with such API response:

504 – Gateway Timeout

You should re-submit 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 by scenarios are 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 at this way until 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 from taxpayer’s side

    • In reporting API (B2C invoices), the taxpayer shares the invoice with the buyer, and then he has officially 24 hours to report 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 then taxpayer should notify ZATCA & immediately report the invoice to ZATCA.
    • In clearance API (B2B invoices), similar steps to be followed as reporting, taxpayer merchant processes transactions, shares uncleared invoice1 , keeps records of the transaction (Art. 7.5) and confirms the existing contact details of buyer, after the issue is fixed and the invoice is cleated, taxpayer re-share the cleared invoice with the buyer.

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

Thank you.