Bot Solutions


Get your business in compliance with e-invoicing phase 2 in Saudi Arabia

Set up your business for e-invoicing phase 2 in Saudi Arabia

In Saudi Arabia, bring your company up to date with phase two e-invoicing

Create fully compliant PDF/A-3 and XML invoices.

Connect to any ERP

Capable of handling millions of bills

Simple, up-to-date REST API

Deliver invoices as a PDF attachment via email to your clients.

Request a callback from our team

How do we generate e-invoices that comply?

Validating data to avoid penalties

More than 150 intelligent data validations ensure that invoice data complies with ZATCA regulations, resulting in error-free invoices.

XML generation compliant with ZATCA

ERPNext generates UUID, Invoice Hash, Invoice Counter Value, QR code & converts invoice into UBL 2.1 XML format

Utilizing ZATCA Integration for Reporting

To obtain clearance/report XML invoices and to receive certified XML back from ZATCA, ERPNext integrates with ZATCA.

Invoice in PDF A/3 with XML

To create the final PDF A/3 invoice, ERPNext adds a Phase II QR code and certified XML to the current invoice.

Invoice electronic exchange

Using the ERPNext automated email APIs, send your customer the completed PDF A/3 invoice.

KSA Cloud-based e-invoicing storage of data

Up to six years of e-invoice data archiving on SLA-based cloud servers

Benefits of the cloud-based e-invoicing software from ERPNext

We provide an extensive list of selected benefits to assist you in becoming fully ZATCA compliant well in advance of the deadline.

Simple modifications to POS or ERP

Seamless execution in a few of days

Compliance and accuracy

Intelligent dashboard and reporting

VAT and e-invoicing reconciliation made easy

E-invoice generation in bulk

How to get ready?


For Phase 2, which will be implemented in waves beginning on January 1, 2023, in addition to the Phase 1 requirements listed here, taxpayers should:

1. Use an invoicing solution that complies with phase two requirements:

- The ability to create and store e- invoices with all the fields needed in the required XML format or PDF/A3 with embedded XML.

- Verify that the e-invoicing solution satisfies all e-invoicing specifications, including having an internet connection.

2. Integrate ZATCA's Fatoora portal with an e-invoicing solution:

How does BOT Solution's E-invoicing work?

In Saudi Arabia, e-invoicing has moved into a new phase. It is crucial that businesses understand all aspects of this phase. The different integration modes that are available to comply with Saudi Arabia's Phase 2 e-invoicing regulations will be covered in this guide. Since it requires the integration of billing software and ERP/POS systems with the ZATCA's Fatoora portal, this phase is particularly important.

Through the Zakat, Tax, and Customs Authority (ZATCA), previously referred to as GAZT, the Kingdom of Saudi Arabia (KSA) has implemented e-invoicing in two phases. All VAT-registered taxpayers in the Kingdom of Saudi Arabia are eligible for e-invoicing, with the exception of those who are categorized as non-residents for VAT purposes.

ZATCA initiated the first phase of e-invoicing in Saudi Arabia on December 4, 2021. Furthermore, ZATCA has announced the following waves for Phase 2:

ZATCA e-invoicing Integrations: A Comprehensive Guide to ZATCA e-Invoicing and ERP Next

One of ZATCA's primary initiatives to digitize the invoicing process for Saudi Arabian businesses is e-invoicing. This required system aims to speed up the taxation process, reduce errors, and improve transparency by substituting electronically generated invoices for traditional paper-based invoices.

The ERP solution from ERPNext is alternative of Microsoft Dynamics 365 Business Central. It is complete business management tool that combines multiple functions such as accounting, human resources, sales, inventory, and more. Because of its well-known modular design, ERPNext enables companies to customize the system to meet their unique requirements, improving productivity, efficiency, and data accuracy.

Phase Two: Basics of E-Invoicing


Phase 2 of Saudi Arabia's e-invoicing system involves integrating billing software and ERP/POS systems to the ZATCA's Fatoora portal. To ensure tax compliance and transparency, this integration is required for the smooth generation and transmission of e-notes and e-invoices to the ZATCA.

There are many integration options on the market; the sort of integration you choose will depend on your business needs and the sort of e-invoices you want to produce.

Let's explore the various integration techniques and their implications.

ERP/POS Direct API Integration

Many people prefer this method of integration. Multiple ERP/POS systems can be connected via direct API integration using "Restful" APIs. This approach is very popular because it allows for easy creation of invoices with little modification to current systems.

Here's how it works:

    • Your ERP creates an invoice in JSON, CSV, or XML format with the needed fields, which it then sends to the selected e-invoice provider.

    • Important data like UUID, Invoice Counter Value (ICV), Previous Invoice Hash (PIH), and Invoice Hash (IH) are generated and validated by the e-invoice solution.

    • In an authorized XML format, the verified invoice data is submitted to ZATCA for clearance.

    • The e-invoice solution receives the cleared e-invoice with a QR code and cryptographic stamp after it has been cleared by ZATCA.

    • The ZATCA response is saved by the e-invoice solution, which also creates an e-invoice in PDF/A3 format with embedded XML.

    • In order to provide the buyer with the e-invoice, the ERP retrieves it along with a cryptographic stamp and QR code.

    • ZATCA compliance and seamless e-invoice issuance are guaranteed by this procedure.

Implementation Using SFTP


For strict data security policies, this integration is perfect. Secure file sharing between your system and the cloud servers of the e-invoice solution is a feature of SFTP-based integration. When tight data sharing and IT security regulations make direct integration impractical, this approach is used.

Here's how it works:

    • Within your IT landscape, you create an SFTP server and connect your ERP/POS systems to dump invoice data into it.

    • An "SFTP magnet" run by the solution provider transports invoice data from the SFTP server to the e-invoice system.

    • Once an invoice is accepted or denied, ZATCA notifies the e-invoice solution of its status.

    • After that, the ZATCA-compliant e-invoice is sent back to your ERP/POS.

    • This approach meets the security requirements of your organization while ensuring secure data transmission.

Mode of Database Integration


Integration for effective mapping of data. When you use the database-based integration mode, custom data mapping is used to integrate your systems with intermediate databases.

Here's how it works:

    • Within your IT landscape, you create a 'Staging Database' and a 'Local Agent'.

    • In order to share invoice data, connect your ERP/POS systems to the "Staging Database."

    • Invoice data is routed by the Local Agent via the "Secure API" to the e-invoice solution for reporting or clearance.

    • E-invoices that comply with ZATCA regulations begin to flow back to your ERP/POS over approval from ZATCA.

    • This mode enables effective data management and mapping while ensuring ZATCA compliance.

Integrating POS Systems


Perfect for streamlined tax bills. Using XML and QR codes, POS integration enables offline generation of e-invoices. ZATCA can receive these invoices on a regular basis.

Here's how it works:

    • You can create offline invoices with UUID, ICV, PIH, IH, QR code, and cryptographic stamp in your POS system.

    • You send buyers hard copy or electronic copies of your streamlined tax invoices right away.

    • The POS connects to the e-invoice solution at predetermined intervals to transmit e-invoice data in XML format for reporting.

    • The data transmission to ZATCA is managed by the e-invoice solution, which also stores the reporting status after validation.

    • The reported status of the streamlined e-invoices is retrieved by the POS.

    • This mode works well for creating simplified tax invoices that don't need ZATCA's immediate approval.

Data Upload Using Excel


For invoices that are simpler and for smaller businesses. The Excel-based data upload method might be appropriate if your company is generating few invoices and only needs to create simplified tax invoices.

Here's how it works:

    • Your order management systems prepare customized Excel templates, which you manually fill with invoice data to create electronic invoices in bulk.

    • You upload this data to your e-invoice solution, and it is transformed in accordance with ZATCA specifications.

    • The e-invoice solution generates e-invoices by sending the converted data to ZATCA's Fatoora portal.

    • This approach is best suited for companies with fewer invoices and specific needs.

Phase-2 Integration Developments with ERPNext


A major step toward reaching higher levels of operational optimization and compliance is the Phase-2 integration of ZATCA e-Invoicing with ERPNext.

The main improvements that result from this integration are:

    • Automated e-Invoice Generation: By integrating ERPNext, businesses can generate e-Invoices automatically, which minimizes the need for human intervention and reduces the possibility of data entry errors. In addition to expediting the invoicing process, this feature guarantees smooth compliance with ZATCA requirements.

    • Real-time Data Sync: Real-time data synchronization is carried out in real time between the ERP of BOT Solutions and the e-invoicing system of ZATCA. From sales to inventory management to taxation, this synchronization reduces disparities and upholds consistency across various business functions.

    • Easy Reporting: Companies gain from the easy e-invoice report generation that's possible to send to ZATCA. The reporting process is streamlined by ERPNext ERP reporting capabilities, which guarantee that the necessary data is easily accessible in a standardized format.

    • Effective Document Management: ERPNext system now allows businesses to handle electronic invoices and associated documentation with efficiency thanks to the integration. The process of centralizing makes it easier to retrieve documents and improves departmental collaboration.

    • Compliance Assurance: For businesses operating in Saudi Arabia, complying to ZATCA's regulations is essential. In order to ensure compliance with e-invoicing mandates and lower the risk of penalties or legal issues, the Phase-2 integration provides a strong framework.

Benefits to Business of Zatca Integration


Business operations are greatly impacted by the following numerous advantages of the Phase-2 integration of ZATCA e-Invoicing with Business Central ERP:

    • Time Savings: Time savings are significant when using automated e-invoicing and real-time data syncing. By eliminating manual data entry and reconciliation, employees can concentrate on tasks that add value.

    • Reduced Errors: Errors that occur during manual data entry are decreased. Accurate financial reporting and invoicing are encouraged by the integration, which reduces such mistakes.

    • Enhanced Productivity: Increased overall business productivity is a result of streamlined procedures and decreased manual intervention. Workers have time to devote to growth-oriented strategic tasks.

    • Improved Decision-making: Better Ability to Make Decisions Quick decision-making by businesses is facilitated by the availability of precise and current data. Resources can be allocated more effectively and strategies can be influenced by this real-time insight.

    • Cost-Effectiveness: Businesses can save money by getting rid of manual procedures and cutting down on errors, which can help them avoid penalties and save administrative overhead.

    • Sustainability over time: Using technology-driven solutions, such as the ERP integration offered by BOT Solutions, guarantees that companies are ready for any eventuality. Scalability and adaptability as business needs change are made possible by BOT Solutions ERPNext modular design.

The Phases 1 and 2 initiatives of ZATCA represent a significant change in Saudi Arabian invoicing practices. Modernization was made possible by the introduction of electronic tax invoicing during Phase 1's Generation phase. On the other hand, the integration phase of Phase 2 is concentrated on implementing higher standards, integrating with ZATCA's systems, and rolling out the changes gradually to ensure a more seamless transition. These sequential stages improve compliance, efficiency, and transparency in Saudi Arabia's invoicing environment while also streamlining business operations.

Phase 1 of e-invoicing in Saudi Arabia is the generation phase, and Phase 2 is the integration phase. In compliance with the phase 2 implementation of the Authority's applicable resolutions, taxpayers subject to e-invoicing regulations are required to integrate their system with the Zakat, Tax, and Customs Authority. These consist of the necessary conditions, technical details, control resolutions, and protocol guidelines.

Phased implementation of the second phase of e-invoicing will begin on January 1, 2023. Beginning on January 1, 2023, companies with annual revenue of more than $3 billion are eligible for the first wave. Beginning on July 1, 2023, enterprises with annual revenue of more than $500 million in FY 2021 will be subject to the second phase.

The following are the essential specifications for both B2B and B2C invoices.

System requirements for creating B2B invoices


When two businesses transact, meaning one provides goods or services to the other, a business-to-business (B2B) invoice needs to be created. Requesting a tax invoice from the seller in order to deduct input VAT is the buyer's responsibility. The business making the purchase will be assisted by the tax invoice in obtaining a refund or accurately paying the VAT incurred on the supply. The buyer and seller information, among other required fields, must be included on the invoice.

Access to the e-invoicing portal


The taxpayer's software solution needs to function flawlessly when it comes to internet connectivity. In the second phase of e-invoicing, the invoice needs to be cleared by the e-invoicing portal, so this is necessary. To facilitate clearance, the software solution must also be able to share invoices in real time with the e-invoicing integration portal. Every electronic invoice, along with the corresponding credit and debit notes, is subject to clearance. During the clearing process, the invoice is verified, authorized, stamped, and sent back to the taxpayer.

Generation of QR codes


Each time an invoice is created, the software system needs to be able to create a QR code. Part of the clearing process involves updating the QR code when the invoice is submitted to the e-invoicing integration portal. The buyer receives an invoice with this QR code printed on it. The invoice's timestamp, total, VAT, and cryptographic stamp are all included in the QR code, along with the seller's name and VAT registration number. The e-invoicing integration portal adds a cryptographic stamp to ensure security and consistency.

System requirements for creating B2C invoices


A business-to-consumer invoice is sometimes referred to as a simplified invoice due to the fact that it frequently omits user information. The customer's data must be included in the invoice automatically in some cases, like when providing medical or educational services, as these services are taxable. As a portion of these are covered by zero-rate VAT supplies, the authority is responsible for paying the tax.

B2C invoices must meet the following essential requirements:



The software system needs to be compliant and use the unique device ID to register on the e-invoicing integration portal. This falls under the second phase of e-invoicing's security and integrity requirements. Prior to utilizing the solution to produce B2C invoices, make sure it is registered.

QR code with a cryptographic stamp


The additional information required by the Authority for the second phase of e-invoicing must be included in the QR code generated for B2C transactions. The software system is required by the second phase of the e-invoicing regulation to generate the cryptographic stamp. Although it is embedded in the QR code, it is not visible on the printed invoice.

Internet Accessibility


For the purpose of simplifying e-invoice reporting, the software solution needs to be able to connect to the internet. Whenever an internet connection is available, the solution should enable the uploading of each invoice via the API to the e-invoicing integration portal. Real-time reporting is not required since clearance is not needed, but it must be completed within the time frame given by the ZATCA.

Invoicing reports


Since there is no need for clearance as there is with B2B invoices, the customer can receive the e-invoices immediately. But, the generated invoice needs to be shared with the e-invoicing integration portal 24 hours after it's issued. Reporting involves validating the streamlined electronic invoices and sending the taxpayer an acknowledgment via the API. B2B and B2C invoices share common essential system requirements.

In order to generate B2B and B2C invoices in the second phase of e-invoicing, the following are the essential system requirements that must be met.

Generating invoices online


Invoices for both B2B and B2C transactions must be generated electronically using a software system. Paper invoices that have been scanned using electronic devices are not considered electronic invoices because they were written on paper in the first place. Only electronic invoices generated by a software system and then printed for the buyer are considered e-invoices if they contain the mandatory fields specified by the authority.

Create invoices with all required fields


The invoices must be generated in XML format, and if they are generated in PDF/A3 format, they must have embedded XML. According to the integration phase standards, invoices must include all mandatory fields. QR code, invoice taxable amount, additional seller ID, and subtotal exclusive and inclusive of VAT at the line-item level are additional essential fields for B2B invoices. The additional essential field for B2C bills is the subtotal, which includes VAT at the line-item level.

Generating hash invoices and UUIDs


Standard e-invoices and simplified e-invoices must contain Universally Unique Identifiers (UUIDs), which must be generated by the taxpayer's software system. These distinguish one invoice from the others and are also known as Global Unique Identifiers or GUIDs for this reason. The UUID can be tracked, but it is not shown on the invoice. Similarly, even if they are not visible on the invoice, invoice hashes must be generated by the software. A hash is analogous to a digital footprint.

Archive in compliance with VAT regulations


As required by VAT rules and regulations, each invoice that is generated must be archived. The preserved invoice shall always be accessible to the Authority. For instance, if the data is kept on the cloud, a link needs to be given so that the Authority can obtain immediate access as needed. The VAT registration number, tax registration number, timestamp, and invoice reference number are required to appear on every invoice that is stored.

Software features that are prohibited


The ZATCA has listed the features that a system cannot have that are forbidden while creating invoices during the second phase. When an electronic invoice, credit note, or debit note is issued, the software cannot permit timestamp modifications. It should be against the law to export the stamping keys. The creation of non-sequential invoices, in which the sequence is random, is another function that is forbidden. The sequence needs to be kept in place in accordance with the e-invoicing standards to guarantee continuity, even in the event that an invalid e-invoice is generated.

Until it's time to execute the second phase of e-invoicing, a taxpayer must adhere to the phase 1 or generation phase standards.

Implementing B2B and B2C invoices with TallyPrime


ZATCA qualification indicates that TallyPrime is a compliant fatoora software that complies with ZATCA regulations. It can be utilized to create conventional or B2B invoices, as well as simplified or B2C invoices, for the first phase of electronic invoicing. For B2B and B2C invoicing, taxpayers can use different software, but TallyPrime complies with both so that you can complete basic invoicing with just one program. Credit notes, debit notes, POS invoices, and e-invoices are also supported. All e-invoicing tasks are viewable by generating the e-invoicing report. It also includes features for enhanced security. To accommodate the second stage of e-invoicing, TallyPrime will soon be improved. Ahead of the second phase of e-invoicing in Saudi Arabia, switch to TallyPrime.