ZATCA E-Invoicing - X509Certificate (CCSID / PCSID) Not Valid for VAT Registration Number

While signing invoices using a qualified digital certificate, I receive the following warning from ZATCA Simulation: “warningMessages”: [ { “status”: “WARNING”, “type”: “WARNING”, “code”: “certificate-issuer-name”, “category”: “CERTIFICATE_ERRORS”, “Message”: “X509Certificate (CCSID / PCSID) used for signing is not valid certificate (CCSID / PCSID) for this VAT Registration Number.” } ]

Dear @Rahoof

Thank you for reaching out & welcome to the community.

Please make sure that you are using the production CSID and not the compliance CSID for signing invoices.

In the onboarding process, 2 CSIDs (X509 certificates) will be returned.

First one: after requesting the compliance CSID API, (which is the first step to do in onboarding process), we use this certifecate to sign invoices for the compliance checks step (compliance Invoice API), so we only use this certificate to sign invoices for the testing purposes in the compliance checks phase, as invoices in compliane checks are not being sent to ZATCA.

Second one: after requesting the production CSID API, we use this certificate to sign real invoices that are being sent to ZATCA by reporting API for simplified invoices or clearance API for standard invoices, however signing standard invoices is optional & not mandatory.

so what suggested is to make sure that you are using the PCSID X5509 certificate to sign your invoices,and check again.

Thank you.

hi sir
thank you for your replay
now the simulation of b2c in voice reporting fine
{
“requestUri”: “https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/invoices/reporting/single”,
“requestType”: “Invoice Reporting”,
“statusCode”: “200-OK”,
“reportingStatus”: “REPORTED”,
“validationResults”: {
“status”: “PASS”,
“infoMessages”: [
{
“status”: “PASS”,
“type”: “INFO”,
“code”: “XSD_ZATCA_VALID”,
“category”: “XSD validation”,
“Message”: “Complied with UBL 2.1 standards in line with ZATCA specifications”
}
],
“warningMessages”: ,
“errorMessages”:
}
}

but validating the invoice through https://sandbox.zatca.gov.sa/TestXML i get this error

my xml

(Attachment 311380681800003_20250310000000_AMT_G1_82272.xml is missing)

hi sir
thank you for your replay
now the simulation of b2c in voice reporting fine
{
“requestUri”: “https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/invoices/reporting/single”,
“requestType”: “Invoice Reporting”,
“statusCode”: “200-OK”,
“reportingStatus”: “REPORTED”,
“validationResults”: {
“status”: “PASS”,
“infoMessages”: [
{
“status”: “PASS”,
“type”: “INFO”,
“code”: “XSD_ZATCA_VALID”,
“category”: “XSD validation”,
“Message”: “Complied with UBL 2.1 standards in line with ZATCA specifications”
}
],
“warningMessages”: ,
“errorMessages”:
}
}

but validating the invoice through https://sandbox.zatca.gov.sa/TestXML i get this error

  • category : SIGNATURE_ERROR
  • code :X509IssuerName
  • message : wrong X509IssuerName
  • category : SIGNATURE_ERROR
  • code :X509SerialNumber
  • message : wrong X509SerialNumber

Dear @Rahoof

Thanks for reaching out,

Please note that the web-based-validator has it’s own certificate this is why you will always face the error regarding the Certificate, However, you can rely on the Reporting API response as the API checking also the validation since the response is 200 OK this means the invoice has been reported successfully, Or you can use our SDK tool to validate your XML before sharing it with ZATCA APIs
You can download Zatca

Additionally, Kindly review the Educational library to know how you can use SDK functionalities.

Thanks,
Ibrahem Daoud.