What are MECeF and e-MECeF?
MECeF (Machine Électronique Certifiée de Facturation — Certified Electronic Invoicing Machine) is the official device mandated by the Beninese Directorate General of Taxes (DGI) for the issuance of normalised invoices by VAT-registered businesses. Initially deployed as a physical device connected to the cash register or the company's management system, MECeF has evolved into a software version, e-MECeF, which integrates directly into accounting and invoicing software via a certified API.
The principle is the clearance (pre-validation) model: before being delivered to the customer, every invoice is transmitted in real time to the DGI server, which validates it, assigns it a NIM (Machine Identification Number) and an electronic fiscal seal materialised by a QR code printed on the invoice. No invoice can legally circulate without prior validation.
e-MECeF offers decisive advantages over the physical device: no hardware to buy or maintain, native integration with management software, automatic updates of DGI specifications, and the ability to handle high invoice volumes. For modern Beninese SMEs, it is now the recommended compliance path.
e-MECeF (the software version) is now the recommended standard for Beninese SMEs: zero hardware, native integration, automatic updates.
Legal Framework and Obligations in Benin
MECeF was established in Benin by the 2018 Finance Law and its implementing decree, as part of the modernisation of the tax administration and the fight against VAT fraud. Effective deployment began in 2020 and is gradually extending to all categories of VAT-registered businesses.
Who is concerned?
- All businesses registered in Benin and subject to VAT, regardless of sector (trade, services, construction, manufacturing).
- Large and medium-sized companies were the first concerned, followed gradually by SMEs and smaller formal structures.
- Taxpayers under the normal real regime and the simplified real regime are required to use a certified MECeF or e-MECeF.
What are the concrete obligations?
- Issuance via a certified device: Every invoice must be issued via a physical MECeF or a DGI-approved software e-MECeF. Using a non-certified invoicing system exposes the business to penalties.
- QR code and NIM on every invoice: Each printed invoice must carry the fiscal seal QR code and the NIM assigned by the DGI server at validation time.
- Tax ID (NIF) mention: The supplier's Tax Identification Number (NIF) and, for B2B transactions, the customer's NIF must appear on the invoice.
- Retention and archiving: Normalised invoices must be kept for the legal duration (10 years) and made available upon DGI request.
- Consistent VAT returns: Monthly VAT returns must be consistent with data transmitted to the MECeF server — the administration automatically cross-checks both.
Penalties for non-compliance: Fiscal fines for missing normalised invoices, VAT reassessments, blocking of tax benefits and, in the most serious cases, business suspension. DGI regularly carries out targeted audits on non-equipped businesses.
How e-MECeF Works Technically
The technical operation of e-MECeF relies on a real-time exchange between the company's invoicing software and the Beninese DGI server. Here is the step-by-step flow of issuing a compliant invoice:
- Invoice entry: The salesperson or operator enters the invoice in their software (CassKai for example): customer, items, quantities, unit prices, VAT rates, totals before and including tax.
- Payload preparation: The software builds a structured message (usually JSON or XML) containing all the required fiscal data: supplier NIF, customer NIF, description, net/VAT/gross amounts, VAT code, currency (XOF), issue date.
- Sending to the e-MECeF API: The software transmits the payload to the Beninese DGI server via the certified API, using the company's authentication credentials (API key, certificate).
- DGI-side validation: The server checks data consistency (format, valid NIFs, sequential numbering, totals), records the transaction and generates two key elements: the NIM (Machine Identification Number, unique identifier of the validated invoice) and the electronic fiscal seal.
- Response to the software: The server returns the NIM, the seal and a QR code encoding the verification information (DGI URL + invoice identifier).
- Compliant printing: The software prints or generates the invoice PDF, incorporating the NIM, QR code and all mandatory legal mentions. The invoice is then ready to be delivered to the customer.
The whole process takes a few seconds under normal conditions. In case of temporary network outage, some devices allow deferred issuance with later transmission (degraded mode), provided the catch-up is done within a DGI-defined timeframe. This tolerance is not universal: check the exact terms with DGI or a local certified accountant.
Compliance Roadmap: Practical Checklist for Beninese SMEs
For a Beninese SME that is not yet compliant, here is the pragmatic checklist to follow — actionable tomorrow morning, without over-investing.
- Check your tax regime: Are you under the real regime (normal or simplified)? If so, MECeF or e-MECeF is mandatory. If you are under the lump-sum regime (TPS), check with your tax centre whether the obligation applies to your case.
- Retrieve or verify your NIF: Without an active and up-to-date NIF at the Beninese DGI, no integration is possible. This is the absolute prerequisite.
- Choose between physical MECeF and software e-MECeF: For a modern SME with a management system, e-MECeF is almost always the best option: cheaper in the long run, more flexible, integratable into the existing process.
- Identify a certified solution provider: Whether a certified software vendor (like CassKai) or a local provider, demand written proof of the certificate of approval issued by the Beninese DGI. Without official certification, your invoices will not be valid.
- Apply for registration with the DGI: The solution provider usually supports this process. You receive your technical credentials (API key, certificate) that will allow your software to communicate with the e-MECeF server.
- Test in a pre-production environment: Before going live, issue a few test invoices to validate that the payload is correctly formed, that the QR code and NIM appear correctly, and that printing is compliant.
- Train your teams: Cashier, sales, accounting — everyone who issues invoices must understand the new process: no invoice without validation, visual QR code check, error handling.
- Update your invoice templates: Verify that all mandatory mentions are present (supplier and customer NIFs, NIM, QR code, description, net/VAT/gross totals, currency, date) and that the layout is readable.
- Align declared VAT and transmitted VAT: Monthly returns must accurately reflect invoices validated by the server. CassKai automates this control — it's a major asset to avoid reassessments.
- Set up legal archiving: Regular backups, 10-year retention, ability to quickly restore upon DGI request. CassKai handles this archiving with AES-256 encryption compliant with GDPR and legal standards.
CassKai Integration with the e-MECeF API
CassKai natively integrates with the Beninese DGI e-MECeF API. For a Beninese SME using CassKai, the experience is seamless: no physical device to install, no additional handling at issuance time, and end-to-end guaranteed compliance.
What CassKai handles for you:
- Secure connection to the e-MECeF API: Authentication via your DGI technical credentials, automatic session and certificate renewal management.
- Compliant payload construction: All mandatory fields (NIFs, net/VAT/gross amounts, Beninese VAT code, XOF currency, sequential numbering) are assembled automatically from your accounting data.
- Real-time submission and NIM retrieval: At invoice issuance, CassKai dialogues with the DGI server, retrieves the NIM and fiscal seal, and links them to the invoice in the database.
- Normalised PDF generation: The printable PDF automatically includes the QR code, NIM, NIFs and all legal mentions in accordance with DGI requirements.
- Error and degraded mode handling: If the DGI server is temporarily unavailable, CassKai queues the invoice and automatically retries transmission later, with a full audit trail.
- Accounting and fiscal traceability: Every validated invoice is linked to the corresponding SYSCOHADA accounting entries, ensuring consistency between monthly VAT returns and data transmitted to the DGI server.
- Compliance dashboard: Real-time tracking of validated, pending and errored invoices, with proactive alerts on anomalies.
- Legal archiving: 10-year retention with AES-256 encryption, easy retrieval in case of a DGI audit.
For the controller or SME manager, CassKai's added value goes beyond compliance: it is also a cash steering tool. Real-time tracking of issued invoices directly feeds DSO, customer aging and forecast treasury indicators, enabling fast action on late payments and securing working capital.
Beyond compliance, CassKai turns e-MECeF into a cash steering lever: DSO, customer aging, treasury forecasts fed in real time.