User guide

E-invoicing (Tunisia, El Fatoora)

Tax ID, El Fatoora subscription, continuous numbering and TEIF generation for invoices and credit notes.

Administrator11 min read

Tunisian electronic invoices are filed on Tunisie TradeNet's (TTN) El Fatoora platform, in the TEIF format. The feature only exists for companies whose country is Tunisia, and only if the subscription includes the Tunisia e-invoicing (El Fatoora) module.

Before you start

  1. Country: in Settings › Company, the country must be Tunisia. For any other country, e-invoicing appears nowhere and the server refuses it.
  2. Subscription: the Tunisia e-invoicing (El Fatoora) module must be part of your plan (Subscription page). It is open during the trial period.
  3. TTN membership: subscribe to the El Fatoora platform with TTN. TTN gives you a login and a password for the web service, and access to its test platform. Also ask whether the server's IP address must be declared.
  4. Certificate: obtain a signing certificate recognised by the ANCE, in the name of the company or of a signer authorised on El Fatoora: TunTrust USB key, DigiGo or E-Houwiya (Mobile ID) account. The signer must be declared to TTN.
  5. Permissions: the workspace administrator grants the permissions of the TTN e-invoicing row in Settings › Users & roles (see User permissions).

Set up

  1. Settings › E-invoicing.
  2. Enter the company's full Tax ID (matricule fiscal), 13 characters long (7 digits, the check letter, the VAT code, the category and the establishment number, e.g. 0736202XAM000). Separators are accepted and removed.
  3. Choose the Platform: start with Test. Switch to Production once the end-to-end verification has passed (see Going live).
  4. Enter the El Fatoora login and El Fatoora password of your subscription. The password is encrypted on the server and never shown again.
  5. Choose the Signature method: TunTrust certificate on a USB key, DigiGo or E-Houwiya. Its prerequisites appear below; for DigiGo and E-Houwiya, also set up the account (see Sign with DigiGo or E-Houwiya).
  6. Tick Enable e-invoicing, then Save.

Numbering

Each electronic invoice gets a TEIF number, assigned once.

  • Dedicated series, continuous per fiscal year: one counter per year, without gaps, with one prefix for invoices and another for credit notes (e.g. EF-2026-000001). An assigned number is never reused.
  • ERP invoice number: the invoice number becomes the TEIF number. It may only contain letters, digits, ., _ or -, and no /.

Document taxes

Map each document tax (stamp duty, FODEC…) to its TEIF code. A tax that appears on an invoice without a mapping blocks generation.

Generate an invoice's TEIF

  1. Open a validated invoice or credit note.
  2. In the TTN e-invoice box, click Generate TEIF.
  3. The document is checked against the official schema and the consistency rules (amounts, tax ID, number, credit note reference). If it complies, its status becomes To sign. Otherwise it stays To complete and the list of issues tells you what to fix.

Sign with a TunTrust certificate

Signing happens on your computer, with the TunTrust certificate on your USB key or smart card. The PIN and the private key never leave the device: neither QuoSuite nor its servers can access them.

Once per computer, install the QuoSuite signing agent (the Download the signing agent link in the signing window, or from your administrator) and the driver of your TunTrust key. The agent starts with your session and shows an icon next to the clock.

  1. On an invoice that is To sign, click Sign.
  2. The first time, QuoSuite shows a code and offers to Pair this computer: check that the agent window shows the same code, then click Allow in that window.
  3. Choose your Certificate. An expired or revoked certificate, one outside the ANCE hierarchy or one issued to another company is marked unusable, with the reason.
  4. Enter the Signer's role (your position in the company), then click Sign.
  5. The agent window summarises the invoice (number, customer, total incl. tax). Check it, type your device's PIN and confirm. On Windows, the PIN may be requested by a Windows window.
  6. QuoSuite checks the signature it receives. The invoice becomes Signed, ready to be sent to El Fatoora.

Sign with DigiGo or E-Houwiya

With DigiGo (TunTrust remote signature) or E-Houwiya (mobile digital identity), nothing is installed on the computer: the certificate stays with the provider, and you approve each signature on your phone. QuoSuite never sees your PIN.

Once, in Settings › E-invoicing:

  1. Choose the Signature method, then Save.
  2. Under Account, enter the account identifier: DigiGo identifier, or Mobile ID phone number for E-Houwiya. The Signer role is optional. Click Save account. An access key, if any, is encrypted on the server and never shown again.
  3. Click Enroll account: QuoSuite reads the account's certificate and checks that it is valid, issued by an ANCE authority and made out to your company. The Ready to sign. message confirms that everything is in place.

To sign:

  1. On an invoice To sign, click Sign.
  2. Approve the request in the provider's app on your phone, or enter the One-time code you received. The window shows the time left.
  3. QuoSuite verifies the signature it receives. The invoice becomes Signed, ready to be sent to El Fatoora.

Transmit to El Fatoora

  1. On a Signed invoice, click Transmit to El Fatoora.
  2. The transmission runs in the background: you can leave the screen. The status becomes Transmitted as soon as TTN has received the invoice, then Accepted or Rejected once TTN has processed it. The status is checked automatically; Check status reads it right away.
  3. Once the invoice is Accepted, the TTN unique reference and the official QR code appear on the e-invoice. The document PDF now carries them: click PDF with TTN reference and QR.

All e-invoices are listed in Sales › Invoices › E-invoices, with their status, TTN reference and errors to handle.

Follow an invoice, correct a rejection

The e-invoice details (link Details and history) show the TEIF, the signature, the transmissions, TTN's acknowledgments, the archive and the full event log.

  • Rejected: TTN's reason is shown as is. Correct the document, click Correct: regenerate the TEIF (the number is kept), sign the new TEIF, then transmit it. The previous deposit stays in the history.
  • Error: the message gives the cause (credentials, service unavailable, unknown outcome). Fix the cause if needed, then click Transmit again. Transmitting again is safe: TTN is always checked before anything is sent again.

You are notified when an invoice is accepted or rejected, or when a transmission needs attention (Settings › Notifications).

End-to-end verification

The End-to-end verification panel in Settings › E-invoicing tells you whether the workspace is Ready for production. It checks the configuration (activation, tax ID, El Fatoora credentials, signing method, platforms, retention period), then waits for real proof: a test invoice signed and accepted by TTN.

  1. With the Test platform selected and saved, click Create a test invoice. It is a dummy TEIF (the company invoices itself 1.000 TND) that belongs to no numbering series and is only sent to the test platform.
  2. Click Sign and sign it with your signing method, like a real invoice.
  3. Click Transmit to El Fatoora. The panel follows the transmission until TTN accepts or rejects it.

Each item shows its state and, when something is missing, its cause. The Agent installation guide link takes you to Sign with a TunTrust certificate.

Going live

  1. Check that the panel shows Ready for production.
  2. Choose the Production platform, then Save.
  3. Read the confirmation and click Switch to production. From then on, every transmitted invoice is legally binding.

Switching to production requires the E-invoicing · Configuration — Validate permission. You can still go back to Test, but an invoice already numbered in production is never sent to the test platform.

User permissions

In Settings › Users & roles, the TTN e-invoicing row and its sub-rows control access:

  • TTN e-invoicing: View e-invoices, TTN acknowledgements, references and QR codes, and the archive; Create to generate or regenerate the TEIF.
  • Signing: Validate to sign.
  • TTN transmission: Validate to transmit and check the status with TTN.
  • Configuration: View the settings, Edit the sensitive settings (credentials, signing, numbering, archiving), Validate for the end-to-end verification and going live.

The User role views, generates, signs and transmits; configuration stays with the workspace administrator. The server enforces these permissions: a hidden button is not merely hidden.

Subscription and plan changes

If the plan no longer includes the module, or if the subscription expires, access is blocked but nothing is deleted: e-invoices, acknowledgements, archive and settings are kept and come back with the module. A transmission not yet filed waits for access to return; an invoice already received by TTN keeps being followed until it gets its reference. An invoice already accepted keeps its reference and QR code on the PDF.

Compliance note

Archiving

Signed documents and TTN responses are kept in the invoice's archive, with their fingerprint. Enter the Retention period (years) that applies to your company.