On Simulation Getting The provided Certificate Signing Request (CSR) is invalid

On Simulation
Getting The provided Certificate Signing Request (CSR) is invalid. ON Getting PCSID from the third API.

1 . Making CSR
2. Getting CSID Successfully (if My CSR is wrong it should show error in this step).
3. Submitting Compliance Invoices for Simplified Invoices and also done debit and credit note on same base64 decoded BinaryToken
4. When I want to generate PCSID by using request_id(getting from compilance) I m facing that error.

Dear @farhan06
Thank you for reaching out.

You are receiving such an error due to a mistake in the signing process Please refer to the steps of manual signing using ZATCA’s JAVA SDK below:

After sending the CSR in the Compliance request CSID API, a Binarytoken & secret will be returned

Take the Binarytoken output, and decode it using base64 decoder, the decoded value is the x.509 certificate

Go to the SDK file to the following path: SDK/Data/Certificates/Cert.pem

Replace the value with your obtained x.509 certificate

Go to the SDK and use the command: fatoora -sign -invoice “invoice.xml”

Now the invoice will be signed & can be submitted successfully in the compliance checks phase (Compliance invoice API)

Redo the same steps above with the returned PCSID from the third API in the onboarding process and sign your simplified tax invoices with before sending to Reporting API

If you are implementing the signing process in your own code, please refer to This document:
SigningProcessUpdated.pdf

If you require any additional support other than the mentioned steps above, please do not hesitate to reach out.

Thank you.