Error 401 Unauthorized Error while clearance / report

if error 401 receive during clearance and reporting what are step should we take.

  1. can resubmit the same invoice with same ICV and PIH if its last invoice?
  2. need to resubmit the same invoice with same ICV and update PIH of last successfully submitted invoice?
  3. or need to resubmit with new ICV and PIH of last successfully submitted invoice?

thanks in advance for clarification.

Any one Can Comment.

Once your invoice is submitted and get rejected , you shall resubmit after solve your problem but with new icv, pih and hash

dear @Embro ,

401 is not rejected, its unathorized means still invoice not respond by ZATCA

1 Like

Dear @bhattiasadlatif

Thanks for reaching out, apologies for the delay in response.

Please note that you should proceed with the second approach which is
When 401 response that’s mean the invoice didn’t submit yet, the correct action is to resubmit the same invoice with the same ICV and new PIH.

I hope it’s clear enough now.

Thanks,
Ibrahem Daoud.

Hi @idaoud

Resubmit invoice (after 401 Unauthorized) → means use the same ICV (because the invoice was never accepted due to auth failure). or use new ICV ? Can you please clarify me?

Morning @Abhishek

Thanks for reaching out,

Please note that 401 response is due to wrong authorisation, it’s not related to ICV or PIH

The right approach is the below:
1- when you share an invoice on clearance or reporting API.
2- if the response was 401 that’s mean your invoice didn’t submitted to zatca yet, due to wrong unauthorised reason,
3- in this case you need to check and confirm that you are using the same binary security token in the user name and the same secret as the password

After checking if you confirmed that you are using the correct username and password for the same VAT, I would kindly request you to elaborate more with sharing your full concern to the below mail, for our investigation and to schedule one to one meeting if needed.

SP mail: sp_support@zatca.gov.sa

Thanks,
Ibrahem Daoud

Thanks @idaoud

My authorization is correct because when I resubmit the invoice, it is successfully accepted. That’s why I am confused about whether I should resubmit the same invoice with the same ICV or generate a new one. Which is the correct way?

1 Like

@Abhishek whenever you resubmit an invoice, you should keep all the content exactly same including ICV, PIH, UUID and hash.

Dear Mr. Ankit,

One of my post is pending or waiting for response please can you do needful.

Thanks and Best Regards,

Asad Latif