I have a question on the expected behavior when an Invoice (Tax or Simplified) is rejected (errorcode=400) during Clearance and Reporting, respectively.
As I understand it, for both, the expectation is a new XML is generated with new technical identifiers (UUID, Hash, ICV, PIH, IRN) since ZATCA system stores the hash of the rejected document, whereas the IssueDate, IssueTime etc. should be the same as the original transaction only.
However, from here I see that if the Hash of the document has not changed, then we can effectively retry and submit the same technical identifiers for both the cases (Tax and Simplified) (Submit Rejected Invoices - #6 by SUBOH)
It’s impossible to maintain the same invoice hash for the invoice with 400 error after fixing it, as one or more attributes of the XML will be modified, which will cause for an entirely new invoice hash.
For rejected invoices with 400, please fix the errors and submit it again with new identifiers, any other approach is non-compliant.