How Hela handles regimes
In a growing number of countries, an invoice is valid only if it is transmitted to the administration or goes through a network: eTIMS in Kenya, the electronic fiscal device in the DRC, the FNE platform in Côte d'Ivoire, Peppol in Belgium, the PDP in France. Hela carries these rules — one regime per country — and applies them when the document is issued.
Three formats, one document
A Hela sale reads in three formats, always available:
| Format | Route | For |
|---|---|---|
GET /sales/{id}/invoice.pdf |
The customer, the printer | |
| UBL 2.1 (EN 16931, Peppol BIS 3.0) | GET /sales/{id}/invoice.xml |
Peppol, Yuki, PDPs, most European regimes |
| CII (UN/CEFACT, EN 16931 profile; the basis of Factur-X and XRechnung) | GET /sales/{id}/invoice.cii.xml |
France (Factur-X), Germany (XRechnung) |
African regimes do not use these formats: each administration has its JSON API, and the regime speaks it.
The regime
A regime declares:
- the countries where it applies;
- the authority and the obligation in one sentence;
- the transport:
authority_api(an administration API),access_point(a Peppol access point),pdp(an accredited platform),peppol(the network directly),device(an accredited device or gateway near you); - whether it covers till receipts or only B2B invoices;
- its offline behaviour:
queue_then_submit(the invoice is issued, the submission follows once the network returns) ordevice_local(the device signs locally); - the fields to enrol, and its settings.
GET /companies/{id}/fiscal returns the regimes applicable to the company's country, with all of this and the enrolment state.
Enrolling
Finance → Compliance, then Enable on the regime: the form asks for what the administration gave you (TIN, key, certificate, device address…). Secrets are encrypted. Hela tests the enrolment before saving it: a wrong identifier is refused at once, with the administration's answer.
The company's country must be set as a two-letter code (CD, KE, BE…) in the settings; that is what selects the regimes.
Submitting
With Transmit automatically on (the default), every invoice leaves on issue (invoice.issued) — and every receipt too when the regime covers receipts. For B2B regimes (Peppol, PDP, XRechnung), only sales addressed to an identified partner (VAT number, Peppol id or tax id set) leave.
An invoice can also leave on demand — Submit to the tax authority button on the invoice, or POST /fiscal/submit/sale/{saleId} — for instance a document older than the enrolment.
Submission is a queued job, run in the background, retried when the administration is down. Its state shows on the invoice and in Compliance → Submissions:
| State | Meaning |
|---|---|
queued |
Waiting for the next pass |
submitted |
Sent, answer awaited (asynchronous regimes) |
accepted |
Accepted; the authority reference and, where applicable, the QR code are stored and printed on the PDF |
rejected |
Refused; the reason is shown, the invoice is to be corrected and resent |
error |
The administration did not answer; retry scheduled |
fiscal.accepted and fiscal.rejected are emitted, and the messaging connector can relay them.
The sealed journal
Independently of any administration, Hela keeps a fiscal journal: every issued invoice is written with a SHA-256 hash chaining the previous hash and the invoice's canonical content (hash = sha256(previous | content)). Changing or deleting a line afterwards breaks the chain, and Verify the chain (GET /fiscal/journal/verify) shows it.
It is what administrations demand when they require inalterability without imposing transmission (France for till software, Germany with the KassenSichV), and useful evidence anywhere.
Offline
A till with no network keeps selling. With queue_then_submit, receipts pile up and leave on reconnection, in order, each with its original timestamp. With device_local, the accredited device signs on the spot and transmission to the administration is its business.
Countries covered in 3.0
| Zone | Regimes |
|---|---|
| European Union | Peppol (BE, NL, LU, Nordics…), France — PDP, Germany — XRechnung |
| East Africa | Kenya — eTIMS, Rwanda — EBM, Tanzania — VFD, Uganda — EFRIS |
| OHADA | Côte d'Ivoire — FNE, Benin — e-MECeF, Senegal, Burkina Faso, Cameroon, DRC; the SYSCOHADA chart for exports |
A country missing from the list still has the sealed journal and the three formats.