sites$ fatoora -sign -invoice finalzatcaxml.xml -signedInvoice sdsign.xml
********** Welcome to ZATCA E-Invoice Java SDK 3.3.7 *********************
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.
2024-11-27 10:21:22,947 [ERROR] InvoiceSigningService - failed to sign invoice [certificate file is not found]
And Path certificate Is True And Permission is true but show this problem . the system is ubuntu and framework is frappe what is problem . Can I find someone who can solve this problem and explain the stages of linking? First, create the CSR, then create the CSIDS certificate, then CSIDS production, then the signing, and then send the invoices to the authority. Is this correct?
Thanks for reaching out, welcome to our community.
Can I kindly ask you to collaborate more with the below questions to ensure comprehensive support as usual:
1- Are you in simulation or production?
2- What exactly the APIs that you are hitting with each step of the onboarding?
3- After you received the production CSIDS, what are the steps that you are following to sign the XML?
Regarding the APIs and onboarding steps, here’s what I’ve done so far:
SDK Setup:
I downloaded the SDK from the official ZATCA portal and carefully reviewed the readme.pdf for instructions. My environment is Ubuntu, not Windows, so I ensured compatibility with Java 11, as required by the SDK.
This process successfully generated two encrypted files based on the crs.properties file. I then sent the CSR and OTP to obtain the binarySecurityToken (SCID) and secret.
3. Invoice XML Preparation:
I created an XML invoice compliant with the provided template in the SDK.
4. Issue Encountered:
I faced difficulties signing the invoice XML. Although I attempted the signing process as mentioned in the documentation, I encountered an error and couldn’t proceed with submitting the invoice to ZATCA.
Questions:
Could you clarify the correct process for signing the invoice XML?
Are the steps I followed for integration accurate? If not, could you please identify the errors and guide me on how to correct them?
Your assistance is greatly appreciated to ensure seamless compliance with ZATCA requirements.
You can follow the below steps for the signing process:
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-For .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.
and if you are implementing the signing process in your own code, please refer to the below document: SigningProcessUpdated.pdf (392.7 KB)
Please don’t hessite to reach out if you are still facing any issue.
E-invoicing@zatca.gov.sa
sp_support@zatca.gov.sa