The e-invoice generation unit (EGS)
The device or software that issues invoices and holds their chain, key and certificate; each unit has one sequence and one certificate.
The controls define the unit as the main element of the invoicing solution responsible for preventing tampering with the invoice chain: it hashes each document, embeds the previous hash and issues the cryptographic stamp for simplified documents. Each unit has its own identifier (certificate).
A unit may not run more than one sequence of invoices and notes. One till has its certificate and chain; another till in the same branch is a separate unit with its own chain.
A unit must be able to connect to the internet to share invoices with ZATCA, protect documents from undetected change or deletion, and allow archiving. It is registered in the FATOORA portal, and its certificate is revoked if it is damaged, its key is stolen, or it is transferred.
In JooDax
BuiltOne active unit per data file, with its key, certificate, counter and last hash; a unique index prevents two active units. The unit's common name in the certificate request is JooDax- followed by the program's name and -1.
crates/jdx-einvoice-sa/src/schema.sql
Related pages
- KSA-16 Invoice counter value (ICV)
- KSA-13 Previous invoice hash (PIH)
- KSA-15 Cryptographic stamp
- BR-KSA-33 · Every document must carry an invoice counter value.
- BR-KSA-61 · Every document must contain the previous invoice hash.
Related concepts
- Onboarding a device and its CSIDHow an invoicing device obtains its stamping certificate from ZATCA: key, certificate request, OTP, compliance checks, then the production certificate.
- The invoice counter (ICV)A number that goes up by one with every document a device issues, never reset or reused, so any gap in the chain shows.
- Local test mode in the JooDax programsUntil the business onboards its device with ZATCA, the programs stamp documents with a self-signed certificate and print them with a QR code, sending nothing anywhere.
- Prohibited functions in e-invoicing solutionsFive things no invoicing solution may do from phase 1: uncontrolled access, tampering with invoices or logs, more than one sequence, exporting the stamping key, and changing the time.
E-invoicing in Saudi Arabia (FATOORA)
Sources
- الضوابط والمتطلبات والمواصفات الفنية والقواعد الإجرائية اللازمة لتنفيذ أحكام لائحة الفوترة الإلكترونية (قرار المحافظ رقم 62738 وتاريخ 1443/11/23هـ) (vfile dated 20230519 (decision 62738)) — ZATCA
- الدليل الإرشادي التفصيلي للفوترة الإلكترونية (vالنسخة الثانية) — ZATCA
- Detailed Guidelines for E-Invoicing (vVersion 2) — ZATCA
- Security Features Implementation Standards to the E-Invoicing resolution dated 2023-05-19 (v1.2) — ZATCA
Checked on: 4 November 2026. What concerns JooDax is taken from the programs’ own code.