E-invoicing is coming to Morocco. What the law already says, what is still undecided, why the work is mostly about data, and the checks to put in place now on ICE numbers, invoicing flows and invoice content, whatever the timetable the tax authority (DGI) sets.
E-invoicing has been in Moroccan tax law since 2018, and the implementing texts are still awaited. That gap creates two bad reactions: waiting for the decree before doing anything, or buying software on the strength of a vendor's announced dates. Neither helps. Whatever the final timetable, an electronic invoice will only be accepted if the data behind it is right, and that data work takes months.
This article separates what is settled from what is not, then sets out the work that does not depend on the dates.
What the law already says
The principle is in Article 145-IX of the General Tax Code, added by the 2018 Finance Law (Law No. 68-17). It requires taxpayers to issue their invoices through an IT system that meets technical criteria set by the tax authority. Practitioner guides read it as covering companies subject to corporate tax, people taxed on professional income and VAT-registered persons, with auto-entrepreneurs and taxpayers under the single professional contribution (CPU) excluded.
The identifiers that will travel on every electronic invoice are already compulsory on paper ones:
- since the 2016 Finance Law, which added paragraph VIII to Article 145, every taxpayer must show its own ICE, the 15-digit common company identifier, on its invoices;
- since the 2018 Finance Law amended Article 145-III, the invoice must also show the buyer's ICE.
In other words, the data the electronic invoice will need is not new. What is new is that software will read it, field by field, and reject what does not match.
What is still undecided
Article 145-IX sets no date. The scope of each phase, the thresholds, the deadlines and the technical format are left to implementing texts. As of autumn 2026, no implementing decree had been published in the Official Bulletin, according to the public sources we reviewed.
Meanwhile, commercial guides announce timetables that contradict each other: some put large companies first in 2026, others give revenue thresholds that differ from one guide to the next, others push small companies to 2027 or 2028. Several describe a "clearance" model, in which each invoice is validated by a DGI platform before it is legally issued, and name specific file formats. These may turn out to be right, but none of them cites a published official text.
Why it is a data project, not a software purchase
An e-invoice is not a PDF sent by email. It is a structured file that software reads field by field. A person reading a paper invoice tolerates a lot: a customer name spelled three ways, an ICE with a space in the middle, a VAT line rounded differently. A validation platform tolerates none of it.
So the difficulty is not producing a file. Any recent invoicing tool can produce one. The difficulty is that the file will expose, at the moment of sending, every inconsistency that has built up in the customer master data, in the product catalogue and in the invoicing flows. Companies that fix this beforehand switch quietly. The others discover their data problems through rejected invoices, which means unpaid invoices.
Reliable ICE numbers for every customer and supplier
An invoice read by software does not forgive a wrong identifier. In most systems the ICE was typed by hand, sometimes in a free-text field, sometimes not at all. The same customer often exists as several records with different ICE numbers.
- Export the customers and suppliers active over the last 12 months, from every system that invoices.
- Check that every ICE is filled in and has exactly 15 digits, with no spaces or separators.
- Find duplicates: one ICE on several records, or one company name with different ICE numbers.
- Name an owner for the customer and supplier master data, who approves every correction and every new record.
Illustrative example: 7 customer records go through 4 quality rules. 4 records are published. 3 go to quarantine: one with no ICE, one duplicate, one invalid email.
The figure shows what these checks look like once they run automatically on customer data: records with a missing ICE, a duplicate ICE or an invalid email are held back with their reason, and the others go through. The same checks, placed at the point where records are created, stop new errors from getting in.
This is the core of our governance and master data work: one reference record per company, and checks that stop new errors getting in. Our article on duplicate customers explains how to match the existing records.
Connecting the ERP, the invoicing tools and the platform
Invoices rarely start in one place. There is the ERP, an invoicing tool for some activities, and often a spreadsheet for credit notes or recharges. Each source will have to produce a complete file and send it.
- List every place where an invoice or credit note is created, with its monthly volume.
- For each source, check that it can produce every mandatory field.
- Choose one route to the platform: from the ERP, or through an integration layer that gathers every source.
- Plan the return path: a rejected invoice must go back to a named person, with the reason for the rejection.
The spreadsheet is usually the hardest case. It is fast, flexible and invisible to the IT team, which is exactly why it cannot stay as it is. Either its invoices move into a system that can produce a structured file, or it is connected to the integration layer with the same checks as everything else.
These flows are data engineering and integration work: interfaces that are tested, logged and retried automatically when they fail.
Checking every invoice before it is sent
Better for an invoice to fail on your side than on the tax authority's platform. Each rule becomes a test that runs before sending:
- mandatory fields are present;
- the customer's ICE exists in the master data;
- the total matches the sum of the lines;
- the VAT rate is one of the permitted rates;
- invoice numbering has no gaps.
An invoice that fails goes to an exceptions queue with its reason, instead of being blocked without explanation. It is the approach behind our carrier invoice reconciliation: a check on every field, and human review kept for the ambiguous cases.
Once the checks run, count the failures each week, by rule and by source. That count is your readiness indicator: when it stays close to zero, you are ready for any timetable.
Where to start
Three steps are enough to know where you stand:
- an inventory of your invoicing flows, source by source;
- a measure of your customer and supplier data quality: records without an ICE, duplicates, invalid formats;
- a costed compliance plan, with the order of the work.
That is the scope of our data platform assessment, in two to three weeks. You leave with the current state, the priorities and the plan, whether or not you carry it out with us.
Sources
- General Tax Code, Article 145, paragraphs III, VIII and IX, as amended by the 2016 and 2018 Finance Laws. Official text: tax.gov.ma.
- CMS Law-Tax, "Maroc : mesures communes de la loi de Finances pour 2016" (ICE on invoices). cms.law.
- Upsilon Consulting, "Facturation électronique au Maroc 2026 : guide complet" (scope of Article 145-IX and exclusions). upsilon-consulting.com.
- Deadline.ma, "Facturation électronique DGI au Maroc 2026 : ce qui est officiel" (status of the implementing decree). deadline.ma.

