Dear All,
I hope this email finds you well,
I sent multiple emails to support but haven’t received any response from you yet.
I followed the steps in the simulation version to generate CSR & private key and create PCSID successfully, but when I send invoices every time to Zatca (reporting & clearance) the same error message still appears ‘The invoice hash API body does not match the (calculated) Hash of the XML’. I checked each step and made sure it was correct,
The steps:
Generate CSR & private key through SDK command line (fatoora -sim -csr -csrConfig csr-config-example.properties)
Generate CSID (https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/compliance )
from step 2 decode binaryToken to create a certificate then save in …/Data/Certificate/cert.pem & save the private key in …/Data/Certificate/ec-secp256k1-priv-key.pem.
Sing invoices with company VAT number through SDK command line (fatoora -sign -invoice Simplified_Invoice.xml)
Send invoices (https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/compliance/invoices )
Generate PCSID
Updated cert.pem file in …/Data/Certificate/cert.pem depend on PCSID data
Send invoices - reporting through https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/invoices/reporting/single
.Net C# code:
var signResult = _eInvoiceSigningLogic.SignDocument(myDoc, certificate, privateKey);
if (signResult.IsValid)
{
signResult.SaveSignedEInvoice(xmlPath);
var requestResult = _RequestResult.GenerateRequest(signResult.SignedEInvoice);
if (requestResult.IsValid)
{
hash = requestResult.InvoiceRequest.InvoiceHash;
str_xml = requestResult.InvoiceRequest.Invoice;
uuid = requestResult.InvoiceRequest.Uuid;
}
}
var qrResult = _qrValidator.GenerateEInvoiceQRCode(signResult.SignedEInvoice);
var Reporting = new BuildXmlResult
{
Xml = str_xml /*Convert.ToBase64String(Encoding.UTF8.GetBytes(XmlToString(signResult.SignedEInvoice)))*/,
Hash = hash,
QrCode = qrResult.QR,
UUID = parameters.InvoiceUUID
};
var responce = zatcaPost.ZatcaReport(Reporting);
public async Task <BuildXmlResult> ZatcaReport(BuildXmlResult XmlResult)
{
try
{
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/invoices/reporting/single");
request.Headers.Add("Accept-Language", "en");
request.Headers.Add("Accept-Version", "V2");
request.Headers.Add("Authorization", config.Authorization);
var content = new StringContent("{\r\n \"invoiceHash\":\"" + XmlResult.Hash + "\",\r\n\r\n \"uuid\":\"" + XmlResult.UUID + "\",\r\n\r\n \"invoice\":\"" + XmlResult.Xml + "\"\r\n\r\n}", null, "application/json");
request.Content = content;
var response = client.Send(request);
if (response.IsSuccessStatusCode)
{
XmlResult.Status = "Accepted";
}
else
{
XmlResult.Status = "Rejected";
}
XmlResult.Massage = await response.Content.ReadAsStringAsync();
return XmlResult;
}
Catch (Exception ex)
{
return XmlResult;
}
}
I hope to respond me as soon as possible
Thanks for the support
idaoud
October 8, 2024, 12:12pm
2
Dear @CDAdeveloper
Thanks for reaching out,
Can I kindly ask you to provide the full request and response?
Additionally, after getting your PCSID did you update the authentication in both Clearance & Reporting APIs to be basic auth with the binarysecuritytoken as userName and the secret as password?
Thanks,
Ibrahem Daoud.
Thank you for your fast response
This is a request function, and we update the authentication
public async Task <BuildXmlResult> ZatcaReport(BuildXmlResult XmlResult)
{
try
{
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/invoices/reporting/single");
request.Headers.Add("Accept-Language", "en");
request.Headers.Add("Accept-Version", "V2");
request.Headers.Add("Authorization", config.Authorization);
var content = new StringContent("{\r\n \"invoiceHash\":\"" + XmlResult.Hash + "\",\r\n\r\n \"uuid\":\"" + XmlResult.UUID + "\",\r\n\r\n \"invoice\":\"" + XmlResult.Xml + "\"\r\n\r\n}", null, "application/json");
request.Content = content;
var response = client.Send(request);
if (response.IsSuccessStatusCode)
{
XmlResult.Status = "Accepted";
}
else
{
XmlResult.Status = "Rejected";
}
XmlResult.Massage = await response.Content.ReadAsStringAsync();
return XmlResult;
}
Catch (Exception ex)
{
return XmlResult;
}
}
idaoud
October 8, 2024, 12:31pm
4
Dear @CDAdeveloper
Can you try to send the same invoice through the postman and share the response?
Thanks,
Ibrahem Daoud.
{“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”:[{“type”:“WARNING”,“code”:“BR-KSA-61”,“category”:“KSA”,“message”:“Previous invoice hash (KSA-13) must exist in an invoice.”,“status”:“WARNING”}],“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”:“NOT_REPORTED”}
Thank you for being so helpful
idaoud
October 8, 2024, 12:42pm
6
Dear @CDAdeveloper
for the error that related to the invoice hash you need to ensure that the XML that you are sending contains the same value of invoiceHash that you are sending in the body
Can I kindly ask you to share the body content from the API?
Thanks,
Ibrahem Daoud.
Thank you for your response
this is a request body ,
{
"invoiceHash":"cJo9c4DpBjxYpktZ1YOOiVk44dE2N8Fdq6EIl4/IOlo=",
"uuid":"6d4e54bd-9712-485a-9c51-6de75527cdc5",
"invoice":"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPEludm9pY2UgeG1sbnM9InVybjpvYXNpczpuYW1lczpzcGVjaWZpY2F0aW9uOnVibDpzY2hlbWE6eHNkOkludm9pY2UtMiIgeG1sbnM6Y2FjPSJ1cm46b2FzaXM6bmFtZXM6c3BlY2lmaWNhdGlvbjp1Ymw6c2NoZW1hOnhzZDpDb21tb25BZ2dyZWdhdGVDb21wb25lbnRzLTIiIHhtbG5zOmNiYz0idXJuOm9hc2lzOm5hbWVzOnNwZWNpZmljYXRpb246dWJsOnNjaGVtYTp4c2Q6Q29tbW9uQmFzaWNDb21wb25lbnRzLTIiIHhtbG5zOmV4dD0idXJuOm9hc2lzOm5hbWVzOnNwZWNpZmljYXRpb246dWJsOnNjaGVtYTp4c2Q6Q29tbW9uRXh0ZW5zaW9uQ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SWQ9InNpZ25hdHVyZSI+CiAgICAgICAgICAgICAgICAgICAgICAgIDxkczpTaWduZWRJbmZvPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRzOkNhbm9uaWNhbGl6YXRpb25NZXRob2QgQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy8yMDA2LzEyL3htbC1jMTRuMTEiLz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkczpTaWduYXR1cmVNZXRob2QgQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNlY2RzYS1zaGEyNTYiLz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkczpSZWZlcmVuY2UgSWQ9Imludm9pY2VTaWduZWREYXRhIiBVUkk9IiI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRzOlRyYW5zZm9ybXM+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkczpUcmFuc2Zvcm0gQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy9UUi8xOTk5L1JFQy14cGF0aC0xOTk5MTExNiI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZHM6WFBhdGg+bm90KC8vYW5jZXN0b3Itb3Itc2VsZjo6ZXh0OlVCTEV4dGVuc2lvbnMpPC9kczpYUGF0aD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kczpUcmFuc2Zvcm0+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkczpUcmFuc2Zvcm0gQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy9UUi8xOTk5L1JFQy14cGF0aC0xOTk5MTExNiI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZHM6WFBhdGg+bm90KC8vYW5jZXN0b3Itb3Itc2VsZjo6Y2FjOlNpZ25hdHVyZSk8L2RzOlhQYXRoPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2RzOlRyYW5zZm9ybT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRzOlRyYW5zZm9ybSBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnL1RSLzE5OTkvUkVDLXhwYXRoLTE5OTkxMTE2Ij4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkczpYUGF0aD5ub3QoLy9hbmNlc3Rvci1vci1zZWxmOjpjYWM6QWRkaXRpb25hbERvY3VtZW50UmVmZXJlbmNlW2NiYzpJRD0nUVInXSk8L2RzOlhQYXRoPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2RzOlRyYW5zZm9ybT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRzOlRyYW5zZm9ybSBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMDYvMTIveG1sLWMxNG4xMSIvPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZHM6VHJhbnNmb3Jtcz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZHM6RGlnZXN0TWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS8wNC94bWxlbmMjc2hhMjU2Ii8+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRzOkRpZ2VzdFZhbHVlPmNKbzljNERwQmp4WXBrdFoxWU9PaVZrNDRkRTJOOEZkcTZFSWw0L0lPbG89PC9kczpEaWdlc3RWYWx1ZT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZHM6UmVmZXJlbmNlPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRzOlJlZmVyZW5jZSBUeXBlPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwLzA5L3htbGRzaWcjU2lnbmF0dXJlUHJvcGVydGllcyIgVVJJPSIjeGFkZXNTaWdu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8L2RzOlg1MDlEYXRhPgogICAgICAgICAgICAgICAgICAgICAgICA8L2RzOktleUluZm8+CiAgICAgICAgICAgICAgICAgICAgICAgIDxkczpPYmplY3Q+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8eGFkZXM6UXVhbGlmeWluZ1Byb3BlcnRpZXMgeG1sbnM6eGFkZXM9Imh0dHA6Ly91cmkuZXRzaS5vcmcvMDE5MDMvdjEuMy4yIyIgVGFyZ2V0PSJzaWduYXR1cmUiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx4YWRlczpTaWduZWRQcm9wZXJ0aWVzIElkPSJ4YWRlc1NpZ25lZFByb3BlcnRpZXMiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8eGFkZXM6U2lnbmVkU2lnbmF0dXJlUHJvcGVydGllcz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx4YWRlczpTaWduaW5nVGltZT4yMDI0LTEwLTA4VDE1OjQ5OjQwPC94YWRlczpTaWduaW5nVGltZT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx4YWRlczpTaWduaW5nQ2VydGlmaWNhdGU+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHhhZGVzOkNlcnQ+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx4YWRlczpDZXJ0RGlnZXN0PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRzOkRpZ2VzdE1ldGhvZCBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvMDQveG1sZW5jI3NoYTI1NiIvPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRzOkRpZ2VzdFZhbHVlPk9UYzFObUZrWlRBM1kyVXdNRFkzTm1ZMk5qUmlZemM0T1RCak16Y3lZMlF3TkRJeVlURTBOamRqTkdRM01Ea3hPR1l4TnpoaU5EUmpaR0k1TXprNVlnPT08L2RzOkRpZ2VzdFZhbHVlPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3hhZGVzOkNlcnREaWdlc3Q+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx4YWRlczpJc3N1ZXJTZXJpYWw+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZHM6WDUwOUlzc3Vlck5hbWU+Q049UEVaRUlOVk9JQ0VTQ0EyLUNBLCBEQz1leHRnYXp0LCBEQz1nb3YsIERDPWxvY2FsPC9kczpYNTA5SXNzdWVyTmFtZT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkczpYNTA5U2VyaWFsTnVtYmVyPjQyMzcxNDI2NjgxNjAwODIyNTgxNzU1NDQ1ODY2MzI4ODgyMDYwODI5MTE0NDwvZHM6WDUwOVNlcmlhbE51bWJlcj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC94YWRlczpJc3N1ZXJTZXJpYWw+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC94YWRlczpDZXJ0PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC94YWRlczpTaWduaW5nQ2VydGlmaWNhdGU+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwveGFkZXM6U2lnbmVkU2lnbmF0dXJlUHJvcGVydGllcz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3hhZGVzOlNpZ25lZFByb3BlcnRpZXM+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3hhZGVzOlF1YWxpZnlpbmdQcm9wZXJ0aWVzPgogICAgICAgICAgICAgICAgICAgICA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FSIj4yMDAuMDA8L2NiYzpQcmljZUFtb3VudD4KICAgICAgICAgICAgPGNiYzpCYXNlUXVhbnRpdHk+MTwvY2JjOkJhc2VRdWFudGl0eT4KCQkJPGNhYzpBbGxvd2FuY2VDaGFyZ2U+CgkJCQk8Y2JjOkNoYXJnZUluZGljYXRvcj5mYWxzZTwvY2JjOkNoYXJnZUluZGljYXRvcj4KCQkJCTxjYmM6QWxsb3dhbmNlQ2hhcmdlUmVhc29uPmRpc2NvdW50PC9jYmM6QWxsb3dhbmNlQ2hhcmdlUmVhc29uPgoJCQkJPGNiYzpBbW91bnQgY3VycmVuY3lJRD0iU0FSIj4wLjAwPC9jYmM6QW1vdW50PgoJCQk8L2NhYzpBbGxvd2FuY2VDaGFyZ2U+CgkJPC9jYWM6UHJpY2U+Cgk8L2NhYzpJbnZvaWNlTGluZT4KPC9JbnZvaWNlPg=="
}
idaoud
October 8, 2024, 12:59pm
8
Dear @CDAdeveloper
Please reach out to your RM and let him reach out to our support team via the below mail with your concerns and try to provide screenshots from the postman for request, response, and authorization that you are using, to ensure comprehensive support as usual and schedule meeting if needed.
SP email: sp_support@zatca.gov.sa
Thanks,
Ibrahem Daoud.
Thank you for being so helpful, we want to inform you that we fixed the error, the reason was some spaces made the file of invoice XML before the signing different from the file of invoice XML after signing,
Added the property from C# to save the same XML file before and after signing with the same spaces
XmlDocument myDoc = new XmlDocument() {
PreserveWhitespace = true
};
Thank you,
1 Like
idaoud
October 14, 2024, 10:45am
10
Dear @CDAdeveloper
It’s great to hear that you fixed the error, since we are talking about Hash it’s a sensitive value and any change in the invoice even if it’s a space need a new Hash.
Please do not hesitate to reach out for any further concerns.
Thanks,
Ibrahem Daoud.