Reviewed

ZATCA Invoice Rejected? Error Codes, Warnings and How to Resubmit

What Fatoora's clearance and reporting responses mean, and how to fix a rejection without breaking your hash chain

Lavender illustration: a rejected invoice with an X badge, circular retry arrows, a server stack and a cleared QR invoice with a check

A ZATCA invoice rejected message can stop a sale cold, especially for B2B invoices that must be cleared before the buyer receives them. The good news is that ZATCA's own guidelines spell out what each response means and what to do next. This guide explains clearance and reporting outcomes, the API response codes, how to resubmit a rejected invoice without breaking your hash chain or counter, and what to do when ZATCA or your own system is down.

The Short Answer

  • There are three outcomes. ZATCA's Fatoora platform marks each submitted document as valid, accepted with warnings, or rejected. Even one error means the whole document is rejected, according to the E-Invoicing Detailed Technical Guideline.
  • A rejected standard (B2B) invoice is not a valid tax invoice. Fix the error and submit a new document with its own UUID, invoice counter value, hash and timestamp. Do not reuse the rejected invoice's counter or UUID.
  • A rejected simplified (B2C) invoice does not mean re-issuing to the customer. ZATCA's FAQ says you correct the error and report a corrected document, and the sale still goes in your VAT return.
  • Warnings are not a pass forever. A "202 accepted with warnings" document should not be resubmitted, but ZATCA says warnings may become rejections in the future and repeated warnings can be investigated, per the E-Invoicing Detailed Guidelines.
  • Outages have their own process. If your system fails, notify ZATCA through its failure notification service and clear or report everything once you are back online.

Clearance vs Reporting: Where Rejections Happen

Phase 2 (integration) sends every e-invoice to ZATCA, but in two different ways. Standard tax invoices and their credit and debit notes (B2B) go through clearance: the Fatoora platform validates the XML and, if it passes, applies ZATCA's cryptographic stamp and QR code before you share it with the buyer. Simplified tax invoices and their notes (B2C) go through reporting: you issue the invoice to the customer first, then report it within 24 hours. We cover the split in detail in our guide to simplified vs standard tax invoices.

The Detailed Technical Guideline says Fatoora checks each document against the business rules in the XML Implementation Standards, the Data Dictionary and the E-Invoicing Resolution, plus extra referential checks. Exception handling then treats some errors as warnings instead of rejecting the document.

OutcomeStandard invoice (B2B, clearance)Simplified invoice (B2C, reporting)
ValidReturned with ZATCA's stamp and QR code; share it with the buyerConfirmation in the API response
Accepted with warningsReturned stamped with the QR code and the warning messages; share it, then fix the causeConfirmation plus warning messages; fix the cause for future invoices
RejectedError messages returned; the invoice is not cleared and must not go to the buyer as a tax invoiceError messages returned; correct the error and report a corrected document

One rule applies to both: the Fatoora platform records the hash of rejected submissions too, so your system must keep the hash chain intact even when a document fails.

ZATCA API Response Codes and What to Do

The E-Invoicing Detailed Guidelines list the HTTP responses your ERP or e-invoicing system may receive and the action ZATCA expects for each. Your system should log every response so your team and your solution provider can see what happened.

CodeMeaningAction ZATCA describes
200Action successfulNone
202Successful, but with warningsShare the warnings with your solution provider and correct them as soon as possible
303Clearance switched offSubmit the standard document through the Reporting API instead
400Action failed (rejected)Read the detailed message, correct and resubmit
401UnauthorizedCheck the authentication certificate and secret, then resubmit
413Payload too large; invoice not receivedResend with a smaller payload (the guidelines say the limit is around 10 MB)
429Too many requests; invoice not receivedResend
500Internal server error; invoice not receivedResend
503Service unavailable; invoice not receivedResend
504Request timed out; invoice not receivedResend

Note the difference: a 400 means ZATCA received and rejected your document, while 413, 429, 500, 503 and 504 mean the invoice was not received at all. Treat them differently in your ERP. A rejection needs a correction; a failed delivery needs a retry.

Errors vs Warnings

ZATCA's technical FAQ puts it simply: an error is a validation failure on a rejected document, and a warning is a validation failure on an accepted document. The Detailed Guidelines say there are more than 100 possible combinations of each. Examples taken from that document:

TypeExample message from ZATCA's guidelinesTypical root cause
WarningAn Invoice shall contain the Seller postal address (BG-5)Incomplete company or branch address in the ERP
WarningEach Invoice line (BG-25) shall contain the Item name (BT-153)Item master missing a name or description
WarningThe allowed maximum number of decimals for the Paid amount (BT-113) is 2Rounding settings in the ERP or POS
ErrorAn Invoice shall have an Invoice issue date (BT-2)Mapping or integration bug
ErrorThe document issue date (BT-2) must be less or equal to the current dateWrong device clock or future-dated invoice
ErrorBase quantity (BT-149) must be a positive number above zeroZero or negative quantities on invoice lines

The Detailed Guidelines also give practical examples: a minor mistake, such as a missing building number in an address, needs no immediate action, but the warning should be investigated and fixed for the next invoice. A significant mistake, such as missing mandatory fields or wrongly populated VAT values, means the invoice should be corrected and resubmitted. For B2B buyers who are not VAT registered, the same document says a missing additional buyer ID may lead to acceptance with warnings, so cleaning your customer master data pays off.

Should you resubmit an invoice accepted with warnings?

No. The technical FAQ says a document that received "202 - Accepted with warnings" has been accepted and should not be resubmitted. Investigate and fix the cause quickly, though. ZATCA says repeated non-compliance that results in warnings will be investigated and may be subject to penalties. Our guide to ZATCA e-invoicing penalties explains the official violations table.

How to Resubmit a Rejected Invoice Correctly

This is where many teams go wrong. You cannot edit or delete an issued e-invoice: the E-Invoicing Implementation Resolution requires a tamper-resistant counter that cannot be reset and lists alteration or deletion of issued invoices as a prohibited function. ZATCA's FAQ in the Detailed Guidelines says invoices cannot be cancelled; you fix the errors and submit the XML like a new invoice with its own counter value and hash. Based on the Detailed Technical Guideline, a correct resubmission follows these rules:

  1. Read the error messages in the API response and fix the root cause, whether it is master data, a tax setting or an integration mapping.
  2. Generate a new document with a new UUID and a new invoice counter value (ICV). After a rejection, ZATCA says the UUID and ICV must not be reused.
  3. Leave the rejected document as it is. Its hash and counter value must not be changed or updated.
  4. Set the previous invoice hash (PIH) to the document generated immediately before the new one, not to the document before the rejected one.
  5. Use the right date. For a standard invoice, ZATCA says the invoice date should be updated, because a non-cleared invoice is not a valid tax invoice. For a simplified invoice, the date should stay as the date the transaction took place.
  6. Submit again and keep the API logs for both attempts.

A hypothetical example of the hash chain

Suppose your system generates documents 1, 2 and 3. Document 2 is rejected, while 1 and 3 are accepted. You fix the problem and generate document 4 as the corrected version of document 2. Following ZATCA's FAQ example, document 3's previous invoice hash is the hash of document 2, even though document 2 was rejected, and document 4's previous invoice hash is the hash of document 3. ZATCA also says documents can be submitted in a different order from the one they were generated in, but gaps found in the sequence during back-end validation may be investigated.

What about a simplified invoice already given to the customer?

The technical FAQ says that if reporting fails for a simplified invoice already issued, you correct the error and submit a new document for reporting; there is usually no need to issue another invoice to the customer, and the transaction still goes in your VAT return. ZATCA states that a technical failure or XML error does not invalidate the transaction and VAT is due either way. One entry in the same FAQ, about a "NOT_REPORTED" status, says the invoice should instead be cancelled via a credit note and a new invoice generated. Because the two answers differ, agree a written procedure with your tax adviser and solution provider. For credit note rules, see our guide to ZATCA credit notes and debit notes.

When ZATCA or Your System Is Down

Not every failure is a validation error. The E-Invoicing Detailed Guidelines walk through outage scenarios. In summary:

  • ZATCA's servers are overloaded or down. Keep retrying at regular intervals. For B2C, keep trying to report within 24 hours and keep evidence of your attempts. For B2B, ZATCA's example shows the seller sharing the uncleared invoice, keeping records and clearing it once the platform responds, then sending the cleared e-invoice to the buyer. ZATCA notes it knows when its servers are down, so a notification is not required, though you can file one if unsure.
  • No internet at your premises. Simplified invoices can be reported when the connection returns, within 24 hours. If you cannot report within 24 hours, or cannot clear a B2B invoice within the standard invoicing deadline, notify ZATCA through the failure notification service, then notify again once the issue is resolved.
  • Broken device, power cut or cyber attack. Notify ZATCA, contact your solution provider, issue invoices manually while keeping records, then generate and clear or report the e-invoices with the original transaction dates once fixed.

The guidelines add two cautions. Manual or uncleared invoices are treated as VAT invoices only until the compliant e-invoice is issued, and they are not eligible for VAT deduction until then. Taxpayers that report failures frequently or for long periods may be investigated individually. The technical FAQ also says all transactions from the downtime must be cleared or reported in compliant XML once the failure is resolved.

Common Causes of Rejections and How to Prevent Them

CausePrevention
Expired or invalid CSIDTrack certificate validity and renew before expiry; invoices signed with invalid certificates are rejected
Missing or wrong master dataValidate VAT numbers, addresses and buyer IDs when customers and branches are created
Wrong VAT values or roundingTest tax codes, discounts and decimal settings with ZATCA's validation tools before go-live
Buyer newly VAT registeredZATCA says documents issued to newly registered taxpayers are rejected until two business days have passed
Clock or date issuesSync device clocks; future issue dates are rejected
Broken hash chain after a failureMake sure your ERP never reuses a counter or UUID and always points to the last generated document

Before go-live, ZATCA recommends using its XML Implementation Standards, Data Dictionary, Compliance and Enablement Toolbox (SDK or web validator) and Integration Sandbox to check future submissions, as set out in the Detailed Technical Guideline. Our CSID onboarding guide covers certificates and renewals, and our article on choosing a ZATCA compliant ERP lists the questions to ask vendors about error handling.

A Simple Rejection Playbook for Finance Teams

  1. Make sure your ERP shows the status of every invoice (cleared, reported, accepted with warnings, rejected or not sent) on a single screen.
  2. Assign an owner who reviews rejections daily and warnings weekly.
  3. For each rejection, record the error, the root cause, the corrected document number and the date resubmitted.
  4. Escalate repeated errors to your solution provider with the API logs.
  5. Keep outage evidence, failure notifications and retry logs with your archive. Our ZATCA e-invoice archiving guide explains what to keep and for how long.

How Raad ERP Helps

Raad ERP is a cloud ERP for GCC trading, retail, manufacturing and contracting businesses. According to raaderp.com, it is compliant with ZATCA Phase 1 and Phase 2 e-invoicing requirements, includes QR codes and the required invoice fields, and works fully in Arabic. If you want to see how a ZATCA-ready workflow handles clearance, reporting and corrections, ask us for a demo, try Raad ERP free for 14 days, or message our team on WhatsApp at +971 56 102 1565.

Questions and answers

What does it mean when ZATCA rejects an invoice?
The Fatoora platform found at least one fatal validation error against ZATCA's XML standards, data dictionary or e-invoicing rules. Even one error rejects the whole document. A rejected standard (B2B) invoice is not cleared and is not a valid tax invoice.
Can I edit and resend a rejected ZATCA invoice?
No. Issued e-invoices cannot be altered, deleted or cancelled. Fix the cause and submit a new document with a new UUID, new invoice counter value, its own hash and a new timestamp, leaving the rejected document unchanged.
What is the difference between a ZATCA error and a warning?
An error is a validation failure that rejects the document. A warning is a validation failure on a document that ZATCA still accepts. Warnings should be fixed quickly because ZATCA says they may become rejections and repeated warnings can be investigated.
Should I resubmit an invoice accepted with warnings?
No. ZATCA's technical FAQ says a document with the 202 accepted-with-warnings response has been accepted and should not be resubmitted. Investigate and correct the cause for future invoices.
What previous invoice hash should a resubmitted invoice use?
The hash of the document generated immediately before the new one. ZATCA records the hash of rejected documents too, so the chain continues through the rejected document rather than skipping it.
What does ZATCA response code 303 mean?
It means clearance is switched off. Standard invoices and notes should then be submitted through the Reporting API, where they are validated but not stamped by ZATCA.
What should I do if ZATCA's servers are down?
Keep retrying at regular intervals and keep evidence of your attempts. Simplified invoices still need reporting within 24 hours. For system failures on your side, notify ZATCA through its failure notification service and clear or report all downtime transactions once fixed.
Does a rejected simplified invoice need a new invoice for the customer?
ZATCA's technical FAQ says usually not: correct the error and report a corrected document, and include the sale in your VAT return. Another FAQ entry suggests a credit note and new invoice for a NOT_REPORTED status, so agree a procedure with your adviser.

This article is general information only and is not legal, tax or professional advice. Regulations, including ZATCA, UAE Ministry of Finance and FTA requirements, change often, and this content may be incomplete, out of date or contain errors. Before you act on it, check with the official authority (ZATCA in Saudi Arabia, or the Ministry of Finance or Federal Tax Authority in the UAE) or a qualified tax adviser. Raad ERP makes no warranties about the accuracy or completeness of this content and accepts no liability for any loss arising from reliance on it. Links to third-party websites are provided for convenience and are not endorsements.

Related reading