Categories
Chapter 01 / 05
Legal framework
The legal texts that ground Morocco's e-invoicing mandate and frame its electronic signature.
- Article 145-IX of the CGI
Paragraph IX of article 145 of Morocco's General Tax Code (Code Général des Impôts). The legal foundation for mandatory e-invoicing in Morocco: it requires taxpayers to operate an invoicing system meeting technical criteria set by the administration, and defers implementation details to a forthcoming decree. The 2026 edition of the CGI was promulgated by Finance Law 50-25, dahir 1-25-67 of 10 December 2025.
- Law 43-20
Law 43-20 on trust services for electronic transactions, promulgated by dahir 1-20-100 of 31 December 2020 and published in Bulletin Officiel n° 6970 on 18 March 2021. Frames electronic signatures, electronic seals, electronic timestamping, registered electronic delivery and website authentication. Defines three trust levels (simple, advanced, qualified) and the regime applicable to trust service providers.
- Law 09-08
Law 09-08 promulgated in 2009, which governs personal-data protection in Morocco. It instituted the CNDP, regulates international data transfers, and requires prior declaration or authorisation of processing. For e-invoicing, it applies to the identifying data (ICE, IF, addresses) flowing between issuer, recipient and the DGI platform.
Trust services for electronic transactions
Protection of natural persons regarding personal-data processing
Chapter 02 / 05
Tax identifiers
The administrative codes that must appear on every invoice for the DGI to recognise it.
- ICE
A 15-digit number assigned to every Moroccan business. Mandatory on all invoices to enable fiscal and statistical identification of the parties to a transaction. Under the 145-IX regime, the recipient's ICE becomes indispensable on the e-invoice: without it, the document cannot be validated by the DGI platform.
- IF
Tax-registration number issued by the DGI to any natural or legal person liable for a tax. Mandatory for both issuer and recipient on the e-invoice under article 145-IX. Not to be confused with the ICE: the IF identifies the taxpayer within the tax system; the ICE identifies the business within the broader Moroccan economic ecosystem.
- RC
Registration number with the Trade Register kept by the commercial courts. Mandatory for any legal entity carrying out commercial activity in Morocco. Belongs to the legal mentions an invoice must carry, independently of dematerialisation.
- TP
Identification number under the professional tax (former patente). Mandatory mention on invoices issued by any subject business. Appears among the mentions required by the CGI on the e-invoice under article 145-IX.
Identifiant Commun de l'Entreprise — Common Enterprise Identifier
Identifiant Fiscal — Tax Identifier
Registre de Commerce — Trade Register
Taxe Professionnelle — Professional Tax
Chapter 03 / 05
Model and process
The clearance mechanism, the role of the unique identifier, and end-to-end accounting traceability.
- Clearance
An e-invoicing model where every invoice must be validated by the tax authority's platform before having legal standing. Adopted by Morocco, Italy (since 2019), Saudi Arabia (since 2021) and other jurisdictions. Contrasts with the post-audit model, where invoices flow freely between parties and are audited later.
- Post-audit
An e-invoicing model where invoices are exchanged freely between issuer and recipient, with the tax authority auditing them later. The historical model in Germany and most European countries. Presented here in contrast to the clearance model adopted by Morocco.
- DGI unique identifier
Archival reference assigned by the DGI national platform to every validated invoice. Under the clearance model, this identifier is what gives the document its legal standing: without it, the invoice is not fiscally recognised. It is affixed to the final document, typically reproduced in the QR code of the human-readable PDF copy.
- Reliable audit trail
Moroccan accounting requirement that every entry must be linkable continuously to its supporting document, and vice versa. In the e-invoicing context, end-to-end traceability (issuance → signing → DGI validation → posting → archival) constitutes this audit trail. CGNC compliance is a prerequisite for defending accounting regularity during a tax audit.
- Avoir
Tax document issued to cancel or correct an already-cleared invoice. In the Moroccan model, a validated and therefore legally-binding invoice cannot be modified: the correction must go through a credit note, followed if needed by a new compliant invoice. The credit note itself must be validated by the DGI platform.
Continuous Transaction Controls (CTC)
CGNC — Moroccan General Accounting Standards Code
Credit note
Chapter 04 / 05
Technical formats
The XML standards, signature profiles, and protocols for connecting to the national platform.
- UBL 2.1
An OASIS-maintained XML standard for business documents, approved in November 2013. Defines the grammar for over 80 documents (invoice, credit note, purchase order, delivery note…) using a shared vocabulary. The favoured e-invoice format on Morocco's national platform. Each country typically adopts a subset (profile) tailored to its tax constraints.
- CII
An XML invoice format standardised by UN/CEFACT, an alternative to UBL 2.1. Widely used in industry and international B2B trade. Accepted by the Moroccan DGI platform alongside UBL 2.1, though UBL is the de-facto preference.
- XAdES
An e-signature profile for XML documents, standardised by ETSI. Extends the XML-DSig signature with additional attributes (timestamps, validation certificates, signature policy) to produce signatures that remain verifiable long-term. The typical envelope for a qualified electronic signature on a UBL 2.1 invoice.
- QSCD
A secure hardware device holding the private key used to create a qualified electronic signature. Concretely: a Hardware Security Module (HSM), smart card, USB token, or a phone's secure enclave. Its defining property: the private key never leaves the device in plaintext. The use of a QSCD is a condition of qualified signing under law 43-20.
- EDI
The structured exchange of business documents between IT systems using standardised formats. Morocco's national platform announces an EDI / REST API channel for direct integration with large-enterprise ERPs (SAP, Oracle, Sage X3) — as opposed to the fatourati.gov.ma web portal aimed at very small businesses and SMEs.
Universal Business Language version 2.1
Cross-Industry Invoice
XML Advanced Electronic Signatures
Qualified Signature Creation Device
Electronic Data Interchange
Chapter 05 / 05
Institutions and actors
The administrations, authorities and providers that make the Moroccan dispositif work.
- DGI
The Moroccan tax administration, attached to the Ministry of Economy and Finance. Project owner of the e-invoicing initiative: it sets the technical norms, operates the national validation platform and ensures conformity control. The Director General in office at the launch of the scheme is Younès Idrissi Kaitouni.
- ANRT
Morocco's telecoms regulator. Historically certified electronic certification authorities under the previous regime (law 53-05). Under the new law 43-20 regime, oversight of trust service providers is primarily handled by DGSSI; ANRT's exact remaining role is evolving — verify the current situation when selecting a PSCo.
- DGSSI
The Moroccan information-systems security authority, attached to the National Defence administration. Under the law 43-20 regime, DGSSI publishes the official text and the regulatory reference frameworks (référentiels d'exigences) applicable to trust service providers, and runs information sessions on compliance obligations.
- CNDP
An independent authority created by law 09-08 and tasked with overseeing personal-data protection in Morocco. Receives processing declarations, authorises international data transfers, handles complaints. For e-invoicing, its remit covers the identifying data flowing between parties and the DGI platform.
- xHub
Technology partner selected by the DGI to develop the national e-invoicing platform. The platform is built on a microservices architecture and offers several connection modes: REST API, the fatourati.gov.ma web portal, and connection via accredited dematerialisation operators.
- fatourati.gov.ma
Free DGI-provided web portal aimed at very small businesses, SMEs and self-employed for creating and transmitting their e-invoices directly on the national platform, without going through a third-party tool. Sufficient for low invoice volumes. Effective launch date depends on publication of the implementing decree.
- PSCo
An entity accredited to provide trust services within the meaning of law 43-20: issuance of qualified e-signature certificates, supply of a QSCD device, electronic timestamping, electronic seals. In Morocco, accreditation is granted by the competent regulatory authority. The average cost of a qualified signature certificate is around MAD 1,200 per year.
Direction Générale des Impôts — General Tax Directorate
Agence Nationale de Réglementation des Télécommunications — National Telecommunications Regulator
Direction Générale de la Sécurité des Systèmes d'Information — National Information Systems Security Authority
Commission Nationale de contrôle de la Protection des Données à caractère personnel
Prestataire de Services de Confiance — Trust Service Provider