# Errors while generation B2C invoice using .net SDK

**URL:** <https://zatca1.discourse.group/t/errors-while-generation-b2c-invoice-using-net-sdk/2005>\
**Category:** SDK, web-based validator and sandbox\
**Created:** [July 22, 2024, 9:36am UTC](https://zatca1.discourse.group/t/errors-while-generation-b2c-invoice-using-net-sdk/2005 "2024-07-22T09:36:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![nader\_makki](https://avatars.discourse-cdn.com/v4/letter/n/ecae2f/32.png) [@nader\_makki](https://zatca1.discourse.group/u/nader_makki)\
**Post date:** [July 22, 2024, 9:36am UTC](https://zatca1.discourse.group/t/errors-while-generation-b2c-invoice-using-net-sdk/2005/1 "2024-07-22T09:36:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![idaoud](https://avatars.discourse-cdn.com/v4/letter/i/f9ae1b/32.png) [@idaoud](https://zatca1.discourse.group/u/idaoud)\
**Post date:** [July 22, 2024, 11:32am UTC](https://zatca1.discourse.group/t/errors-while-generation-b2c-invoice-using-net-sdk/2005/2 "2024-07-22T11:32:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nader\_makki](https://avatars.discourse-cdn.com/v4/letter/n/ecae2f/32.png) [@nader\_makki](https://zatca1.discourse.group/u/nader_makki)\
**Post date:** [July 22, 2024, 11:47am UTC](https://zatca1.discourse.group/t/errors-while-generation-b2c-invoice-using-net-sdk/2005/3 "2024-07-22T11:47:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![idaoud](https://avatars.discourse-cdn.com/v4/letter/i/f9ae1b/32.png) [@idaoud](https://zatca1.discourse.group/u/idaoud)\
**Post date:** [July 22, 2024, 11:54am UTC](https://zatca1.discourse.group/t/errors-while-generation-b2c-invoice-using-net-sdk/2005/4 "2024-07-22T11:54:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![nader\_makki](https://avatars.discourse-cdn.com/v4/letter/n/ecae2f/32.png) [@nader\_makki](https://zatca1.discourse.group/u/nader_makki)\
**Post date:** [July 22, 2024, 12:06pm UTC](https://zatca1.discourse.group/t/errors-while-generation-b2c-invoice-using-net-sdk/2005/5 "2024-07-22T12:06:41Z")

</div>

Please provide me the email

---

<div class="post-metadata">

**Author:** ![idaoud](https://avatars.discourse-cdn.com/v4/letter/i/f9ae1b/32.png) [@idaoud](https://zatca1.discourse.group/u/idaoud)\
**Post date:** [July 22, 2024, 1:18pm UTC](https://zatca1.discourse.group/t/errors-while-generation-b2c-invoice-using-net-sdk/2005/6 "2024-07-22T13:18:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![suhailkk](https://dub1.discourse-cdn.com/flex013/user_avatar/zatca1.discourse.group/suhailkk/32/455_2.png) [@suhailkk](https://zatca1.discourse.group/u/suhailkk)\
**Post date:** [September 14, 2024, 6:10pm UTC](https://zatca1.discourse.group/t/errors-while-generation-b2c-invoice-using-net-sdk/2005/7 "2024-09-14T18:10:48Z")

</div>

Hi @nader_makki

i have same issue. how did you solved this?

---

<div class="post-metadata">

**Author:** ![saalotaibi](https://avatars.discourse-cdn.com/v4/letter/s/f9ae1b/32.png) [@saalotaibi](https://zatca1.discourse.group/u/saalotaibi)\
**Post date:** [September 28, 2024, 1:46pm UTC](https://zatca1.discourse.group/t/errors-while-generation-b2c-invoice-using-net-sdk/2005/9 "2024-09-28T13:46:10Z")

</div>

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.
