i always recive this error
{
“validationResults”: {
“infoMessages”: [
{
“type”: “INFO”,
“code”: “XSD_ZATCA_VALID”,
“category”: “XSD validation”,
“message”: “Complied with UBL 2.1 standards in line with ZATCA specifications”,
“status”: “PASS”
}
],
“warningMessages”: ,
“errorMessages”: [
{
“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”
},
“reportingStatus”: null,
“clearanceStatus”: “NOT_CLEARED”,
“qrSellertStatus”: null,
“qrBuyertStatus”: null
}
Environment: Simulation
Link: https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/precompliance/invoices
SignResult signedResult = eInvoiceSigner.SignDocument(eInvoice, cer, privateKey);
- eInvoice: Standard_Invoice.xml (uploaded in this email)
- cer: Decoded from base64 for binarySecurityToken
- privateKey:“MHQCAQEEID6mGxPXV6jTrkeKrYHeTNtFAEzy3Kqd/dIU99Xmt80xoAcGBSuBBAAKoUQDQgANJFcTJu0msyQvS5n9z7NpLO0TopSeCAFYpM4gIYCh+aisKxd7iRYzdQyBF7bFkclWJSaGb0D0RsZ6YOA==”
Notice:
When I use the following commands, everything works well:
fatoora -sign -qr -invoice Standard_Invoice.xml -signedinvoice signedinvoice.xml
fatoora -generateHash -invoice Standard_Invoice.xml