Just wanted to make sure that i’m doing things correctly regarding the invoice clearance process .
Now that i have the PCSID and secret . i should decode the PCSID BinaryToken and save it in cert.pem .
then i should sign my invoice using this cert.pem and using the private key generated in the process of getting the CCSID .
Please let me know if this is correct because i’m kind of stuck at this point now .
Please ensure that you are using the private key that generated with your CSR in the following path: zatca-einvoicing-sdk-238-R3.3.3\Data\Certificates\ec-secp256k1-priv-key.pem
With your decoded PCSID BinaryToken
For any further concerns, please do not hesitate to reach out with our support team to the below email,
One last thing . once i managed to sign the invoice i should clear it from ZATCA endpoint .
the body should contain :
1- Invoice (signed invoice in Base64) . please confirm this .
2- Invoice Hash . which i got from the signing process .
3- UUID .
And authorization header as usual (PCSID binarytoken and security encoded in Base64) .
Correct, the body in the Reporting & Clerance APIs should contain the hash of the invoice, the UUID, and the signed invoice itself encoded using base64 for B2C invoices.
Additionally, since you are using SDK.Net, you can use the following command to generate a JSON request for you: fatooranet invoiceRequest -invoice “theSignedInvoice.xml”
Just double check if the hash from the generated JSON matches the hash for your signed invoice.