I’m trying to develop a php application for the standard invoice. while trying the api call with signed invoice i’m getting invalid hash error. but i’m able to process the request successfully. then what can i do in this case. please anyone help.
Dear @rafi0486
Thanks for reaching out, Welcome to our community.
Sorry, To provide comprehensive support as usual, Can I kindly ask you to elaborate more, mentioning your full concerns with more details?
Thanks,
Ibrahem Daoud.
my doubt is whether we need to send signed xml or unsigned xml for clearance to the api. in my case the signed xml is getting [{“type”:“ERROR”,“code”:“invalid-invoice-hash”,“category”:“INVOICE_HASHING_ERRORS”,“message”:“The invoice hash API body does not match the (calculated) Hash of the XML”,“status”:“ERROR”}],“status”:“ERROR”} same time if i try my unsigned doc for compliance check its working
Dear @rafi0486
Thanks for reaching out,
Can you provide the full request and response?
However, there are no need to sign the B2B as per it will be signed by ZATCA and return the signed invoice in the API response, for the error you are receiving it’s refer to unmatched Hash in the request body (invoiceHash) and the hash for the XML that you are sending also in the body, Kindly ensure that they are the exact same hash.
Thanks,
Ibrahem Daoud.