On this page
What is e-invoicing in Saudi Arabia?
It is a tax invoice created in a structured electronic format (XML) with a QR code and sent to the Zakat, Tax and Customs Authority through its Fatoora platform. It is not a PDF sent by email; it is a structured data document that systems can read.
People search for it as “ZATCA invoice”, “Fatoora”, “Saudi e-invoicing” or “tax invoice software”. All of them describe the same duty: issue tax invoices electronically to the authority’s specification. In Anzma this duty is handled by the ZATCA module, part of the e-invoicing software line that covers Egypt and Saudi Arabia.
The module switches on automatically for companies created in Saudi Arabia when the business template includes sales. You do not key the invoice into a second tool; the invoice you issue in sales and invoicing software is the one that gets sent.
What is phase 2 and what does it require?
Phase 2 is the integration phase: your invoicing system connects to the authority’s platform to send invoices, whereas phase 1 (generation) only required creating the invoice electronically with a QR code.
Technically it needs four things: a digital certificate for each invoicing unit (CSID), a signature on every invoice made with it, a tamper-evident numbering chain linking each invoice to the hash of the previous one, and a QR code carrying extra data including the hash and signature. The ZATCA module builds these for you.
Fine detail, from code lists to size limits and dates, is published and updated by the authority in its developer documentation. That is why Anzma keeps its integration settings in a configuration file that can be corrected without changing code, and why the authority’s documents remain the reference.
What is the difference between clearance and reporting?
In clearance the authority checks a standard tax invoice and returns it approved before you hand it to your customer. In reporting a simplified invoice goes to the customer first and is reported to the authority within a set period.
Anzma picks the flow from the invoice type. A standard tax invoice, usually between two businesses, goes to clearance and is printed from the cleared copy the authority returns. A simplified invoice, usually a consumer sale at the counter, goes to reporting. By default a customer with a registered tax number gets a standard invoice, and one without gets a simplified invoice.
| Aspect | Standard tax invoice | Simplified invoice |
|---|---|---|
| Usually addressed to | A business (B2B) | A consumer (B2C) |
| Flow | Clearance before delivery | Reporting after delivery |
| Who checks first | The authority, returns it cleared | Your system, then reported |
| Sending window | Before it reaches the customer | Within the window the authority sets |
| Printed from | The cleared copy | Your invoice with a QR code |
How do you connect Anzma to Fatoora step by step?
Onboarding is split between the authority’s portal and Anzma’s screens, and it is done per invoicing unit: three branches or two POS devices means one registration each. Start in the developer portal or simulation environment before production.
- 1
Register on the authority’s portal
On the authority’s side: register your business on the Fatoora portal and generate the one-time password (OTP) for each invoicing unit. You will need it in step three.
- 2
Create an EGS unit
On the EGS units screen add one unit per POS device or branch, name it, link it to the device or branch, and set a default unit.
- 3
Onboard and get the compliance certificate
On the onboarding screen Anzma generates the signing key and certificate request with the required fields, and sends it with your OTP to get a compliance certificate.
- 4
Pass the compliance checks
Anzma sends sample invoices of each type (standard and simplified, with credit and debit notes) for the authority to accept before it issues the production certificate.
- 5
Production certificate and sending
After the checks pass the production certificate is issued and stored encrypted. Choose the environment, then send invoices manually or automatically on issue.
- 6
Monitor and renew
Every invoice appears with its status on the ZATCA documents screen, and you are reminded before the certificate expires so you can renew it.
What does the QR code contain and how is an invoice signed?
The QR code carries the core invoice data in TLV format (tag, length, value): seller name, tax number, issue time, total and VAT. In phase 2 it adds tags for the invoice hash, signature, public key and certificate signature, which are tags 6 to 9 on simplified invoices.
The document is signed electronically with the invoicing unit’s key, and the system computes a SHA-256 hash and links it to the unit’s chain. All of this happens inside the sale itself, so the invoice that prints already has its final code. For Saudi companies not yet onboarded the phase 1 code (tags 1 to 5) stays on the invoice until onboarding replaces it.
The private key is never shown to anyone. It is stored encrypted in your company’s account, and only signatures leave it.
Does it support POS and multiple branches?
Yes, through invoicing units. Each POS device can be its own invoicing unit with its own chain, and each branch can have a unit. When an invoice is issued Anzma picks the unit in order: the POS device’s unit, then the branch’s unit, then the default unit, provided it can sign.
A POS sale here is an ordinary simplified sales invoice: it deducts stock and posts to accounting like any invoice, then enters the reporting flow. Returns are issued as credit notes linked to the original invoice, which is how a sent invoice is corrected.
- One invoicing unit per POS device or per branch.
- An independent counter and hash chain per unit.
- Returns and credit notes linked to the original invoice.
- POS invoices deduct stock and post to the books before sending.
What happens if an invoice is rejected or the connection drops?
Every invoice has a clear status: queued, submitted, cleared, reported, rejected or failed. If the authority rejects one, the returned errors and warnings are stored and shown so you can fix the cause and resend from the same screen.
If the platform cannot be reached, selling carries on, because sending runs from a background queue with growing retry delays, in counter order within each unit. Failures notify your team. Anzma also guards against double sending; if the authority answers that it already has the invoice, it is handled as a duplicate.
Does it also work for our Egyptian branch?
Yes. The company’s country decides which system is switched on: Saudi Arabia runs on ZATCA, Egypt on ETA e-invoice integration and Egypt e-receipt software. Each country has its own tax (Anzma’s defaults are 15% for Saudi Arabia and 14% for Egypt; confirm the current rate with the authority), currency and platform, and the platforms differ in signing, documents and statuses.
The side-by-side comparison is on the e-invoicing software for Egypt and Saudi Arabia page. For Egypt in detail see e-invoicing software in Egypt.
What is the difference between phase 1 and phase 2 in one table?
Many people mix up the two phases because a QR code appears in both. The real difference is that phase 1 concerns what the document carries, and phase 2 concerns what your system exchanges with the authority. This table summarises what the ZATCA module builds in each phase; application dates come from the authority alone.
| Aspect | Phase 1 (generation) | Phase 2 (integration) |
|---|---|---|
| Essence | Issue the invoice electronically with a QR code | Send the invoice to the Fatoora platform |
| Contact with the authority | No submission | Clearance for standard, reporting for simplified |
| QR code tags | 1 to 5 | 1 to 9 on simplified invoices |
| Certificate | Not required | A CSID per billing unit |
| Signing and invoice chain | Not required | Signature, previous hash and counter |
| What Anzma does | Keeps the phase 1 code until registration | Registration, certificates, submission and tracking |
How does a standard and then a simplified invoice move through the ZATCA module?
An illustrative example with assumed numbers: a company sells goods worth 1,000 riyals to another company, so tax at 15% is 150 riyals and the total is 1,150. The customer has a registered tax number, so the invoice is a standard one. The system deducts the items from stock and posts the invoice to the books, then builds the document, signs it with the unit key, chains it to the previous invoice hash and submits it for clearance, and the invoice is printed from the copy the authority returns.
In the same shop a consumer buys for 200 riyals with no tax number, so a simplified invoice is issued. It is handed over right away after signing, with the QR code printed on it, and then sent to the authority for reporting in the background. If the connection is poor, selling does not stop: the invoice joins the retry queue and is sent in counter order.
Both cases pass through Sales, stock and accounts like any invoice, so the accountant re-enters nothing. Only the last stop differs: clearance before delivery in the first, reporting after delivery in the second.
Where do you find each step in the module’s screens?
The module has four screens covering the whole connection cycle. Permissions control who sees each screen, so only people you authorise manage registration.
| Step | Screen | What you do there | Usually owned by |
|---|---|---|---|
| Define units | EGS units | Add a unit per device or branch and pick a default | System admin |
| Registration and certificates | Onboarding & CSID | Generate the key and request, enter the OTP, run compliance checks | Whoever runs the connection |
| Set environment and sending | Integration settings | Choose the environment, automatic sending and company data | System admin |
| Daily tracking | ZATCA documents | Status of each invoice, resend and export | Accountant |
How do you correct a sent invoice with a credit or debit note?
An invoice that was sent to the authority is not edited. If you got a quantity or price wrong, or the customer returned goods, you issue a credit note to reduce the value or a debit note to increase it. Each links to the original invoice and passes through signing, the chain and submission like any document.
Example: you sold ten units and the customer returned two. You issue a credit note for two units, so revenue and tax go down and stock comes back, while the original invoice stays as it was issued. The compliance checks during registration also cover the note types, so acceptance later should not surprise you.
- A credit note for a return, a later discount or any reduction in the invoice value.
- A debit note to raise the value or add charges after issue.
- Each note is linked to an original invoice and takes its place in the unit’s chain.
How is tax classified on items: standard, zero-rated and exempt?
The invoice depends on how each line is classified: subject to the standard rate, zero-rated, exempt, or outside the scope of tax. Zero-rated and exempt lines require a reason written on the document. Anzma does not guess that reason for you; it sets default values as a starting point, and choosing the correct reason for your business’s exemption stays with your accountant, using the authority’s rules.
So review the tax rates in accounts and their link to items before testing. One misclassified item repeats on every invoice that carries it, so fixing it once at the item is cheaper than fixing invoice after invoice.
What happens as a CSID certificate nears expiry?
A production certificate has a validity period, and once it expires the unit stops signing and sending. That is why the system warns you thirty days before expiry, then seven days, then one day, so you can renew the certificate from the Onboarding & CSID screen with a new OTP from the authority’s portal.
It is better not to wait for the last warning. Have whoever runs the connection set their own calendar reminder, and make sure the business can sign in to the authority’s portal when renewal is due. Remember that each billing unit has its own certificate, so with many units the certificates may renew at different times.
What does the connection mean for a shop, a restaurant or a supply company?
The path is similar, but the type of sale decides the dominant type of invoice. This is how it looks in Anzma, not a statement of who must connect, which is the authority’s decision.
| Business | Dominant type | Watch point | Industry page |
|---|---|---|---|
| Retail shop or supermarket | Simplified | A billing unit per till | [[industry:supermarket|Supermarket software]] |
| Restaurant or café | Simplified | The invoice when the order is paid | [[industry:restaurant|Restaurant software]] |
| Pharmacy | Simplified, sometimes standard | Batches, permissions and prices | [[industry:pharmacy|Pharmacy software]] |
| Wholesale and supply | Standard | A tax number and address per customer | [[industry:wholesale|Wholesale software]] |
What are the common connection mistakes in Saudi Arabia?
These mistakes recur at most businesses, and all of them can be avoided by preparing ahead.
- Issuing a simplified invoice to a business customer that has a tax number, instead of a standard one.
- An incomplete national address, or one that differs from what is registered with the authority.
- Not naming billing units, which makes it hard to trace which certificate belongs to which device.
- Starting in production before passing the compliance checks in a test environment.
- Forgetting to renew the certificate until invoicing stops.
- A wrong tax classification on an item that repeats across many invoices.
- Leaving automatic sending off after going live with nobody sending manually.
- Letting every employee change connection settings or the environment instead of limiting it to whoever runs the connection.
- Ignoring accepted-with-warning results that point to data needing improvement before it becomes a rejection.
What do you do when you open a branch or add a new till?
Each new device or branch needs a registered billing unit before it can issue invoices that are sent. The steps are short because your company data already exists: add a new unit on the “EGS units” screen, name it and link it to the device or branch, then get an OTP from the authority’s portal, run registration for that unit alone, pass its checks and approve the production certificate.
It helps to try the new unit with a test sale before putting it into service, and to train the cashier on what they see if sending falters. Do not move one unit’s certificate to another; each unit has its own key, certificate and chain, which is why a fault on one device does not stop the others.
What differs between the ZATCA module and the Egyptian modules?
If you have companies in both countries, this short comparison shows why one setup cannot serve both. The wider detail is on the e-invoicing software for Egypt and Saudi Arabia page.
| Aspect | ZATCA (Saudi Arabia) | Egypt |
|---|---|---|
| Signing | A per-unit key generated by the system and stored encrypted | Company certificate through an agent or a file |
| Sequence | A counter and hash chain per unit | A chain per till for receipts |
| Document | Standard, simplified and notes | Invoice and note, receipt and return |
| Environments | Developer portal, simulation and production | Pre-production and production |
| Default tax rate | 15% | 14% |
What is the checklist before the first production submission?
Review these points with the accountant and the system admin before switching on automatic sending. Each one prevents a cause of rejection or a sudden stop.
- Every billing unit has passed the compliance checks and received a production certificate.
- You have tried a standard invoice, a simplified invoice and a credit note in the test environment and they were accepted.
- Every business customer has a tax number and a full address in contacts.
- Every item has a correct tax classification and an exemption reason where needed.
- The cashier knows what to do when an invoice falters, and someone reviews rejections daily.
- You have set an independent reminder to renew certificates before they expire.
- You have checked your company data, tax number and national address against what is registered with the authority before sending starts.
How do you start and who is involved?
Connecting relies on your business data at the authority. You need an OTP from the portal and permission to manage onboarding in Anzma. The module is not tied to a plan feature; the general plan limits on users and monthly invoices apply, see pricing.
We suggest a short meeting to agree how many invoicing units you need and whether your customers are mostly businesses or consumers, then start with one unit on a test environment. Book an online meeting for free and we will walk through the onboarding screens on your own business data.
Frequently asked questions
What is phase 2 of e-invoicing in Saudi Arabia?
It is the integration phase: your invoicing system connects to the Fatoora platform to send invoices, with CSID certificates, signing and an extended QR code. It follows the generation phase, which only required creating the invoice electronically. When it applies to your business is set and announced by the authority.
What is the difference between a standard and a simplified invoice?
A standard invoice is usually issued to a business and is cleared by the authority before it reaches the customer. A simplified invoice is usually a consumer sale at the counter and is reported to the authority after issue. Anzma picks the type from the customer’s tax number and the invoice type.
What is the difference between clearance and reporting?
In clearance the authority checks a standard tax invoice and returns it cleared before you give it to the customer. In reporting a simplified invoice is delivered first and then reported, and Anzma applies the sending window configured from the authority’s documents. Check the authority’s documents for any change to these periods.
How do I register an invoicing unit and get a CSID?
Add an EGS unit in Anzma, get an OTP from the authority’s portal, and run onboarding from the Onboarding and CSID screen. Anzma generates the key and certificate request, obtains a compliance certificate, passes the compliance checks, and then the production certificate is issued and stored encrypted.
When must I connect my business to Fatoora?
The authority decides the connection date for each group of taxpayers and notifies businesses and publishes it on its site. We do not quote dates here so they cannot go stale. Check zatca.gov.sa or the notice sent to your business, then book a meeting so we can set up the integration.
Does it support POS and branches?
Yes. An invoicing unit is registered per POS device or branch, each with its own chain. At issue time Anzma uses the device’s unit, then the branch’s, then the default. POS invoices are simplified, enter the reporting flow, and deduct stock and post to accounting as usual.
What does the QR code on the invoice contain?
In TLV format it carries the seller name, tax number, issue time, total and VAT. Phase 2 adds the invoice hash, signature, public key and certificate signature. It prints on the invoice, and the phase 2 code replaces the phase 1 code once the unit is onboarded.
Is Anzma approved by ZATCA?
To be precise, Anzma’s ZATCA module integrates with the Fatoora platform following its published specifications. We do not claim approval or listing by the authority. To check any solution provider’s status, use the authority’s official pages before deciding, and ask us about test environments in the meeting.
Does it also work for our branch in Egypt?
Yes. The company’s country decides the system: ZATCA for Saudi Arabia, and the e-invoice and e-receipt modules for Egypt. Each country has its own tax, currency and platform. If you run two companies in different countries, each company has its own settings.
Is there a test environment before production?
Yes. The module supports three environments: developer portal, simulation and production. We recommend starting in the developer portal or simulation with sample invoices to find missing customer and item data first. You switch environment from the integration settings screen.
How is an invoice corrected after it was sent to the authority?
It is not edited after sending. A credit or debit note linked to the original invoice is issued and goes through signing, the chain and submission. If a customer returns two of ten units, a credit note for two units reduces revenue and tax and returns the stock.
What happens when a CSID certificate expires?
The unit stops signing and sending until the certificate is renewed. Anzma warns you thirty days, seven days and one day before expiry, and you renew from the Onboarding & CSID screen with a new OTP from the authority’s portal. Each billing unit has its own independent certificate.
Part of the product line
e-invoicing software
Issue the invoice from your sales system and send it to Egypt’s Tax Authority or Saudi Arabia’s ZATCA depending on the company’s country, with the status of every document tracked.
Official sources
Rate this page
Did you find this useful? Your rating helps others.
No ratings yet.


