Dear @Madleen,
Only simplified tax invoices are required to be signed, standard tax invoices signing is not mandatory by the taxpayers, as ZATCA will sign them on their behalf & will override the existing signature if any.
To sign invoices using SDK, please follow the steps below in order:
1- send your generated CSR in the compliance request CSID API, a securityBinaryToken & secret will be returned if the request is called successfully
2- Take the returned SecurityBinaryToken and decode it using base64 decoder, the decoded value is the x.509 certificate
3- go to the SDK folder to the following path: SDK/Data/Certificates/Cert.pem
4- replace the value with your obtained x.509 certificate
5- replace the generated private key with the value in the other file in the same path: SDK/Data/Certificates
6- open the CLI in the path where the invoice that needs to be signed is located and type the below command if you are using JAVA SDK:
fatoora -sign -invoice [invoice file name.XML]
Or if you are using .NET SDK, type the command:
fatooraNet sign -invoice [invoice file name.XML]
By following the above steps, you can sign your simplified tax invoices & submit them in the compliance checks phase (compliance invoice API)
Redo the same steps above but with the returned PCSID from the third API in onboarding process, to sign & submit invoices to the “Reporting” API
Please confirm if this works for you.
Should you require any further clarifications, please don’t hesitate to reach out