ICV & PIH for INVOICE/CREDIT/DEBIT

When we will create invoices/credit notes we give sperate ICV & PIH for each type and we got cleared, I mean as example we sent invoice with ICV = 1 and credit note with ICV=1 is this correct? if it is not correct what we can do for old invoices & credit notes which we already shared them?

Overall Counter …can not be repeated…ICV is differ than internal serial

In my understanding ICV is just a counter per device. Every device you onboarded should have a separate counter, and it should be used across all documents this device support (when you onboard the device, you specify what it supports).

This is just my understanding of ICV (counter) and how we are using it.

Best regards,
Sergei

Like that … you can get duplicate counters, (Like counter start from 1 for Each POS)
But you suppose to Issue an OverAll Counter …when you send to zatca …
you can refer to this quert also

Hello, could you elaborate what do you mean by OverAll counter as there is no such term in the documentation and anywhere.

UUID should not be repeated because this is the unique identifier of the document per submission (unique identifier of payload if you wish).

ICV is counter per device irrespectively which document type it is sending, Invoice, Credit Note etc…

PIH is just the reference to previous submitted document by this device. Even if your payload caused 400, client error, it should be recorded as submitted payload and ICV and PIH on your device should be updated.

The only case where you should not update ICV and PIH is the network issue when you know that the provider did not receive your payload and id not process it. Like firewall issue, connection issue, SSL issue - in other words when connection was not established.

There can be other edge cases, but I would not dive into the details as it will overcomplicate the understanding and implementation.

Sure … Overall per CSID (Sending Device)
in most point of sales system … they are standalone … so every sending device will have its own counter…

If you have “5” POINT OF SALES … BUT ONLY “1” SENDING SERVER WITH ONE certificate
YOU MUST HAVE 1 AND ONLY 1 COUNTER (OVARALL THESE 5 DEVICES)

Dear Embro , Sergei ,Yousef

If Device (Server) sending two type invoice (Standard,Simplified) What about PIH , ICV
we know at :

  • Invoice Simplified , PIH put by device , and you can send any time at 24h from issued.
  • Invoice Standard , PIH put by last sent doc

The Q. Is PIH is diffreanal for each type(standard,simplified) in same device(owned pcsid) ?

check this link About PIH on 2 register device - #2 by lalomar