Technical 8 min read

E-invoicing in Tunisia: how to integrate it into your business software

El Fatoora, the TEIF format, electronic signature, submission to TTN: how electronic invoicing actually works in Tunisia, and how to plug it into your management software to automate it — with no double entry and no change to your habits.

OS

OCEAN SOFT

Published on January 8, 2026

Electronic invoicing isn't just a file to send: it's a full flow — creation, standardised format, signature, transmission, acknowledgement. Well integrated into your business software, it becomes invisible to your teams; poorly integrated, it adds a daily chore. This article focuses on the technical and operational "how".

El Fatoora, TTN, TEIF: what we're talking about

Three acronyms come up everywhere as soon as electronic invoicing in Tunisia is mentioned. Here's what they cover, technically:

  • El Fatoora — the national platform through which electronic invoices pass to be validated and recorded.
  • TTN (Tunisie TradeNet) — the operator that runs El Fatoora: it receives the invoice, checks it, returns an acknowledgement and keeps a trace of it.
  • TEIF (Tunisian Electronic Invoice Format) — the standardised file format (XML) the platform expects. Your software generates it: you never handle the file by hand.

On top of these three building blocks comes the electronic signature: each invoice is digitally signed so the platform accepts it, then marked with a unique identifier and, in practice, a QR code. An invoice in the wrong format or badly signed is simply rejected by El Fatoora.

The technical journey of an electronic invoice

Behind the apparent simplicity, an electronic invoice always follows the same circuit. Understanding these steps shows where your software comes in — and where errors occur.

  1. Creation — the invoice is entered (or generated) in your management tool, with its lines, amounts, taxes and details.
  2. TEIF generation — the software turns the invoice into a standardised XML file matching the expected format.
  3. Electronic signature — the file is digitally signed, which guarantees its integrity and origin.
  4. Submission to El Fatoora — the signed file is sent to the platform via TTN, usually through an automated exchange (API).
  5. Acknowledgement (or rejection) — the platform returns an acknowledgement if everything is compliant, or a reasoned rejection otherwise. This round trip must be tracked in your system.

The sensitive point isn't the technology: it's the quality of the data going in. A poorly identified customer, a wrong tax rate or an incomplete invoice template lead to repeated rejections. Hence the value of starting from clean data.

Planning for errors and platform downtime

A serious integration doesn't assume everything goes well. The platform can be temporarily unavailable, slow, or return a rejection. Your system must plan for:

  • Queue and retries — on downtime or latency, the invoice is queued and resent automatically, without blocking the user.
  • Idempotency — a resend must never create a duplicate on the platform: each invoice carries a unique tracking reference.
  • Asynchronous processing — submission and acknowledgement happen in the background; the user doesn't wait for TTN's reply to carry on.
  • Degraded mode — you can keep creating and signing invoices even if transmission is temporarily impossible, then flush the queue once the service is back.
  • Logging and alerts — every failure is traced and surfaced, so no invoice stays stuck without anyone knowing.

Integrating it into your business software: every scenario

The real question isn't "do I need electronic invoicing?" but "where does my software connect to the El Fatoora chain?". There are several integration points, often combinable. Here are the most common scenarios.

1. Plug into a third-party e-invoicing solution

You link your business software (ERP, CRM, POS) to an existing e-invoicing platform that handles TEIF generation, signature and submission to TTN. The connection is made through its API, ready-made connectors or webhooks. Quick to deploy; in return, your invoicing data passes through a third-party provider.

2. Integrate an electronic-signature service

The signature (in the XAdES standard) is a step in its own right, which can be handled three ways depending on your volume:

  • Certificate on a USB token — local signature with a PIN, suited to low volumes and human validation.
  • Server-side signature (server seal) — automates signing with no manual step, for high volumes and automated flows.
  • Remote signature service via API — signature delivered as a service (often backed by a hardware security module, HSM) that your software calls directly.

3. Connect directly to the TTN platform

Your software talks directly to El Fatoora through the channels TTN opens — API, web services or SFTP — and handles TEIF generation, signature and acknowledgement tracking itself. The scenario with the most control, at the cost of more engineering.

4. Go through an integration middleware

An intermediate layer (sometimes open source) sits between your tool and the platform: it handles TEIF generation, signature, submission and tracking, and exposes a simple interface your ERP calls. A good balance between speed and control.

5. Connect your existing ERP, CRM or accounting software

Through connectors to market tools (Odoo, Sage, SAP, Oracle…) or a custom integration, the invoice goes out straight from where you already work — with no double entry. For businesses with specific rules (recurring billing, projects, pro rata, multi-currency), the logic is modelled as close as possible to your processes.

6. Cover your sales channels

Your invoices don't all originate in the same place: e-commerce site, point of sale (POS), mobile app. A complete integration plugs these channels into the electronic chain too, so no invoice slips through.

These scenarios combine: an ERP can call a middleware, which delegates the signature to a dedicated service before submission to TTN. Whatever the architecture, integration always rests on three things: a clean mapping between your data and the TEIF fields, an automated exchange with the platform, and acknowledgement handling that feeds each invoice's status back into your system. Done well, the operation is invisible to the user: they click "send", the rest is automatic.

How to choose your scenario

The right choice depends on a few simple criteria: your invoice volume, whether you have an ERP or management software, your budget, your requirement for control and data sovereignty, and the engineering effort you can commit.

Comparing the main architectures

ArchitectureEffort / costControl & sovereigntyMain limit or riskBest suited to
Turnkey third-party solutionLowLimited (data at the third party)Vendor dependency, reversibility to checkSmall businesses without an ERP, low volumes
Middleware + existing softwareMediumGoodAn extra component to maintain, one more point of failureSMEs with an ERP/CRM
Direct connection to TTNHighMaximumRequires an in-house dev team, corrective maintenance on youSoftware vendors, IT teams, high volumes
Custom developmentHigh (heavy investment)Maximum, tailored to the businessHigh upfront cost, lock-in risk (vendor/agency)Specific rules, multi-channel

On effort: a direct connection is more than just "plugging in". You must integrate TTN's web service, manage the certificate and signature, pass the mandatory conformance tests, then maintain it every time the TEIF format or the API changes. Budget an order of magnitude of several weeks to a few months depending on your team, plus ongoing maintenance — to weigh against the independence you gain.

Recommendation by profile

  • Sole trader / small business, low volume, no ERP — a turnkey third-party solution with a USB-token signature. Fast, inexpensive, nothing to develop.
  • SME with an ERP or CRM — a middleware or connector that plugs your existing tool into El Fatoora, to avoid double entry. USB-token signature if volumes stay moderate.
  • High volume / automated invoicingdirect connection to TTN (or a robust middleware) with a server seal or remote signature (API), to sign with no manual step.
  • Specific-rule or multi-channel business (recurring billing, projects, e-commerce + POS) — custom development that models your rules and covers all your sales channels.

Choosing the signature mode

A simple rule, driven by volume and automation:

  • USB token — low volumes: each signature requires the physical token and the PIN, which can't be automated. Beyond a few invoices a day, it becomes a bottleneck.
  • Server seal — high volumes, automated signing with no manual step.
  • Remote signature (API / HSM) — when signing must be built directly into a software flow.

Questions to ask a provider

  • Do you generate the TEIF and handle signature and submission to TTN end to end?
  • Do you offer a connector to my ERP/CRM, or an open API?
  • How are acknowledgements and rejections fed back into my system?
  • Where are my invoices hosted and archived, and in what format?
  • Which signature modes do you support (token, server seal, API)?
  • What happens if I want to switch provider (reversibility, export)?

One last point, honestly: no architecture is "the best" in absolute terms. A third-party solution wins on simplicity, a direct connection on independence, custom development on business fit — each is paid for elsewhere. The right choice is the one that matches your volume, your in-house skills and your sovereignty requirement; for a standard need, the simplest option is often the right one.

What automation changes day to day

Beyond the technical side, the value is operational. Well-integrated electronic invoicing brings concrete gains:

  • No more double entry — data is entered once, at the source. Less time lost, fewer copy errors.
  • Real-time tracking — you immediately see which invoices are accepted, pending or rejected, without checking manually.
  • Full traceability — each invoice, its signature and its acknowledgement are kept and findable in a few clicks.
  • Better-managed cash flow — invoices sent faster and a clear view make follow-ups and collection easier.
  • Clean data for accounting — information flows from one system to another without re-entry, making your closings more reliable.

In other words, moving to electronic is the chance to clean up your entire invoicing process — often the real benefit of the project.

Archiving, hosting and sovereignty

An electronic invoice isn't just a one-off send: it's data you must be able to find, re-read and prove long afterwards. Three technical points deserve your attention:

  • Durable retention — archive both the signed TEIF (the legally probative proof) and a readable version (PDF) of each invoice, with its acknowledgement, in a format that stays usable over time.
  • Encryption — your data should be encrypted at rest (storage) and in transit (TLS); keys and certificates are kept separately, in a vault or secure module.
  • Integrity and proof — the electronic signature guarantees an archived invoice hasn't been altered; keep it so you can prove it in an audit or dispute.
  • Access control and traceability — role-based access and logged views, for data that holds sensitive information about your customers and your business.
  • Backups and redundancy — regular copies, geo-redundancy, a tested restore plan: an archive you can't restore is worthless.
  • Controlled hosting — European cloud, local sovereign cloud or your own servers: the choice depends on your sensitivity and constraints.

This is a topic to frame from the start with your solution: archiving patched on afterwards always costs more than archiving designed in from day one.

Frequently asked questions

What is the TEIF format, concretely?

It's a standardised XML file that structures all the invoice information in a standard way, so the platform can read it automatically. Your software generates it; you don't write it yourself.

Do I have to change my invoicing software?

Not necessarily. Often, TEIF generation, signature and submission can be plugged into your existing tool. A switch is only justified if your current software is too limited or closed.

How do I connect El Fatoora to my existing ERP?

Through a connector that links your ERP to the platform: it retrieves the invoice data, produces the TEIF, signs it, sends it and feeds the acknowledgement back. The user keeps working in their usual ERP.

What happens if an invoice is rejected?

The platform returns a rejection reason. A good integration displays that reason in your system, you fix the data at fault and resend the invoice. Hence the importance of starting from clean data.

Where are my invoices hosted?

It depends on the chosen solution: they pass through the platform, but you should also keep a usable copy. Where and how they are hosted (European cloud, sovereign, or your own servers) is a choice to clarify from the start.

Our approach at OCEAN SOFT

At OCEAN SOFT, we're a software publisher. Our role isn't to sell you yet another tool alongside the rest, but to connect electronic invoicing to your business software — so it happens with no double entry and without changing your habits.

  • Integration with your existing systems — TEIF generation, signature and submission to El Fatoora directly from your management tool.
  • End-to-end automation — submission, acknowledgement tracking and rejection handling, with no manual step.
  • Sovereignty over your data — you keep control of where your invoices are hosted and archived.
  • Fast rollout — in the spirit of our pilots delivered in weeks, not months.

For anything to do with obligations, deadlines and tax rules, your chartered accountant remains the reference. This article deliberately covers only the technical and operational side.

Want to plug electronic invoicing into your software without breaking your processes? Tell us about your situation and we'll be straight with you about where to start.

#Facture électronique #El Fatoora #TTN #Intégration #TEIF

Got an AI SaaS project in mind?

Let's spend 30 minutes on your use case — no strings attached.

Read next