Back to projects

Oracle APEX

ZATCA E-Invoicing Integration

Implementing linking the ERP system with the Zakat, Tax and Customs Authority (ZATCA) - Phase Two - and applying the electronic invoicing system.

ZATCA E-Invoicing Integration

Project overview

The second phase of integrating the ERP system with the Saudi Zakat, Tax and Customs Authority (ZATCA) and implementing the electronic invoicing system was completed. The entire integration was implemented natively within the Oracle database environment using Oracle APEX interfaces, ensuring the highest speed and reliability in data response without the need for any external middleware. The integration process included:

  1. Developing an internal engine to generate XML files using the UBL 2.1 standard, embedding digital signatures, and creating QR codes to guarantee real-time authentication.
  2. Managing the digital certificate lifecycle, from extracting compliance certificates (CCSIDs) and passing developer portal and simulation tests, to issuing and activating production certificates (PCSIDs) for actual integration.
  3. Automatically distinguishing between standard tax invoices (B2B) and directing them to the clearance process, and simplified invoices (B2C) and directing them to the reporting process.
  4. Implement a Database Locking mechanism to ensure the accuracy of the ICV (Incoming Invoice Value) and link each invoice to the previous invoice's hash (PIH).
  5. Process credit and debit notices by automatically linking them to the original invoices and deriving their characteristics to ensure a sound financial flow and prevent technical rejection by the authority's portal.

OutcomeAfter a series of intensive tests, the connection via APIs was successfully activated in the production environment.

CSSHTMLJavaScriptJQueryJWTOracle APEXOracle DatabaseOracle 19cORDSPL/SQLRESTful APIsSQLwebhookZATCA