About PIH on 2 register device

I have a scenario, where 1 table for all invoices and 2 register device,
ex. device1 sends invoice1, ICV=1, PIH=Nothing, invoice2, ICV=2, PIH=invoice1 hash, then device2 sends invoice3, ICV=1, PIH=?, should PIH be equal to nothing or Invoice2 hash? I hope my example is clear. Thanks in advance for the clarification.

Hi Jepperly,

Thank you for reaching out.

Kindly note that the PIH of the first invoice to be sent should be “ZERO value encoded to base64”, this sequence is associated with each device/PCISID onboarded, so in this scenario where there are 2 registered devices with 2 unique PCSIDs, each device should maintain it’s own unique sequence of the unique identifiers such as ICV, PIH.

so the invoice 3 (which is the first invoice to be sent from the new device) will be counted as an invoice(1), and its first invoice’s PIH should be “ZERO” decoded to base64.

Hope this is clear,

1 Like

It depend on if your 2 registered devices issued by 2 different certificate
Each certificate you are sending invoices independently

Hi Embro, it’s 2 devices, 1 for B2B invoices and 1 for B2C invoices with different certificate for each device, but the invoice number “IRN” is sequential regardless if it is B2B or B2C, so B2C device might send invoice3, invoice5 while B2B device send invoice1, invoice2, invoice4…

Thank You lalomar for your answer, its clear now for me. :smiley:

1 Like

Sorry lalomar may you please correct me if I am wrong.
Is PIH depends on submission order or generation order?
because for Simplified Invoicing ICV and PIH are prepared at XML generation Time not Submission Time to Zatca. So for my understanding, PIH will follow last generated invoice irrespective of submission order. Am I Correct? if no, how to handle PIH value at generation time for simplified invoices which may be submitted later in any order?.

PIH …for…The Previous Invoice SENT to ZATCA
while submiting the invoice you will prepare the xml … reading from your previous sent invoice … and get its hash

sorry, but for simplified invoices the invoice is already generated and prepared before submitting.

Also, may I ask you if you are a Zatca moderator? so I can take your response as an official Zatca answer. if no, may you please include any reference to support your answer.

Regards,

Hi @DS2022 , Kindly note that the sequence should follow the generation order not submission order. Moreover, there are no limitations on uploading/sending simplified invoices to ZATCA, it can be uploaded to any order as long as they are generated on a sequence, and the sequence will be validated on the backend, so it’s not a (real-time validation).

Ex: if invoice 1, 2, 3 were generated in a sequence, it can be submitted as invoice 2,1,3.

So there is no need to do an extra step to modify your PIH if your EGS generating your invoices in a sequence, however, any identified gaps on the sequence compliance during backend validation, will be submitted to further investigation by ZATCA and may result in penalties if found to be non-compliant.

1 Like

My self I am following this rule

Thank you very much @lalomar :+1: