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0J3OUt1Z3QrU0kyZUl6UnNMZHU1OTU0SUhOL1Q0cnNWaGZqNzNlY0E9PQ==”,
“dispositionMessage”:“ISSUED”,
“requestID”:1234567890123,
“secret”:“5Ti4+lQjS2U2acqTmuL+a5kkUswWVWv3HIqddUPVAC0=”,
“errors”:null,
“privateKeyContent”:“MHQCAQEEINXO5e3fEwl/bUXVUXUzX66de3GW77UyBlRrt0MK/4EfoAcGBSuBBAAKoUQDQgAEdFMujq2ddaOPxxFbSdZG/3fxtBmsz9qGTZB4odryWGIt9L3GgQHGb7pBcDOmSfTtJ9HX0Ev6uhaxskYQlK+xsA==”
}
From this response you need to do the following:
1- Decode binarySecurityToken base64, replace it with cert.pem file in the SDK following this path (zatca-einvoicing-sdk-238-R3.3.6\zatca-einvoicing-sdk-238-R3.3.6\Data\Certificates).
2- When you generate the CSR you must received the private key along with the CSR, here comes the second step to replace the private key with the (ec-secp256k1-priv-key.pem) file in the same directory for cert.pem
3- select the invoice you want to sign from the sample you can follow the samples path in the SDK (zatca-einvoicing-sdk-238-R3.3.6\zatca-einvoicing-sdk-238-R3.3.6\Data\Samples\Simplified\Invoice).
4- Open the invoice that you want to sign, and ensure that (cbc:CompanyID) tag under the (cac:AccountingSupplierParty) in the XML match the same VAT, If not replace it with your VAT, and save the changes.
5- Open the CLI from the same directory for the invoice you want to sign.
6- Using the command (fatoora -sign -invoice “the invoice you want to sign”), This command will generate a new signed XML in the same directory.
7- Validate the signed XML using this command (fatoora -validate -invoice “the signed XML”)
After following the previous steps, the SIGNATURE error will disappear, and the validation process will pass successfully.
I hope it’s clear enough now, for any further support do not hesitate to reach out our support team via below mail.
SP support mail: sp_support@zatca.gov.sa
Thanks,
Ibrahem Daoud.