What is an electronic invoice in the DGI's sense?
A PDF invoice sent by email is not an electronic invoice in the sense the tax administration means. A PDF is an image of a document: a person can read it, but a system cannot reliably extract its data. An electronic invoice is a structured file, usually XML, in which every piece of information has a defined place: seller and buyer identifiers, number, date, lines, VAT rates and amounts, total.
The stated goal is twofold: fight VAT fraud by tracking invoices at the moment they are issued, and simplify tax filings for businesses. Several countries have already adopted this model, and Morocco is following the same path.
What has the DGI announced?
The DGI's public communications describe the main features of the system. They remain orientations until the legal texts and technical documentation are published, but they already explain the logic.
- A tax administration platform through which invoices are routed.
- Prior validation: the platform checks the invoice before it is considered validly issued.
- An electronic signature guaranteeing the invoice's origin and the integrity of its content.
- Time-stamping that reliably fixes the date and time of issue.
- A phased rollout, with details still to be officially specified.
| Item | Current status | What you can do now |
|---|---|---|
| DGI platform | Announced | Follow the DGI's official communications |
| Prior validation of invoices | Announced | Clean up data: ICE, legal name, address, VAT |
| Electronic signature | Announced, details to be specified | Identify who issues invoices in the company |
| Time-stamping | Announced | Issue invoices in a tool that dates every document |
| Technical specification and official format | Not published | Have a structured format available, such as UBL 2.1 |
| Timeline and businesses concerned | To be confirmed by official texts | Ask your accountant to alert you |
| Numbering and corrections | Good practice already expected | Continuous numbering, corrections only via credit notes |
What has not been published yet?
As of today, the official technical specification has not been published: the exact required format, the final list of fields, how to connect to the platform and the detailed signature rules are still unknown. The mandatory timeline and which categories of businesses go first must also be confirmed by official texts.
Be wary of offers that present themselves as already validated by the administration: no software can claim to follow a standard that has not been published. Follow the DGI's announcements and ask your chartered accountant to alert you as soon as the texts are released.
How can you prepare your customer data now?
Whatever the final format, an electronic invoice will only pass validation if its data is correct. The longest task is not technical, it lies in your files: customers without an ICE number, approximate company names, incomplete addresses. This clean-up can start today.
Your own company record must be flawless too: legal name, address, ICE, IF, RC and business tax number, exactly as they appear on your official documents.
- Record the ICE number of every business customer (it is mandatory on invoices between businesses).
- Check each customer's exact legal name and full address.
- Remove duplicate customer records.
- Assign every item an explicit VAT rate (20%, 14%, 10%, 7% or exempt; rates can change with each finance law).
- Check your own company details: ICE, IF, RC, business tax number.
Why do sequential numbering and credit notes matter?
A validated electronic invoice cannot be edited or deleted. Any correction goes through a credit note, followed by a new invoice if needed. That is already good practice today, yet many businesses still correct invoices directly in a spreadsheet or word processor.
Numbering must be continuous and chronological, with no gaps or duplicates. Numbering kept by hand, or across several files, is the main source of anomalies. Build the habit now: an issued invoice stays issued, and a mistake is fixed with a credit note.
Why use a structured format such as UBL 2.1?
UBL (Universal Business Language) is an open international XML standard for business documents, published by OASIS. Version 2.1 is widely used for electronic invoicing around the world. Having your invoices and credit notes available in UBL 2.1 today shows that your data is complete and structured.
Morocco's official format is still to be confirmed by the DGI. But moving from one structured format to another is a technical adjustment; moving from incomplete handwritten invoices to a structured file is an organisational change. That second task is the one to anticipate.
How does SOGESTIO help you prepare?
SOGESTIO exports validated invoices and credit notes in the structured UBL 2.1 format (with ICE, IF and RC), which prepares the move to the e-invoicing system announced by the DGI. Sequential numbering is assigned by the server, per document type and per year, and totals excluding VAT, VAT and including VAT are computed by the server, with VAT per line and summed by rate.
SOGESTIO has not been officially recognised by the DGI, because the specification does not exist yet: it prepares your data so that adapting is simple when the time comes. You can try it free for 14 days, no card required; the Starter plan starts at 199 DH/month excl. VAT.
This guide is for information only and does not replace advice from your accountant or the relevant authority.
Frequently asked questions
Is electronic invoicing already mandatory in Morocco?
The DGI has announced the system, but the official technical specification has not been published and the timeline must be confirmed by official texts. Follow the DGI's communications and check your situation with your accountant. Meanwhile, prepare your data and numbering.
Is a PDF invoice sent by email an electronic invoice?
No, not in the sense of the announced reform. A PDF is an image of a document; an electronic invoice is a structured file, usually XML, whose data a system can read. It must also be sent to the DGI platform for validation.
What does prior validation mean?
It means the administration's platform checks the invoice before it is considered validly issued. An invoice with incomplete or inconsistent data may be rejected. That is why clean customer records with ICE numbers matter.
Why talk about UBL 2.1 if the official format is unknown?
UBL 2.1 is an open international standard widely used for electronic invoicing. Having invoices in a structured format proves your data is complete and makes adapting to the official format much easier, whatever it turns out to be.
How does SOGESTIO handle e-invoicing?
SOGESTIO exports validated invoices and credit notes in the structured UBL 2.1 format (with ICE, IF and RC), with numbering assigned sequentially by the server, which prepares the move to the e-invoicing system announced by the DGI. It has not been officially recognised by the DGI: since the specification is not yet published, compatibility with the final system cannot be confirmed today.
Can I edit an invoice that has already been issued?
Good practice, already expected today and essential with e-invoicing, is never to edit an issued invoice. You issue a credit note cancelling it fully or partly, then a new invoice if needed. Check special cases with your accountant.