Clarification on Sending Previously Saved Invoices for Clearance

Dears

We are implementing e-invoicing as per ZATCA requirements and have the following query:

Our system first saves invoices locally and later sends them to the ZATCA API for clearance. In a recent case, an invoice was saved yesterday but was not sent for clearance immediately. Meanwhile, a new invoice was created and successfully sent to ZATCA today.

  1. Can we send the previously saved invoice (from yesterday) for clearance after a new invoice has already been sent?
  2. If yes, which Previous Hash value should be used for this older invoice? Should it reference the last successfully cleared invoice, or the one before it?

We appreciate your guidance on the correct approach to ensure compliance with ZATCA’s requirements.

B2B invoice must be submitted in real time, B2C Invoice must be submitted within 24 hours.

submission sequence will not make any difference in PIH.

some one please help me in the steps to generate the previous invoice hash to add into the invoice.xml. What will be the PIH value for the first invoice going for the clearance api

@Anju

NWZlY2ViNjZmZmM4NmYzOGQ5NTI3ODZjNmQ2OTZjNzljMmRiYzIzOWRkNGU5MWI0NjcyOWQ3M2EyN2ZiNTdlOQ==

this will be the PIH for first invoice. for Invoice hash you need to explain how you are doing and in which language are you developing the application