ZATCA Onboarding, CSID and Certificate Errors: Causes and Fixes
Onboarding is where many ZATCA integrations get stuck: the OTP expires, the CSR is rejected, compliance checks fail, or a certificate quietly expires. Here is what each error means and how to fix it.
Before your system can send a single invoice to ZATCA, it has to be onboarded: registered as an invoicing device and given a certificate (CSID) to sign invoices. This step trips up more businesses than the invoices themselves.
This guide walks through the onboarding steps, the errors that come up at each one, and how to fix them.
The onboarding steps in order
- Generate an OTP in the Fatoora portal for the device you are onboarding.
- Your system creates a certificate request (CSR) with your VAT and device details.
- ZATCA returns a compliance CSID used only for testing.
- Your system sends sample invoices to pass the compliance checks.
- ZATCA issues the production CSID, which signs your real invoices.
- Before it expires, the certificate is renewed.
OTP errors
The OTP is valid only for a short time and can be used once. If onboarding fails with an invalid or expired OTP, generate a new one and use it right away.
Make sure the OTP comes from the right environment. A code from the simulation portal will not work for production, and the reverse is also true.
CSR and compliance CSID errors
A rejected CSR usually means the details inside it do not match what ZATCA expects.
- VAT number that does not match the one registered with ZATCA.
- Serial number or device name not in the required format.
- Invoice types in the CSR that do not match what you issue (standard, simplified or both).
- Wrong environment settings between simulation and production.
Failing the compliance checks
After the compliance CSID, ZATCA expects test invoices for each invoice type you declared, including credit and debit notes. If any fail, you will not get the production CSID.
- Send every required document type, not just one invoice.
- Fix XML errors such as missing address fields or wrong totals before retrying.
- Check that hashes and invoice counters follow on from each other correctly.
Expired or invalid certificates
Production certificates expire. When one lapses, invoices stop being signed and accepted, often without an obvious warning in your system. Track the expiry date and renew it before then.
Moving to a new server, restoring a backup or reinstalling software can also lose the private key. Keep it backed up securely, or you will need to onboard again.
Frequently asked questions
What is a CSID in ZATCA?+
A CSID is the certificate ZATCA issues to your invoicing system. The compliance CSID is for testing; the production CSID signs your real invoices.
My ZATCA OTP expired. What do I do?+
Generate a new OTP in the Fatoora portal and use it immediately. Each OTP works only once and only for a short time.
Why did my invoices suddenly stop being accepted?+
A common cause is an expired or lost certificate. Check the certificate expiry date and whether the private key is still on your system, then renew or re-onboard.
Can you fix onboarding for a system someone else set up?+
Yes. We work with ERPNext, Odoo, POS and custom software. We find where onboarding fails, fix it and get your device live.
Topics covered
Related reading
Need help building this?
CODEXTERS designs and builds software across ERP and ERPNext, ZATCA e-invoicing compliance, AI and data platforms, SaaS products, and startup MVPs — for companies of every size.