1- is There Any Problem in zatca-einvoicing-sdk-238-R3.3.4 or its Last Version.
is it Updated?? ( if it not Last Version can You Provide me The Last SDK )
2- is Example Invoices and Credit Memo inside the SDK is it Valid or Need Update?? (if it not, Can You Provide Me Example of Valid XML)
3- I’m Using sdk to Create:
Validate Sign Inputs = True
Generate EInvoice Hash = True
Generate Signature = True
Parse Certificate = False
Hash Certificate = True
Transform Xml Result = True
Populate Signed Signature Properties = False
Populate UBL Extensions = True
Generate EInvoice QR = False Note: QR Generate Alone Function is Working
Finalize Sign Document = True
And This List of Error I got When Sign:
[Error] Parsing EInvoice Certificate
[Error] Populating Signed Signature Properties
[Error] Generating EInvoice QR Code
1-No problem with the new version and this is the link to download the new version Zatca
2- yes you will find the samples of standard (credit - debit - invoice) and simplified (credit - debit - invoice) the path :- zatca-einvoicing-sdk-238-R3.3.4\Data\Samples
3- Please ensure that you are using the private key that generated with the CSR,
Also, kindly check the signing process manually and update your code to understand exactly what the right behavior of the signing method.
Dear @aymannagy , There is no problem in the new version of SDK. However, The error you shared is received when there is a mistake in the signing process. Unlike standard tax invoice, simplified tax invoice & its associated notes must be signed with the taxpayer X.509 certificate (CSID), there are 2 returned X.509 certificates in the taxpayer’s EGS onboarding process.
First X.509 certificate: CCSID, which is returned after completing the first API (Compliance CSID), It’s returned as a security binary token which will be used as a username in the authorization, it’s also used as a signing certificate (X.509) after we decode it using base64 (we decode the binarysecurityToken) using base64 decoder and the output is the X.509 certificate, we use this certificate to sign the simplified tax invoices in the compliance invoice API (Compliance checks phase).
Second X.509 Certificate: PCSID, which is returned after completing the third API on the onboarding process (Production CSID), it’s also returned as a binary security token, and will be used as the username in te authorization for both reporting & clearance API, it’s also used as a signing certificate (X.509) after we decode it using base64 (we decode the binarysecurityToken) using base64 decoder and the output is the X.509 certificate, we use this certificate to sign the simplified tax invoices in the reporting API.
Please refer to the steps of manual signing using ZATCA’s JAVA SDK below:
1- After sending the CSR in the Compliance request CSID API, a Binarytoken & secret will be returned
2- Take the Binarytoken output, and decode it using base64 decoder, the decoded value is the x.509 certificate
3- Go to the SDK file to the following path: SDK/Data/Certificates/Cert.pem
4- Replace the value with your obtained x.509 certificate
5- Go to the JAVA SDK and use the command: fatoora -sign -invoice “invoice.xml”
6- Now the invoice will be signed & can be submitted successfully in the compliance checks phase (Compliance invoice API)
7- 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 the document of the “SigningProcessUpdated” which was shared by my colleague.
If you require any additional support other than the mentioned steps above, please do not hesitate to reach out.