We are getting below warning for all invoices that we send to ZATCA for both simulation and production.
X509Certificate (CCSID / PCSID) used for signing is not valid certificate (CCSID / PCSID) for this VAT Registration Number.
This warning is thrown only when an invoice is signed from EGS1 and reported through EGS2, where both EGS1 and EGS2 are registered under same VAT number.
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.
Indeed we were using the compliance certificates instead of production.
However now that we changed to use the production certificates, we still have the same error. I have checked the X509 embedded in the signature, and it is the correct one that was granted to us by Zatca during the production/csids call.
So please could you explain what else could trigger this “certificate-issuer-name” error that we get?
Thank you
please see below some of the most common mistakes that relates to the certificates:
1- the one I mentioned earlier, which is using CCSID insteas of PCSID in reporting & clearance.
2- if the VAT number that assoicated with the certificate is not the vat number inside the XML body
3- if the certificate has been generated from simulation and used in production or vice versa
4- if you are using an expired certificate to send/sign invoices
if you are signing your invoices with a certificate & upload it to zatca with a diffierent one, but both of the two are under the same VAT number but still facing “accepted with warning”, then please continue as this warning is not blocking you from the uploading process.
if you require any further support, please do not hesitate to reach out, you can also send the problem to your releationship manager describing the issue with the screenshot of the problem & more details & our technical team will help you.
what suggested from your side is to please continue uploading invoices as your approach is valid, taxpayer can sign invoices with EGS1 and upload it with EGS2 if both EGS(s) has PCSIDs under the same VAT number.
ignore this accepted with warnings message & please continue as your invoices will be sent successfully to ZATCA.
Hi @Aturkistani ,
No, this is the Sandbox testing, using the credentials that have been working for a year. Now all of a sudden all of our tests for Simplified Invoices start failing with this error, since early October.
So something has changed in Sandbox Portal preventing us to test. And we are not running integration tests against Simulation Portal or Production portal, and are thus fully dependent on Sandbox to work as expected.
Hello everyone, we spent few days trying to find the issue and FINALLY we were able to pinpoint the problem and get the fix done.
In our case (please note that there maybe more issues on your side) we had the incorrect order inside <ds:X509IssuerName> tag.
Because we generated this list ourselves, we were not thinking that this field is somehow important (especially at the time of implementation there were no check at all). The issue start appearing after some release of SDK and changes from ZATCA side without prior explanation what they changed or added.
I am pretty sure that the validation of this field is: it should be 100% the same as ZATCA generated it using some rules which are not documented. Probably they are getting it from Certificate as a string, but in our case we generate all components of issuer and then combine them together.
Cheers! If you still have the issue, post here the UBLExtensions tag part of your XML and we will try to help you guys.
Congratulations and great to know that you could find the issue.
In our case we are using zatca jar/dll to sign the invoice and thus UBL tags are generated by the library only.
Moreover, the order is correct in X509IssuerName too. ds:X509IssuerNameCN=PRZEINVOICESCA3-CA, DC=extgazt, DC=gov, DC=local</ds:X509IssuerName>
Hi @roopa , if you do not mind and there is nothing secure in your simulation invoice, then could you provide there the formatted UBLExtensions XML, we will look at it together and discuss what can be wrong. As we spent a lot of times already debugging, we have a lot of context and understanding how it should be
This one from example, and we were checking that our ERP (system) generating exactly same values except (signature) as it is different every time.
Hi @sergei.shishov , I am also getting this error … my issuer Serial is :<xades:IssuerSerial> <ds:X509IssuerName xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> CN=PEZEINVOICESCA3-CA, DC=extgazt, DC=gov, DC=local </ds:X509IssuerName> <ds:X509SerialNumber xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> 379112706134348777045369101887792407241563240 </ds:X509SerialNumber> </xades:IssuerSerial>
Could you post me the full XML’s UBLExtensions as I posted above to check.
One thing I have noticed in your XML, you have an extra whitespaces and I do not know how ZATCA is handling and comparing values.
DC=local </ds:X509IssuerName> # this extra trailing whitespace can be the reason as well
Hello @abdullah.rahim just had time to look into it. I got your certificate from <ds:X509Certificate> and decoded it using OpenSSL, and there I can see all required data to past later under <xades:SigningCertificate>
Inside your certificate I can see the following issuer (comparing to what you add to extensions):
It seems you have incorrect order, BUT ALSO I can see that you have mismatch in CN: PRZEINVOICESCA4-CA != PEZEINVOICESCA3-CA.
I would not recommend you to hardcode it, instead you should extract all data from your certificate every time you generate data as ZATCA updating their codebase and servers and newly generated certificates can have completely different issuers, serial numbers, etc
If you have any questions, please ask.
@roopa , please check your issuer in the certificate as you can have similar issue
Hi @sergei.shishov , Thanks for your suggestion but i am still getting ,"message":"Complied with UBL 2.1 standards in line with ZATCA specifications","status":"PASS"}],"warningMessages":[{"type":"WARNING","code":"certificate-issuer-name", warning. I have changed the issuer name to what we mentioned but still getting this warning.
Dear
now i face the same issue
what did you do please
{“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.”,“status”:“WARNING”},{“type”:“WARNING”,“code”:“invalid-signing-certificate”,“category”:“CERTIFICATE_ERRORS”,“message”:“X509Certificate (CCSID / PCSID) used for signing is not valid certificate (CCSID / PCSID) for this VAT Registration Number.”,“status”:“WARNING”}],“errorMessages”:,“status”:“WARNING”},“reportingStatus”:“REPORTED”,“clearanceStatus”:null,“qrSellertStatus”:null,“qrBuyertStatus”:null}