B2B cleared but B2C semi reported

Dear All

I implemented zatca SDK net dll files to my mvc core 8 app and the code working smoothly for B2B clearance in all steps in Developer API.
And also success cleared in compliance step at Simulation APIs.

Only now I face I a problem in final reporting B2C in Sandbox API Https~/invoices/reporting/single,
And Also in compliance step at simulation API Https~/simulation/compliance/invoices.

The error message in both platforms says:("Invalid signed properties hashing, SignedProperties with id='xadesSignedProperties'")
I searched in this forum about any similar problem but I haven’t found a reason or a solution.

I wondering why B2B working fine but not B2C while it is the same SDK and code?

Any idea, please ?

@khaledmaqtari

Not really sure, so far I have never gotten this error.

In another discussion you seem to be using the SDK to sign your invoices. There shouldn’t be any issues.

This may be a problem with the certificate you used to sign the invoice.

Make sure you create separate certificates for Sandbox and Simulation.

For Compliance check you can use a certificate from CCSID or PCSID.
For Reporting and Clearance you need to complete the Onboarding process, and get a PCSID Certificate to sign your Invoice.

So thanks Mr @eCloud for responding.

Of course.

Maybe, But I wonder why the B2B reported without any issue in sandbox and simulation while I’m using the same signing for B2C docs.

While my app is a cloud system I already made a separated directories and files per user, platform and step
my category

Yes, until now I finished with B2B, just need to know what I’m missing for complete B2C and get my PCSID.

The compliance certificate is not done with the following compliance steps yet [simplified-compliant,simplified-credit-note-compliant,simplified-debit-note-compliant]

For B2B you don’t need to sign the Invoice, the Server will do it and return the signed Invoice to us.

Related to this, you need to sign all types of invoices (Sales, Credit Note and Debit Note) B2C invoice using Certificate from CCSID Binary Token and send it to Compliance Check api.

B2B no need to sign, send all types of B2B Invoice (Sales, Credit Note and Debit Note) to Compliance Check api.

After all successful, you can get PCSID by sending CCSID RequestID as payload and Encoded CCSIDBinaryToken:CCSIDSecret for Basic Authorization.

1 Like

Thank you @eCloud for support

Actually I missed that I so wonder why B2B working but B2C not.
That make to review my code again.

1 Like

For B2C, I just tried to validate an invoice with status REPORTED,

But validation failed, maybe there is something wrong with the way I use the library in my code, or maybe there is something wrong with the library SDK.

Here…

Let’s wait for the Zatca team or other members who have succeeded to provide enlightenment.

Yes Mr @eCloud

I noticed that also In zatca SDK even latest version 3.3.4
I can signing B2C successfully but validation field

Hi @khaledmaqtari,

Do we need to get PrivateKey & CSR from Zacta for Production integration?

Hi Mr @Sulaman

No, it is a unique encryption key must generated form your side.
It used to create the CSR and also used later to sign your invoices.

This makes zatca ensure that the source of CSR is the same invoice signer EGS (E-invoice generating solution)

For more information about that key functions and its relation with CSR see this.

You may take a look about (generateCSR) command in zatca SDK readme file.

1 Like