Announcing the launch of the Saudi Zatca-2 E-Invoicing app on FrappeCloud

We’re thrilled to announce the launch of the Zatca-2 E-Invoicing app on FrappeCloud! In this release, we’ve removed all Java and SDK dependencies, ensuring full compatibility with FrappeCloud

In this release, we’ve removed all Java and SDK dependencies, ensuring full compatibility with FrappeCloud’s robust security features. We’ve also refactored the code for enhanced performance and reliability. plus, it’s 100% open-source.

A huge shoutout to the Zatca account managers for their invaluable advice, our amazing clients for their cooperation during the development and testing phases, and a special thanks FrappeCloud team

A heartfelt thank you to our incredible development team, for their dedication and hard work in making this launch a success.

Addressed two major concerns from our Saudi clients regarding the move to FrappeCloud:

  1. **Data Sovereignty: ** Frappe has launched a new data center in Jeddah. (Data sovereignty law requires Saudi companies to host financial data inside Saudi Arabian geographical boundaries.)

  2. **Missing E-Invoicing App: ** We’ve published the Zatca-2 app.

Also, we are adding other Govt integrations like Visa processes, Insurance, Medical, and Payment gateways for Saudi ERPNext users. Keep watching this space.

With these solutions in place, this is the perfect time to transition from hosting companies outside Saudi Arabia to FrappeCloud (Jeddah) to ensure legal compliance in both data sovereignty and e-invoicing, as well as for better latency and speed. Our team can help you to migrate.

As we continue to enhance the Zatca-2 E-Invoicing app, we’d love to hear from you! If you have any suggestions for bug fixes or feature additions, please lets know. Your input is invaluable in helping us create the best experience possible.

Join us in celebrating this milestone and experience the new and improved Zatca-2 E-Invoicing app!


For professional support for the implementation, please contact

adding QR code on sales invoice print format- use these lines on Jinja

<img align="right" class="qr-code" src="{{ frappe.db.get_value('File', {'attached_to_name': [](}, 'file_url') }}" style="width: 20%; margin-top:auto">

Some clients reported from Zatca - HTTPSConnectionPool(host=‘’, port=443): Max retries exceeded with url: /e-invoicing/core/invoices/clearance/single (Caused by NewConnectionError(‘: Failed to establish connection: [Errno -3] failure in name resolution’

It is a DNS issue. Changing server DNS to any public DNS like will solve the issue.

We have made an update today, with some bug fixes and additional features. Please pull or update GitHub - ERPGulf/zatca_erpgulf: Implementation of Zatca Phase-2 E-Invoicing - for FrappeCLoud

This update corrected many issues reported while adding multiple company CSR.
also bug fixes on QR code attachments.

“data”: [
“company”: “PD”,
“csr_config”: {
“”: “TTST-886431145-399999999900003”,
“csr.serial.number”: “1-TST|2-TST|3-ed22f1d8-e6a2-1118-9b58-d9a8f11ed588”,
“csr.organization.identifier”: “301139569910003”,
“”: “2050009977”,
“”: “2050009977”,
“”: “SA”,
“csr.invoice.type”: “1100”,
“csr.location.address”: “Dammam”,
“”: “limited liability company”

Same error .please help me

Screenshot from 2024-06-05 20-23-24

Screenshot from 2024-06-05 20-22-10

1 Like

did you update latest ?

Yes today updated to latest

are you doing it in a staging server? in that case please share instance details with . our team will look into this issue.

how phase 2 of zatca work in frappe cloud without phase 1 ?

in V15 there is no phase 1.


CSR Data is created. Now it is showing Below error…please guide me

You might be creating Produciton CSR and using simulation OTP, or vice-versa. Conirm it.

I am using Simulation CSR and Simulation OTP. I was already onboarded on a local instance using ZATCA2024 app dependencies of SDK. Now, I am onboarding from Frappe Cloud with the same VAT ID. Could this be causing an issue?

OTP is for one time use, and expires within an hour.
However, there is no issue if you are using two OTP for two devices.

please reply

There is pre-requisite for Phase-1 app for Phase-2 app. Its totally independent.

Those who enrolled on Phase-2 no more required to use Phase-1. The bar-code they need to print on invoice is from Phase-2 app only.

I am using OTP within 1 hour.

Is there any issue in below csr .please check and also csr.serial.number need to enter any specific format