Dear ERPGulf Team,
Thank you for your continued support and contribution.
We are currently attempting to integrate ZATCA (v2.1.1) with our ERPNext v15 instance. While the setup wizard completes successfully using sandbox settings, we encounter the same error during the compliance check when switching to simulation or production mode.
The error returned by the ZATCA API is as follows:
Error: User only allowed to use the VAT number that exists in the authentication certificate.
Full Error Message
Error in wizard_button: Error from ZATCA API: {“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”:[{“type”:“WARNING”,“code”:“BR-KSA-98”,“category”:“KSA”,“message”:“[BR-KSA-98] - The simplified invoice should be submitted within 24 hours of issuing the invoice.”,“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.”,“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”:[{“type”:“ERROR”,“code”:“certificate-permissions”,“category”:“CERTIFICATE_ERRORS”,“message”:“User only allowed to use the vat number that exists in the authentication certificate”,“status”:“ERROR”}],“status”:“ERROR”},“reportingStatus”:“NOT_REPORTED”,“clearanceStatus”:null,“qrSellertStatus”:null,“qrBuyertStatus”:null}
We have verified that the VAT number being used is correct and matches the one listed in our Fatoora portal. For reference, below are the relevant CSR details used during the setup:
csr.common.name=TST-886431145-311491435400003
csr.serial.number=1-TST|2-TST|3-5aac209b-753e-dba4-7edc-ce7058d6
csr.organization.identifier=311491435400003
csr.organization.unit.name=311491435400003
csr.organization.name=شركة ارتباط الرقمي لتقنية المعلومات
csr.country.name=SA
csr.invoice.type=1100
csr.location.address=JEDDAH
csr.industry.business.category=Information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bks0eDNaWktrQ0lRQ2ZSZVg4RmVwaHYzTVRBSFJCSVIwVUJpNFkKRjdTa3FPN3pPcFpqN0t0Lzd3PT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUgUkVRVUVTVC0tLS0tCg==
It appears that the system does not validate the certificate as authorized for the specified VAT number, despite matching the registered details.
VAT Certificate:
VAT ID in Fatoora:
- Could you kindly review and guide us on resolving this issue?
- Is there a mismatch in the certificate/VAT alignment or an issue in the CSR generation?
We appreciate your assistance and look forward to your guidance.
Best regards,