Hi, I’m trying to run fatoora -sign -invoice invoice.xml
but I get this error
2024-08-29 11:23:42,039 [ERROR] InvoiceSigningService - failed to sign invoice [please provide certificate decoded base64
I am under the impression that cert.pem
has to be the binary security token decoded using base 64 decoder. https://base64.guru/converter/decode
I did that and the same error returned
Am I missing something? is the cert.pem
the CSR
I generated
Am I using the proper decoder? maybe I’m decoding wrong.
lalomar
September 2, 2024, 11:18am
2
Hi @charbelsarkis123 ,
Thank you for reaching out.
Please find below is the signing process.
1- Before signing any B2C invoice ensure to decode the
BinarySecurityToken using Base64 and put the decoded BinarySecurityToken to the cert.pem fie following bath inside the SDK (zatca-einvoicing-sdk-238-
R3.3.4\Data\Certificates).
3- After that use the command for signing the invoice (fatoora -sign -invoice “invoiceName.xml”).
After you follow these steps and still facing the error, try to use another decoding tool.
For any further support don’t hesitate to send a detailed information about your concerns to the SP email.
Thanks,
I tried using 2 other decoding tools and they gave the same result
does the sercret
have anything to do with this?
do I use the binarySecurityToken
as is or do I concatenate?
@lalomar
lalomar
September 3, 2024, 12:03pm
4
You will use the secret in the API request
and you should decode the BainarySecurityToken as it is.
To ensure comprehensive support, please send your concern to the SP support email below. Make sure to include the XML file, the signing steps, and your configuration file that you generated the CSR from.
SP email: sp_support@zatca.gov.sa
@lalomar I have sent many emails to that email and no reply ever came.
I’m gonna post here in the hope I get some help
Here is my CCSID (binary security token)
TUlJQ1BqQ0NBZU9nQXdJQkFnSUdBWkc3K2t6K01Bb0dDQ3FHU000OUJBTUNNQlV4RXpBUkJnTlZCQU1NQ21WSmJuWnZhV05wYm1jd0hoY05NalF3T1RBME1EYzBNREl6V2hjTk1qa3dPVEF6TWpFd01EQXdXakIxTVFzd0NRWURWUVFHRXdKVFFURVdNQlFHQTFVRUN3d05VbWw1WVdSb0lFSnlZVzVqYURFbU1DUUdBMVVFQ2d3ZFRXRjRhVzExYlNCVGNHVmxaQ0JVWldOb0lGTjFjSEJzZVNCTVZFUXhKakFrQmdOVkJBTU1IVlJUVkMwNE9EW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