Hello,
We integrate with the production Reporting and Clearance APIs. We have a question about documents whose first submission never received a definite answer. We have read the Detailed Technical Guidelines, the E-Invoicing Resolution and earlier forum threads about 208 and 409, but could not find a rule for this case.
Scenario
- A document (a standard invoice on Clearance, or a simplified invoice on Reporting) was signed and submitted. No definite answer came back: either a connection error with no response, or HTTP 520.
- Some minutes later, the same invoice number was signed again with a new UUID and hash, then submitted. That submission was accepted, and on Clearance we received the cleared invoice.
- In some of these cases, the second document carried the same ICV and PIH as the first attempt.
The first attempts are now several days old. We have not resent them. We do not know whether ZATCA holds them.
Questions
-
Without submitting anything, is there a way for a taxpayer to confirm whether ZATCA holds a specific UUID or invoice hash? For example an API, a portal screen, or a support channel. If it is a support channel, what should we send, and to which address?
-
If we resend the original XML unchanged after several days:
a) Does production still return 208 / 409 when ZATCA holds that hash, or is the duplicate check limited to a time window such as 24 hours? Is the check currently active in production?
b) If ZATCA does not hold it, would it be accepted as a new document, even though a later document with the same invoice number has already been accepted?
Is resending appropriate in this situation, or should it be avoided? -
If ZATCA does hold both documents, is any corrective action required from the taxpayer? Should anything be notified to ZATCA? Should the buyer receive only the later cleared invoice?
-
For future cases, please confirm the expected handling of a connection error with no response, or HTTP 520:
a) Should the same XML be retried unchanged, keeping the UUID, ICV, PIH and hash? Does HTTP 520 follow the same guidance as the other 500-series responses?
b) If there is still no definite answer after retrying, should the next document’s PIH be the hash of the unanswered document, with the ICV increased by one?
We can share document details privately with the ZATCA team if that helps.
Thank you.