I'm trying to use zatca sdk to generate the CSR using our company information with a valid VAT number and the default OTP provided by Fatoora "123345", then i could generate the CSID and PCSID, i also singed the invoice with the CSID certificate and generate the hash and qr code fot it, i submitted to compliance and it was passed, but when try to submit it to reporting using the the PCSID for authentication and CSID or PCSID for signing it, it also always says:
{
"res": {
"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": "certificate-permissions",
"category": "CERTIFICATE_ERRORS",
"message": "Production CSID does not cover Simplified documents",
"status": "ERROR"
}
],
"status": "ERROR"
},
"reportingStatus": "NOT_REPORTED"
}
}
code for submitting to reporting
def reporting_API(uuid1, hash_value, signed_xmlfile_name, invoice_number, sales_invoice_doc ):
sdk_settings = SDKSettings.objects.get(id=0)
payload = load_api_request()
headers = {
"accept": "application/json",
"accept-language": "en",
"Clearance-Status": "1",
"Accept-Version": "V2",
"Authorization": "Basic" + sdk_settings.basic_auth_production,
"Content-Type": "application/json",
"Cookie": "TS0106293e=0132a679c0639d13d069bcba831384623a2ca6da47fac8d91bef610c47c7119dcdd3b817f963ec301682dae864351c67ee3a402866",
}
response = requests.request(
"POST",
url=get_API_url(base_url="invoices/reporting/single"),
headers=headers,
data=payload,
)
i also put the certificate and private key in the SDK data certificate folder.
Tried to use CSID and PCSID, tried to use some default values recommended by this website but it couldn't help: https://www.apizatca.com/post/resolving-production-csid-error-zatca-e-invoicing
it seems that when you generate CSID you have to select either simplified invoice / standard invoice or both in title parameter. 1100 represents both. 1000 only standard and 0100 only simplified