Before You Start: What You Need
Before configuring ZATCA in Odoo 17, make sure the following are ready:
- Odoo 17 installation with the Accounting module activated
- ZATCA credentials for your business: Commercial Registration number, VAT number
- A valid email address linked to your ZATCA account to receive the digital certificate
- System administrator access to your Odoo instance
The setup process has two main stages: device registration and CSID (Cryptographic Stamp Identifier) extraction.
Step 1: Install the ZATCA Module in Odoo
- Go to Apps from the main Odoo menu
- Search for Saudi Arabia - E-invoicing or the technical name
l10n_sa_edi - Install the module and wait for it to complete
- Navigate to Accounting → Settings → Saudi E-Invoicing
On this screen you will find two critical fields:
- ZATCA Environment: Select “Sandbox” for testing first, then switch to “Production” when ready
- Initial OTP: This will be required later during certificate extraction
Step 2: Complete Your Company Data
Go to Settings → Companies and verify every field is accurate:
- Legal company name matching exactly what is registered in ZATCA
- VAT number (15 digits)
- Address: Region, city, district, street, postal code
- Commercial Registration (CR) number
Critical note: Any mismatch between Odoo company data and your ZATCA registration will cause invoices to be rejected by Fatoora. Cross-check against your VAT certificate.
Step 3: Generate a Certificate Signing Request (CSR)
The CSR is the request you send to ZATCA to obtain your CSID digital certificate.
From the e-invoicing settings screen:
- Click Generate CSR
- Enter the required device information (solution name, device type)
- Odoo will generate the CSR file automatically
Step 4: Register the Device and Extract Your CSID
- Log in to the Fatoora portal at fatoora.zatca.gov.sa
- Navigate to Devices → Register New Device
- Paste your CSR content into the designated field
- You will receive a one-time OTP to the registered email address
- Return to Odoo and enter the OTP in the “Initial OTP” field
- Click Extract Certificate — Odoo will receive the CSID directly from ZATCA
Step 5: Test Thoroughly in Sandbox
Before moving to production, test every invoice scenario:
Invoice types to test:
- Standard tax invoice (B2B)
- Simplified invoice (B2C)
- Credit note
- Debit note
For each one, verify that:
- The invoice receives a cryptographic stamp from ZATCA
- The QR code is valid and scannable
- Both XML and PDF formats download correctly
Step 6: Switch to Production
Once all sandbox tests pass:
- Change the ZATCA environment from Sandbox to Production
- Generate a new CSR for the production environment
- Register a new device in the Fatoora portal (production environment)
- Extract the production CSID
Your system is now live for ZATCA Phase 2 e-invoicing directly from Odoo.
Common Problems and How to Fix Them
| Problem | Likely Cause | Fix |
|---|---|---|
| CSID rejected | Company data mismatch | Verify all fields match ZATCA registration exactly |
| Invoice not stamped | Connectivity issue | Check firewall rules allow outbound calls to Fatoora API |
| Invalid QR code | Outdated Odoo version | Update to the latest Odoo 17 release |
| VAT calculation error | Incorrect tax setup | Verify 15% VAT is correctly mapped to products |
Want Someone to Handle the Setup?
A complete ZATCA setup typically takes one to two working days and requires hands-on experience with both Odoo and the Fatoora platform. Configuration mistakes in production can halt your invoicing operation or result in ZATCA rejecting invoices — a costly situation to unwind.
At AlAfaq Alamiah, we handle the full implementation: CSR generation, certificate extraction, end-to-end testing, and team training — with no disruption to your current operations.