Errors while generation B2C invoice using .net SDK

when I am signing b2C invoices and validate it using .net SDK i got these errors:

“[Error] CODE: hashedXml, MESSAGE: hashedXml does not match with qr code hashedXml or the hashedXml is missing”

“[Error] CODE: invoiceSignedDataDigestValue, MESSAGE: wrong invoice hashing.”

“[Error] CODE: signatureValue, MESSAGE: Wrong signature value.”

kindly help to know the reasons of these errors and solve it

2 Likes

Dear @nader_makki

Thanks for reaching out, and welcome in our community.

Please provide the following details to ensure a comprehensive support as usual:

1- Which environment you are currently using?
2- Are you using our SDK or your tools?
3- Have you onboarded successfully and generate the PCSID?

Meanwhile, check the common errors related to the signing process during the onboarding process exactly during the compliance checks API, for production environment using .net SDK:

1- After generating the CCSID from the compliance API the response will contain
(BinarySecurityToken and Secret), you will use the BinarySecurityToken as the
userName in authentication for (compliance checks API), and the Secret will be the
Password.
2- Before sending any B2C invoice to be checked 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.3\Data\Certificates).
3- After that use the command for signing the invoice using your CCSID, you already
update it in the authorization (fatooranet sign -invoice “invoiceName.xml”).

After doing these steps you can fix the error that you provided.

I hope it’s clear now.
For any further support don’t hesitate to send a detailed information about your concerns to the SP email.

Thanks, and welcome in our community again.

@idaoud I am using .Net environment with ZATCA SDK 3.3.3 tool for certificate I’m using the certificate attached with tool

Dear @nader_makki

This is why you get the error; you need to use the same certificate.

Please send an email with full details to SP team, and will arrange a meeting if needed.

Thanks.

Please provide me the email

Dear @nader_makki

Please find the bellow emails:

sp_support@zatca.gov.sa
E-invoicing@zatca.gov.sa

Hint: Please share all the details info mentioned previously to ensure a comprehensive support as usual.

Thanks.

Hi @nader_makki

i have same issue. how did you solved this?

Hi @suhailkk

Kindly if you are still facing an issue provide all of the details to ensure a comprehensive support.

What is exactly the issue you are facing?
Which environment you are using?
Are you using ZATCA SDK or your own tools?
Have you onboarded successfully and generate the PCSID?

Please Share via
sp_support@zatca.gov.sa
E-invoicing@zatca.gov.sa

Thank you.