Frappe Cloud Support Partners Foundation Frappe School

[Saudi Arabia] E-Invoice

General Authority of Zakat and Tax (GAZT) announced that its Board of Directors approved e-invoicing regulations.
Businesses operating in Saudi Arabia have to be ready by 4-Dec-2021 to prepare for issuing and processing e-invoices.

Following implementation of e-invoicing, businesses will provide transactional data to GAZT on a real-time basis.

AFG records to be automated with instant data access with Security control for review, in case of any discrepancies will likely trigger GAZT enquiry and audit activity.

Key Objectives:

The primary objective of GAZT introducing an e-invoicing framework in KSA are

  1. Reducing Shadow economy/Commercial Concealment
  2. Increase compliance with Tax obligations
  3. Adopting Global best practices
  4. Enabling fair competition and improving consumer protection


Phase1 - Dead line Generation of Electronic Invoices and Electronic Notes, including provisions related to its processing, and record keeping, effective 4-Dec-2021

Phase2 - Dead line iintegration phase, transmission of Electronic Invoices and Electronic Notes, and sharing them with the Authority 1-Jun-2022

5 Pillars of E-Invoicing of Compliance Requirements

  • Electronic storage-Generation and storing of tax invoices and electronic notes in structured electronic format.|

  • Data Protection- Solution used is tamper-proof and includes a mechanism that allows detection of any data intervention or manipulation.|

  • Cyber Security- Compatibility with all the requirements and controls applied in Saudi Arabia in relation to data or information security or cybersecurity.|

  • Connectivity- Ability to connect with the Internet or with an external systems using an|

  • Integration of e-invoice solution with GAZT system for data sharing and collaboration.|

Scope of the application

Generation of Electronic Invoices and Electronic Notes, including provisions related to its processing, and record keeping, effective 4th December 2021 .

Integration phase, transmission of Electronic Invoices and Electronic Notes, and sharing them with the Authority, which shall be implemented through phases starting from 1st June 2022.

Technical Requirement details for E-invoicing

E-invoice generation & storage requirements covering types of invoices, invoice formats and invoice structure as per Annexure 1 & 2.
Security and stamps requirements covering cryptographic stamping, hashing, etc.

– Cryptographic Stamp

  • With regards to Electronic Tax Invoices and their associated Electronic Notes, the Authority shall create the Cryptographic Stamp after receiving.|

  • With regards to Simplified Tax Invoices and their associated Electronic Notes, the Cryptographic Stamp shall be generated by a Compliant E-Invoice Generation Solution|

– Universally Unique Identifier (UUID)

  • The Compliant E-Invoice Generation Solution must be able to generate a Universally Unique Identifier (UUID) for Tax Invoice, Simplified Tax Invoice, and their associated notes.|

  • UUID is a 128-bit number, generated by an algorithm chosen to make it unlikely that the same identifier will be generated by anyone else.

– Hash Tagging

  • The Compliant Solution must be able to generate a hash for each generated Electronic Invoice or Electronic Note.|

  • The hash of the invoice is then embedded in the next invoice in the sequence.|

  • QR Code
    The Compliant Solution must be able to generate a QR code.

– Invoice Counter
The Compliant Solution must have a tamper-resistant invoice counter that cannot be reset.

– Data Protection

  • Tamper-resistant and include a mechanism which prevents tampering.|

  • Prevent Manipulation and Alteration.

  • Archiving the database without Internet

– Connectivity requirement

  • Able to establish an encrypted and authenticated connection (such as TLS) over the internet|
  • Protect usability, reliability, integrity, and safety of data over communication channels|
  • Ability to periodically upload e-invoices and their associated notes in batch to external API (Simplified Tax Invoice only and the associated notes)|
  • Ability to submit invoices and their associated notes in real-time and receive a response (Electronic Tax Invoice only and the associated notes)|
  • In case the solution is offline, e-invoices and any associated notes are queued, and the solution remains operational, invoices and notes are reported after connection re-established|

– Integration

  • The Compliant Solution must be able to connect to an internet connection and integrate with external systems by using the Application Programming Interface (API).
  • Format Electronic for Integration.
  • XML format or PDF/A-3 format (with embedded XML).

Prohibited functions

– Access Controls

  • Anonymous access
  • Ability to operate with the default password
  • Absence of user session management

– Tampering

  • Allow alteration or deletion of generated e-invoices or their associated notes
  • Allows for log modification/deletion
  • Generated with inaccurate timestamps
  • Non-sequential log generation
  • Invoice counter reset
  • Ability to generate more than one invoice sequence at any given time
  • Provide an option to export cryptographic stamp stamping key
  • Allow software time changes
  • Allow modification of timestamp value during invoice or note-issuing

Verification /Certification of E-Invoice Solution

The E-Invoice Solution shall be considered as compliant after verifying its conformity to all specifications and requirements by the Authority, third party, or self-certified by the person subject to E-Invoicing Regulation.

Scope of the Project

Electronic Invoices shall include Tax Invoices, Simplified Tax Invoices & Notes
Transactions subject to E-Invoicing Regulation and in the scope.

  • Supplies of goods and services, either they are subject to the standard VAT rate or Zero rate;
  • Export of goods and services from the Kingdom;
  • Intra-GCC supplies in accordance with the Agreement, VAT law and its Implementing Regulation;
  • Nominal supplies by the taxpayer in accordance with the Agreement, VAT, and Implementing Regulation;
  • Any payments related to supply of goods or services and received by the taxpayer (Advances Payments)

Electronic Notes must be issued shall include the following:

  • Cancellation or suspension of the supplies after its occurrence either wholly or partially
  • In case of essential change or amendment in the supply, which leads to the change of the VAT due
  • Amendment of the supply value which is pre-agreed upon between the supplier and consumer
  • In case of goods or services refund.

For More technical details :

Electronic Invoice Data Dictionary.Excel
Electronic Invoice Security Implementation Standards
Electronic Invoice Data Dictionary


Same thing in Serbia. An xml format file will have to be provided. And it has to be ready by 2022.

1 Like

@Mohammed_Redha thanks for the detailed scoping. Are you working on it’s implementation as well?

Here is some of the regional features already developed for e-invoice feature.

Both of above are open-source

As indicated earlier, please let us know if you are working on the specifics, so that we can collaborate to make a generic design, merged in core and have it maintained by Frappe in the long term.

Cc: @nabinhait @Saqib_Ansari @Deepesh_Garg @saifi0102


Hello @Mohammed_Redha

Whats been your progress on this requirement?

I have to do something similar and could benefit from your progress. Please let me know


Hi Adam, Did you get any solution?