{"errors":[{"code":"Invalid-OTP","message":"The provided OTP is invalid"}]}

Dear Team,
Today tried to onboard by generating csr using SDK,

C:\zatca>fatoora -version
********** Welcome to ZATCA E-Invoice Java SDK 3.4.2 *********************
This SDK uses Java to call the SDK (jar) passing it an invoice XML file.
It can take a Standard or Simplified XML, Credit Note, or Debit Note.
It returns if the validation is successful or shows errors where the XML validation fails.
It checks for syntax and content as well.
You can use the command (fatoora -help) for more information.

csr.common.name=My Company
csr.serial.number=1-JS|2-V1|3-3a9983473723e9afe0630100007fba85
csr.organization.identifier=ZZZ986641500003
csr.organization.unit.name=ZZZ9866415
csr.organization.name=My Company
csr.country.name=SA
csr.invoice.type=1000
csr.location.address=Southern Khalidiya Dammam SA
csr.industry.business.category=Trading

fatoora -sim -csr -csrConfig C:\zatca\mycsr.txt -generatedCsr C:\zatca\mycsr_csr.txt

then calling

https://gw-fatoora.zatca.gov.sa/e-invoicing/core/compliance

{“csr”: “LS0tLS1CRUdJTiBDRVJUSUZJQ0FURSBSRVFVRVNULS0tLS0NCk1JSUNPakNDQWVBQ0FRQXdkekVMTUFrR0ExVUVCaE1DVTBFeEV6QVJCZ05WQkFzTUNqTXhNRGs0TmpZME1UVXgNCk96QTVCZ05WQkFvTU1rVnRaR0ZrSUVGc2IzVnNZU0JtYjNJZ2IzQmxjbUYwYVc5dUlHRnVaQ0JOWVdsdWRHVnUNCllXNWpaU0JEYjIxd1lXNTVNUll3RkFZRFZRUUREQTFGYldSaFpDQkJiQ0JQZFd4aE1GWXdFQVlIS29aSXpqMEMNCkFRWUZLNEVFQUFvRFFnQUV5dlpLRDdzK3U3b2xVMVBsOTdGbnFxRnJGd3NIR3c3Umxkdzl1cDZzWlMwR203bDcNCjFWK25kZGhrL1ZYVy9MSGNlUnpZRzN2Mkg4TFVrYjkrc0VnWVJxQ0NBUWd3Z2dFRUJna3Foa2lHOXcwQkNRNHgNCmdmWXdnZk13SkFZSkt3WUJCQUdDTnhRQ0JCY01GVkJTUlZwQlZFTkJMVU52WkdVdFUybG5ibWx1WnpDQnlnWUQNClZSMFJCSUhDTUlHL3BJRzhNSUc1TVRVd013WURWUVFFREN3eExVcFRmREl0VmpGOE15MHpZVGs1T0RNME56TTMNCk1qTmxPV0ZtWlRBMk16QXhNREF3TURkbVltRTROVEVmTUIwR0NnbVNKb21UOGl4a0FRRU1Eek14TURrNE5qWTANCk1UVXdNREF3TXpFTk1Bc0dBMVVFREF3RU1UQXdNREUrTUR3R0ExVUVHZ3cxVUVNZ016SXlNakVnYzNRek9EQTINCklFSnNaQ0E0TkRrMUlGTnZkWFJvWlhKdUlFdG9ZV3hwWkdsNVlTQkVZVzF0WVcwZ1UwRXhFREFPQmdOVkJBOE0NCkIxUnlZV1JwYm1jd0NnWUlLb1pJemowRUF3SURTQUF3UlFJZ1J3VENicXVZNnhqQklYa0E0dDViOTUvMndhL28NCkxLNlBkZlNqbnZQQzc4QUNJUURzaS9ZdU1INlIram5Fa0x3NnRpMXROS2k5SGYvVmJDNmxSSWRkU0M3YXVnPT0NCi0tLS0tRU5EIENFUlRJRklDQVRFIFJFUVVFU1QtLS0tLQ0K”}

but getting following error,

{“errors”:[{“code”:“Invalid-OTP”,“message”:“The provided OTP is invalid”}]}

What could be reason as this version of SDK I am using first time.

thanks

Dear @Malik,

Thank you for your detailed explination.

Are you using simulation environment? if yes, please update the API endpoint to the simulation environment, also, ensure that the generated OTP is also from fatoora simulation poortal, you can find the simulation APIs endpoints below:

â—Ź Onboarding APIs:
https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/compliance
(Request a pre-compliance CSID)
https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/compliance/invoices
(Run compliance checks for reporting and clearance)
https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/production/csids
(Request or renew a production CSID)
â—Ź Core Solution APIs:
https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/invoices/reporting/single
(Reporting API for Invoices, Credit and Debit notes)
https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/invoices/clearance/single
(Clearance API for Invoices, Credit and Debit notes)

Regards,

Okay @Malik .
Make sure you are using the right otp.
Second it could be 100% from the csr or certifcate content maybe the taxno is not set right.
And at last the certificate type or the purpose for it, Cause when using a simulation certificate with a production or core otp this would cause this issue or even reverse.

I think it is typo in the API end point will give a try in the morning,

https://gw-fatoora.zatca.gov.sa/e-invoicing/core/compliance
to
https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/compliance

1 Like

Dear Community members, please do not use tools such as cert4sign.com. Such tools are unverified and poses high risk of identity theft. If any one has onboarded CSIDs using such unverified tools, we strongly recommend to revoke such CSIDs and onboard new ones.

1 Like

Hi Ankit, this topic is not related to cert4sign.com as seems there is someone else post and you had responded there. Here using only ZATCA SDK. thanks