Seek clarification of resubmitting rejected invoices

Hello,

I came across some information that confused me according to the guidelines at E-invoice Detailed Technical Guide Line (Nov 2022) Page 77, and I was hoping you could help clarify things.

Firstly , it seems that there are two different scenarios for handling rejected invoices. On one hand, it says that I have to issue a Credit Note for a rejected invoice and a new invoice will be issued (with different IRN and identifiers as I understood).
But on the other hand, it suggests fixing the problem then resubmitting the invoice with new identifiers (Preserving IRN and issue date of rejected simplified invoice). This left me unsure about the correct process to follow.
are these two different scenarios? does “not_reported” indicated a different status Code than “rejected” ?

Secondly, for difference between rejecting a Standard invoice and a simplified invoice. after fix errors,
Standard Invoice → should I resubmitted with new Date and Time retaining the original IRN of the rejected invoice?
Simplified invoices → should I retain the date, time and the IRN of original invoice?
In both cases, I must change the identifiers UUID,ICV and PIH.

Please clarify this confusion to me.

Thank you

image
image

@DS2022

Thank you for reaching out.

Kindly note the following response types from the API, encompassing all scenarios post-successful onboarding:

  1. 200 OK: Indicates that the invoice was accepted without any warnings or errors.
  2. 202 Accepted: Signifies acceptance of the invoice from ZATCA with a warning. You can refer to the validation result in the response to identify the reason for the warning and prevent it in future invoices.
    3.400 Bad Request: Indicates rejection of the invoice. You can review the validation result in the API response to pinpoint the exact issue and rectify it.

For rejected invoices (indicating an error rather than a warning, which is not acceptable for ZATCA), follow these steps to address the issue and resubmit the invoice for acceptance:

Clearance (standard) invoices:

  1. Correct the error as indicated in the API response within your XML file based on the error message.
  2. Please ensure to update the PIH (Previous Invoice Hash) for the new invoice. For instance, if you submitted invoices 1, 2, and 3 sequentially and invoice 2 was rejected for an error, you need to submit a new invoice (invoice 4) after fixing the error. Ensure that the PIH for invoice 4 is the HASH for the last submitted invoice, in this case, invoice 3.
  3. After rectifying the error, update the HASH, UUID, and ICV before submitting it to the Clearance API. The API response should reflect clearance (accepted by ZATCA), with the encoded XML containing the updated timestamp.

Reporting (Simplified) Invoices:

  1. Rectify the error highlighted in the response within your XML file based on the error message.

  2. Please remember the PIH for the new invoice. as per the scenario we mentioned previously.

  3. After correcting the XML error, update the HASH, UUID, and ICV before submitting it to the reporting API. The response should indicate successful reporting, signifying that your invoice is error-free and accepted.