Skip to Content
Menu

ZATCA Integration

by
Odoo

200.00

v 18.0 Third Party
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Invoicing (account)
Discuss (mail)
Lines of code 193
Technical Name zatca_integration
LicenseLGPL-3
Websitehttps://www.taqnix.com
Versions 16.0 17.0 18.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Invoicing (account)
Discuss (mail)
Lines of code 193
Technical Name zatca_integration
LicenseLGPL-3
Websitehttps://www.taqnix.com
Versions 16.0 17.0 18.0

KSA Phase-2 e-Invoicing (Fatoora) Integration

Integrate your e-Invoicing and stay 100% ZATCA compliant.

Introduction

The KSA Phase-2 e-Invoicing Integration module is developed to ensure full compliance with the e-invoicing regulations mandated by the Zakat, Tax and Customs Authority (ZATCA) in the Kingdom of Saudi Arabia. This module integrates with Odoo ERP and automates the end-to-end e-invoicing workflow as required under ZATCA's Phase-2 guidelines.

This solution enables businesses to:

  • Seamlessly onboard to ZATCA's e-invoicing platform.
  • Generate, sign, and submit Phase-2 compliant electronic invoices.
  • Validate invoices in real-time against ZATCA's APIs.
  • Ensure auditability and traceability of e-invoice data.
  • Maintain continuous compliance with minimal manual intervention.

By integrating directly with ZATCA's Fatoora platform, the module ensures that organizations meet all regulatory obligations while optimizing operational efficiency and reducing the risk of non-compliance.

ZATCA E-Invoicing Settings

Configure your API Mode (Sandbox, Pre-Production, Production) under Settings > Invoicing > Settings > ZATCA E-Invoicing Settings:

Invoicing Settings with API Mode and Warning

Company Master Data Configuration

Under Settings > Users & Companies, fill in your company's legal and ZATCA-specific identification details:

  • Country: Select Saudi Arabia
  • Building Number: Enter the official building number as recorded on your company's registration documents.
  • Plot Identification Number: Provide the cadastral plot number assigned to your registered premises.
  • Identification Scheme: Select the appropriate ID type (e.g., Commercial Registration).
  • Identification Number (SA): Your company's national ID in Saudi Arabia.
  • VAT Number: The 15-digit VAT registration for ZATCA reporting.
  • Company ID: Unique internal reference for your company.
  • Currency: Ensure it's set to SAR for compliance.
Company Settings form displaying Identification Scheme, VAT Number, Company ID, Currency

Company Master Data Configuration

Under Settings > Users & Companies, fill in your company's legal and ZATCA-specific identification details. For example:

  • Country: Select Partner Country
  • Building Number: Enter the official building number as recorded on your partner registration documents.
  • Plot Identification Number: Provide the cadastral plot number assigned to your registered premises.
  • Identification Scheme: Select the appropriate ID type (e.g., Commercial Registration).
  • Identification Number (SA): Your partner national ID.
  • VAT Number: The 15-digit VAT registration for ZATCA reporting.
  • Company ID: Unique internal reference for your company.
Company Settings form displaying Identification Scheme, VAT Number, Company ID, Currency

Journal Onboarding (ZATCA Tab)

Configure your Sales Journal to connect with ZATCA by following these steps:

  1. Enter Serial Number: In the ZATCA tab of Configuration > Journals > Customer Invoices, set a unique device serial number. For example: 1234-ABCD-5678.
  2. Onboard Journal: Click the Onboard Journal button to initiate the compliance setup process.
ZATCA Tab showing Serial Number field and Onboard Journal button

Requesting Compliance Certificate (CSID)

1. Log into the ZATCA Fatoora Portal (fatoora.zatca.gov.sa) with your ERAD credentials.
2. Navigate to the Onboard New Solution Unit/Device tile and click Generate OTP code (you can request up to 100 codes at once).
3. Copy or download the OTP(s), valid for one hour
4. Enter the OTP into the dialog below to validate and retrieve your CSID.

Watch a quick demo: Connecting Your Account to ZATCA Portal
Full instructions: Fatoora Portal User Manual (PDF)

OTP Input Dialog for Requesting CSID

Journal Onboarding Status

View the ZATCA tab on your Sales Journal to check which onboarding steps are completed:

ZATCA Tab Showing Completed Onboarding Steps

Submit an Invoice to ZATCA

On a Posted invoice form, click Submit to ZATCA to send it immediately:

Submit to ZATCA Button on Invoice Form

Bulk Submission of Invoices

Select multiple invoices in the list view and use the Submit to ZATCA action to send them all at once:

Bulk Submit to ZATCA Action in Invoice List

Invoice List: E-Invoice Status

Quickly see which invoices are 'Not Sent', 'Sent', 'Cleared' or 'Reported' in your Invoices list view:

Invoices List Showing ZATCA E-Invoice Status Column

Submission Confirmation & Logs

After successful submission, view the confirmation note and audit trail in the chatter:

Chatter Message Confirming Invoice Submission to ZATCA

ZATCA API Integration – Submission Mode Settings

In the Accounting settings, configure how Odoo communicates with ZATCA's e-invoicing API. This setting is crucial for ensuring proper invoice submission.

API Mode Selection

Sandbox: This is ZATCA's test environment, ideal for trial runs and development. It simulates the submission process without legal consequences, so you can safely test the onboarding steps here.

Pre-Production: A staging environment for advanced testing, closer to the real ZATCA system and used before going live. It is still safe to test here without submitting real invoices.

Production: The live environment where invoices are legally submitted to ZATCA. Once set to Production, you cannot revert to Sandbox or Pre-Production. Be cautious: any invoice submitted in Production mode is legally binding and subject to audit, fines, and penalties if not compliant.

Odoo API Mode Configuration Screenshot

Important Warning: “Once you change the submission mode to Production, you cannot change it anymore. Be very careful, as any invoice submitted to ZATCA in Production mode will be accounted for and might lead to fines & penalties.”

This warning is to ensure you fully understand the responsibility of switching to Production mode. Any mistakes (such as sending test data or invalid invoices in Production) can have serious consequences.

Recommended Practice

  • Always start in Sandbox mode. Complete the onboarding and test the end-to-end invoice flow in this environment.
  • Only switch to Production mode once you are confident everything is working smoothly and fully compliant.
  • Before going live, triple-check all configurations (company information, invoice format, QR codes, ZATCA certificates, etc.).

How It Works

  1. Onboarding: You upload a CSR to ZATCA and receive a Compliance CSID. Using this CSID (and the provided Request ID), you then obtain a Production CSID.
  2. Invoice Generation: You create standard or simplified invoices in Odoo as usual. A compliant QR code and barcode are automatically added to each invoice, and the invoice is validated for compliance.
  3. Submission to ZATCA: Based on your configuration, invoices are sent to ZATCA either manually or automatically. Any submission errors are logged, and you are notified for corrective action.
  4. Reporting & Archival: You can view the status of all sent invoices. Confirmation receipts and error logs are securely stored for auditing and compliance purposes.
Invoice Submission Screenshot

API & Technical References

  • Fatoora Portal Login - https://login.gazt.gov.sa
  • Sandbox Developer Portal - https://gw-fatoora.zatca.gov.sa/e-invoicing/developer-portal
  • Simulation API Endpoint - https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation
  • Production API Endpoint - https://gw-fatoora.zatca.gov.sa/e-invoicing/core

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.