Types of Integrations Available to Comply with Phase 2 of ZATCA e-Invoicing

Updated on :  

08 min read.

The Kingdom of Saudi Arabia (KSA) announced the implementation of e-invoicing in two phases through Zakat, Tax and Customs Authority (ZATCA), earlier known as GAZT. e-Invoicing in KSA applies to all VAT-registered taxpayers except those categorised as non-residents for VAT purposes.

ZATCA initiated phase 1 of e-invoicing in Saudi Arabia w.e.f 4th December 2021. Also, on 17th June 2022, ZATCA announced the first wave of phase 2 and stated that businesses whose turnover is more than SAR 3 billion in 2021 must implement phase 2 from 1st January 2023.

Phase 2 of KSA e-invoicing is crucial as the taxpayers must integrate their ERP/POS systems/ billing software with ZATCA’s Fatoora portal. Several types of integration solutions are available in the market, including direct API integration, SFTP-based integration, database-based integration, POS integration, etc.

Hence, choosing the integration mode with the e-Invoicing solution mode is important and is based on the business requirements and type of e-invoices to be generated. This article explains all the types of integrations available to comply with phase 2 of e-invoicing in Saudi Arabia.

Let’s go through the integration modes one by one.

Direct API integration with ERP

You can integrate multiple ERP/POS units with ‘Restful’ APIs in the direct API integration method. This integration method is highly preferred as it results in smooth invoice generation with minimal changes to the existing ERP/ POS/ billing systems.

If you are required to generate standard tax invoices, you must keep your integration online all the time. The e-invoicing process for the always-online mode under direct API integration will be as follows:

  1. Your ERP generates an invoice and shares the same with the adopted e-invoice solution with the required mandatory fields in JSON, CSV or XML format.
  2. Then, the e-invoice solution validates and generates UUID, Invoice Counter Value (ICV), Previous Invoice Hash (PIH), and Invoice Hash (IH). After that, it sends invoice data in a specified XML format to ZATCA for clearance.
  3. Once ZATCA clears the standard tax invoice, ZATCA shares the cleared e-invoice with a QR code and cryptographic stamp with the e-invoice solution.
  4. Now, the e-invoice solution stores the ZATCA response and generates the e-invoice in PDF/A3 format with embedded XML.
  5. ERP gets the e-invoice with a QR code and cryptographic stamp.
  6. Finally, you can issue the ZATCA-compliant e-invoice to the buyer in PDF/A3 with embedded XML.
  7. e-Invoice solution or the ERP can archive the generated e-Invoice for future requirements.

However, when you are required to generate simplified tax invoices only, then you can keep the integration online at specific intervals or whenever you plan to report them to ZATCA. The e-invoicing process for the online option mode will be as follows:

  1. Your POS generates an invoice and shares the same with the adopted e-invoice solution with the required mandatory fields in JSON, CSV or XML format.
  2. Then the e-invoice solution validates and generates UUID, ICV, PIH, IH, QR code and cryptographic stamp. After that, it sends invoice data in a specified XML format for reporting.
  3. The e-invoice solution gets the e-invoice reporting status and stores it. After that, it generates the e-invoice in PDF/A3 with embedded XML.
  4. POS gets the reported e-invoice with a QR code and cryptographic stamp.
  5. Finally, you can issue the reported e-invoice to the buyer in a physical copy or soft copy in PDF/A3 with embedded XML.
  6. e-Invoice solution or the ERP can archive the generated e-Invoice for future requirements 

Please note that you must issue the simplified tax invoice to the buyer immediately at the time of sale if you are not reporting them in real-time. Later, once you report them and get the ZATCA-compliant e-invoice, you can share it via mail or online with the buyer.

SFTP-based integration

You can implement secure file sharing via SFTP between your system and e-invoice solution cloud servers. This integration method is preferred when direct integration is impossible amid your organisation’s strict data sharing and IT security policies.

The e-invoicing process for the SFTP-based integration mode will be as follows:

  1. First, you must create an SFTP server within your IT landscape and connect all your ERP/ POS systems to dump the invoice data in the SFTP server created.
  2. Then, the invoice data flows to ZATCA in this path: SFTP server → SFTP magnet (managed by the e-invoice solution provider) → e-invoice solution (via ‘Secure API’) → ZATCA (for clearance/ reporting based on the type of invoice).
  3. Once ZATCA approves/rejects the invoice, it shares the invoice status with the e-invoice solution.
  4. After that, the ZATCA-compliant e-invoice flows back to ERP/ POS in this path: e-Invoice solution → SFTP magnet (via ‘Secure API’) → SFTP server → ERP/ POS.

Database integration mode

In the database-based integration mode, your systems will be integrated with intermediate databases with bespoke data mapping.

The e-invoicing process for the database-based integration mode will be as follows:

  1. First, you must create a ‘Staging Database’ and a ‘Local Agent’ within your IT landscape.
  2. Then connect all your ERP/ POS systems with the ‘Staging Database’ to share the invoice data.
  3. Then, the invoice data flows to ZATCA in this path: Local Agent → e-invoice solution (via ‘Secure API’) → ZATCA (for clearance/ reporting based on the type of invoice).
  4. Once ZATCA approves the invoice, it shares the invoice status with the e-invoice solution.
  5. After that, the ZATCA-compliant e-invoice flows back to ERP/ POS in this path: e-Invoice solution → Local Agent (via ‘Secure API’) → Staging Database → ERP/ POS.

POS integration

In the POS integration method, you can generate e-invoices offline with XML and QR codes and later report the invoices to ZATCA at regular intervals via the internet. This mode is suitable for generating simplified tax invoices as they do not require real-time clearance from ZATCA.

The e-invoicing process for POS integration mode will be as follows:

  1. You can generate invoices in POS offline along with UUID, ICV, PIH, IH, QR code and cryptographic stamp using the PCSID.
  2. You must issue the simplified tax invoice to the buyer immediately at the time of sale in a physical copy with a QR code or PDF/A3 with embedded XML.
  3. After that, POS connects with an e-invoice solution at defined intervals and sends the e-invoice in a specified XML format for reporting.
  4. Then, the e-invoicing solution sends e-invoice data to ZATCA.
  5. Once ZATCA validates the e-invoice, the e-invoice solution gets the e-invoice reporting status and stores the status against the invoice..
  6. Finally, POS gets the reported status of the simplified e-invoices.
  7. The POS or e-Invoice solution could archive the invoice for future requirements.

Excel-based data upload

You can opt for excel based data upload method if you 

  • Need to generate only simplified tax invoices
  • Have less number of invoices
  • Planning for an offline integration model

You can create e-invoices in bulk by uploading data via customised excel templates prepared by your order management systems. However, you must manually fill up all the invoice data and then upload it to your e-Invoice solution, which in turn sends it to ZATCA’s Fatoora portal after necessary transformations to generate the e-invoices.

UI-based integration for e-invoicing in KSA

This integration mode is the most easiest way to generate e-invoices during phase 2 of KSA e-invoicing if you do not have an ERP or order management system. The cloud-based e-invoicing solutions prepared using the latest technologies provide an easy-to-use web UI interface. This interface lets you create an invoice easily from scratch and then convert it to an e-invoice in a single click.

ClearTax is one such e-invoicing solution provider in Saudi Arabia that offers many curated benefits and helps you get 100% ZATCA compliant ahead of the deadline. ClearTax e-invoicing software comes with many smart features, as follows:

  • ClearTax’s restful APIs lets you integrate with ZATCA with minimal changes to any ERP or POS.
  • You can automatically register hundreds of ERP/POS systems in a single click with ZATCA and receive the cryptographic stamp for each device.
  • ClearTax APIs will be a middleware connecting the ERP/POS and ZATCA system, ensuring 100% e-invoicing compliance.
  • Once the ERP/POS system finalises invoices, ClearTax APIs automatically send invoice data to the ClearTax cloud platform for submitting the same in the Fatoora portal.
  • Also, ClearTax archives e-invoice data for up to 6 years on SLA-based cloud servers.

How can ClearTax help generate phase 2 compliant e-invoices in Saudi?

  • ClearTax provides 150+ smart data validations to ensure invoice data is as per ZATCA regulations and generates error-free e-invoices.
  • ClearTax e-invoicing solution generates UUID, ICV, IH, and QR codes & converts invoices into UBL 2.1 XML format.
  • ClearTax integrates with ZATCA to report XML invoices & receives approved XML back from ZATCA.
  • ClearTax adds Phase II QR code & approved XML into an existing invoice to generate the final PDF A/3 invoice.
Hide →
CONTENTS
Explore more
Book a demo

Please fill in your details and our representative will get in touch with you shortly

Thank you for your response

Our representative will get in touch with you shortly.