EGS (E-invoice Generation Solution unit)
An EGS is the unit that issues ZATCA e-invoices: a till, POS or server. Each unit is onboarded on its own and gets its own CSID and invoice chain.
EGS stands for E-invoice Generation Solution. ZATCA's guidelines say an e-invoicing solution may contain one or more units; a unit is what actually issues invoices: a cash register, a point of sale, or an online shop's server.
Each unit is onboarded separately: its own CSR and CSID, and its own invoice chain (ICV counter and PIH). Its identity sits in the CSR's subjectAltName: the serial SN in the form 1-solution|2-version|3-unit, the VAT number in UID, and the functionality map in title (four TSCZ digits: standard, simplified and two special cases, so 1100 means standard plus simplified).
What goes wrong: two tills sharing one certificate and one chain end up issuing two documents with the same counter and break the chain. Non-ASCII values (an Arabic address, say) inside subjectAltName are silently dropped by openssl, and ZATCA answers Invalid-CSR.
On Matheel each device gets its own serial and one device_token. A token is not shared between devices; if it is, Matheel answers 409 device_token_reused. Plans are counted per production device.
Example
[ alt_names ]
SN = 1-Matheel|2-…|3-…
UID = 3…3
title = 1100
registeredAddress = RRRD2929
businessCategory = General
FAQ
Three branches with two tills each: how many EGS units?
Each till that issues invoices is a unit, so six, each with its own OTP, certificate and chain.
Can two devices share one unit's certificate?
Avoid it: they would share one counter and hash, and two invoices at the same moment break the chain.
Related ZATCA rules
Related terms
- CSID (Cryptographic Stamp Identifier)
- CSR (Certificate Signing Request)
- ICV (Invoice Counter Value)
- PIH (Previous Invoice Hash)
- OTP (Fatoora portal one-time password)
Let Matheel handle this for you
Matheel signs the invoice, files it with ZATCA and keeps the counter and hash in one request, and returns the PDF with the QR.
Try Matheel, no signup Matheel API docs