Issue with OTP During Onboarding (Production Environment)

Dears,

I am experiencing an issue during the onboarding process. On the Developer Portal, the code is tested and works correctly. However, in the production environment, during the compliance phase, even though the OTP code is correct, the system returns the error:
“Invalid-OTP - The provided OTP is invalid.”

I have double-checked whether the page from which we retrieved the OTP is a simulation or not, and confirmed that the same code works with the Developer API using test OTP codes.

The endpoint URL I am using is:
https://gw-fatoora.zatca.gov.sa/e-invoicing/core/compliance

The line where I add the header in my .NET solution is:

httpClient.DefaultRequestHeaders.Add(“OTP”, otp);

I don’t see any reason why the OTP would be considered invalid. I would appreciate any advice or guidance on resolving this issue.

Thank you in advance.

Dear @otuzemen,

To resolve the issue, please check on the following points:

1- The VAT number: the vat number inside the CSR configurations file should be 100% matched with the VAT number that is linked to your fatoora portal account, you can find it in the top right of the page after accessing fatoora web page.

2- The environment: based on the provided endpoint, the environment is production, so, make sure to obtain the OTP from fatoora production.

3- in VAT group scenario: If your VAT belongs to a wider VAT group, in CSR config, the 10 digests TIN of the individual company should be included in the organization unit name (OU) field.

4- expiry time: OTP has a timeframe of one hour, so, make sure to use it before it expires.

Regards,