You can follow the below steps to solve your problem:
1-After submitting the Certificate Signing Request (CSR) via the Compliance Request CSID API, you will receive a BinaryToken and a secret.
2-Decode the BinaryToken using a base64 decoder. The decoded value will be the x.509 certificate.
3-Navigate to the SDK directory: SDK/Data/Certificates/Cert.pem.
4-Replace the contents of the Cert.pem file with the x.509 certificate obtained from the decoded BinaryToken.
5-Insert the newly generated private key into the ec-secp256k1-priv-key.pem file.
6-if you use JAVA SDK, run the following command: fatoora -sign -invoice “invoice.xml”.
else the .Net SDK, run the following command: fatooranet sign -invoice “invoice.xml”
7-The invoice will now be signed and can be successfully submitted during the compliance checks phase via the Compliance Invoice API.
Do the same steps with production CSID to sign and submit e invoices to the reporting APIs.
I am currently using PHP to generate and submit invoices to the ZATCA e-invoicing system. Could you kindly guide me on the procedure for integrating with the API in this case?
I would also like to inform you that I already have the necessary SSL certificate (ssl.cert) and private key (ssl.key) files available on my server. Please let me know the steps or any additional requirements to proceed successfully.
Looking forward to your assistance.
Please know that you need to review all the Educational Library shared by ZATCA on the official website, to ensure a full understanding of the integration phase.
So, our recommendations is to review the educational library first and start following the steps. then share any issue that you may face here or with the below emails:
E-invoicing@zatca.gov.sa
sp_support@zatca.gov.sa