Simulation Env- Invalid OTP & Compliance transaction was submitted/generated before

Our CSR was generated through Zatca sandbox and was accepted in Developer portal.
I have ensured that the VAT No = csr.organization.identifier. and generated the OTP on simulation mode.
I am using the link : https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/compliance

In am ensuring all headers are there

Accept:application/json
OTP: 247886
Accept-Version :V2
Content-Type:application/json

When I try, First am getting : invalid OTP error - ( 2 mins after generating it)
On trying with another OTP, I am getting error 409 (conflict) : Compliance transaction was submitted/generated before.

I have also recreated CSR using the following command : fatoora -Sim -csr -csrConfig csr-config-example.properties -privateKey Key1 -generatedCsr CSR1-pem . Still not working.

Hi,
Inside ZATCA portal while generating OTP you have to be careful not to generate production OTP as you need OTP of simulation so use right navigation. thanks

Hi Malik,
We have ensured to be in Simulation mode as per the guide below.

https://zatca1.discourse.group/t/fatoora-simulation-portal/486

when generating CSR using SDK, Our configuration file is as below (But replacing the details with actual details of the customer)

csr.common.name=TST-886431145-399999999900003
csr.serial.number=1-TST|2-TST|3-ed22f1d8-e6a2-1118-9b58-d9a8f11e445f
csr.organization.identifier=399999999900003
csr.organization.unit.name=3999999111
csr.organization.name=DEMO COMPANY LTD
csr.country.name=SA
csr.invoice.type=1100
csr.location.address=12211
csr.industry.business.category=IT

We have tried even in postman but still the above error.

For simulation you need to use -sim

fatoora -sim -csr -csrConfig [name.properties]

when moving to production then remove -sim
thanks

Hi Malik,
Thanks for your quick response.

I had tried that as in my first post.

I am even decoding the binary security token received in the developer-portal CSID and am geting vaid result when I test with CSR Decoder and Certificate Decoder | CSR Checker | Certificate Checker

The above is replaced with valid customer details.

For Simulation or Core Environment, try use the actual Vat Number, according to the vat Number where you created the OTP

Hi,
My two point here now if you are using valid VAT no of company of which you are using to generate OTP and you are not generating production OTP as in portal you have to go to compliance OTP screen.

also check my video here,

thanks

@Malik & @eCloud , thank you for the response. We have re-generated the CSR after assigning csr.organization.unit.name the branch name. we have now received the binary code + secret key & status issued. The only issue is that we cannot see the device in the onboarded list (Simulation mode) Does it take long to reflect ? Can we proceed with compliance test before seeing our device in the list?

It will not show until you will not 3 or 6 docs for compliance