How i Get the Right Hash?

I Try Alot of Things but i Got This Error The Hash is Not Like Calculated Hash :
i tryed :

1- Sign and Calc Hash By SDK
2- Sign and Calc Hash By Code (Manual)
3- Sign and Calc Hash and Replace the Old Hash With the New One By SDK and Manual

all i got same Error.

This is The Signed Invoice i Use : Can Someone Tell me What is The Hash for it and How he did it ?

PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48SW52b2ljZSB4bWxucz0idXJuOm9hc2lzOm5hbWVzOnNwZWNpZmljYXRpb246dWJsOnNjaGVtYTp4c2Q6SW52b2ljZS0yIiB4bWxuczpjYWM9InVybjpvYXNpczpuYW1lczpzcGVjaWZpY2F0aW9uOnVibDpzY2hlbWE6eHNkOkNvbW1vbkFnZ3JlZ2F0ZUNvbXBvbmVudHMtMiIgeG1sbnM6Y2JjPSJ1cm46b2FzaXM6bmFtZXM6c3BlY2lmaWNhdGlvbjp1Ymw6c2NoZW1hOnhzZDpDb21tb25CYXNpY0NvbXBvbmVudHMtMiIgeG1sbnM6ZXh0PSJ1cm46b2FzaXM6bmFtZXM6c3BlY2lmaWNhdGlvbjp1Ymw6c2NoZW1hOnhzZDpDb21tb25FeHRlbnNpb25Db21wb25lbnRzLTIiPjxleHQ6VUJMRXh0ZW5zaW9ucz48ZXh0OlVCTEV4dGVuc2lvbj48ZXh0OkV4dGVuc2lvblVSST51cm46b2FzaXM6bmFtZXM6c3BlY2lmaWNhdGlvbjp1Ymw6ZHNpZzplbnZlbG9wZWQ6eGFkZXM8L2V4dDpFeHRlbnNpb25VUkk+PGV4dDpFeHRlbnNpb25Db250ZW50PjxzaWc6VUJMRG9jdW1lbnRTaWduYXR1cmVzIHhtbG5zOnNpZz0idXJuOm9hc2lzOm5hbWVzOnNwZWNpZmljYXRpb246dWJsOnNjaGVtYTp4c2Q6Q29tbW9uU2lnbmF0dXJlQ29tcG9uZW50cy0yIiB4bWxuczpzYWM9InVybjpvYXNpczpuYW1lczpzcGVjaWZpY2F0aW9u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0iU0FSIj40LjAwPC9jYmM6TGluZUV4dGVuc2lvbkFtb3VudD48Y2FjOlRheFRvdGFsPjxjYmM6VGF4QW1vdW50IGN1cnJlbmN5SUQ9IlNBUiI+MC42MDwvY2JjOlRheEFtb3VudD48Y2JjOlJvdW5kaW5nQW1vdW50IGN1cnJlbmN5SUQ9IlNBUiI+NC42MDwvY2JjOlJvdW5kaW5nQW1vdW50PjwvY2FjOlRheFRvdGFsPjxjYWM6SXRlbT48Y2JjOk5hbWU+2YLZhNmFINix2LXYp9i1PC9jYmM6TmFtZT48Y2FjOkNsYXNzaWZpZWRUYXhDYXRlZ29yeT48Y2JjOklEPlM8L2NiYzpJRD48Y2JjOlBlcmNlbnQ+MTUuMDA8L2NiYzpQZXJjZW50PjxjYWM6VGF4U2NoZW1lPjxjYmM6SUQ+VkFUPC9jYmM6SUQ+PC9jYWM6VGF4U2NoZW1lPjwvY2FjOkNsYXNzaWZpZWRUYXhDYXRlZ29yeT48L2NhYzpJdGVtPjxjYWM6UHJpY2U+PGNiYzpQcmljZUFtb3VudCBjdXJyZW5jeUlEPSJTQVIiPjIuMDA8L2NiYzpQcmljZUFtb3VudD48Y2FjOkFsbG93YW5jZUNoYXJnZT48Y2JjOkNoYXJnZUluZGljYXRvcj50cnVlPC9jYmM6Q2hhcmdlSW5kaWNhdG9yPjxjYmM6QWxsb3dhbmNlQ2hhcmdlUmVhc29uPmRpc2NvdW50PC9jYmM6QWxsb3dhbmNlQ2hhcmdlUmVhc29uPjxjYmM6QW1vdW50IGN1cnJlbmN5SUQ9IlNBUiI+MC4wMDwvY2JjOkFtb3VudD48L2NhYzpBbGxvd2FuY2VDaGFyZ2U+PC9jYWM6UHJpY2U+PC9jYWM6SW52b2ljZUxpbmU+PC9JbnZvaWNlPg==

Environment : Simulation

Thanx alot

Dear @aymannagy

Please provide a screenshot of the error you are encountering, and install the last version of the SDk.

The hash should be calculated on the final version of the XML document after it has been signed. If you’re generating the hash before signing, the XML will change when signed, leading to a mismatch.

Kindly ensure you are correctly using the hash from the signed XML, not the unsigned version.

If the issue still occurs, please reach out with our support team via below emails:
E-invoicing@zatca.gov.sa
sp_support@zatca.gov.sa

Thanks.

I see your invoiceXML is linearized, Signed XML should be left as is. The hash change is probably coming from there.

Try formatting your original xml with indentation, then Sign the XML. and don’t change anything in the signed xml.

Share your Origional XML, I will calculate it for you

I Calculate After Sign. i Use last SDK Version 3.3.6 and i Try This Emails Before and no one answer or Replay. and i Put the Invoice as Base64 u Can Check it .

Thanks Alot

From my experience, Zatca eInvoice SDK not work with linearized XML.
try to formatting your xml before signing.

Let see my code in this thread, maybe it will help…