In this article
Why is an electronic signature certificate mandatory?
To submit your invoices to the DGI portal as part of electronic invoicing (Article 145-IX CGI), your company must have a class 3 qualified electronic signature certificate issued by a provider approved by the ANRT (National Telecommunications Regulatory Agency).
This certificate plays three essential roles:
- Official digital identity — It proves to the DGI that the invoice genuinely originates from your company.
- Signature before sending — Billora uses this certificate to electronically sign each invoice in UBL 2.1 format before submitting it to the DGI.
- Integrity guarantee — The cryptographic signature ensures that the invoice content has not been modified after signing.
Without a valid certificate, no invoice can be submitted to the DGI portal.
ANRT-approved providers in Morocco
Three providers are currently approved to issue qualified signature certificates in Morocco:
| Provider | Website | Notes |
|---|---|---|
| Barid eSign | barideSign.ma | Subsidiary of Barid Al-Maghrib (Moroccan Post) |
| Digileo | digileo.ma | ANRT trust service provider |
| Damanesign | damanesign.ma | ANRT qualified certification |
Note: Billora is compatible with all three providers. You are free to choose based on each one's pricing, lead times and delivery terms.
Documents required for the application
Prepare the following documents before contacting the provider:
- ID of the legal representative (CIN national ID card or passport)
- ICE (Common Business Identifier, 15 digits)
- IF (Tax Identifier)
- RC (Trade Register)
- Proof of activity (depending on the provider)
The provider then issues you a digital certificate in the X.509 standard, usually as a password-protected P12/PFX file.
P12 / PFX format: what is it?
A P12 file (or PFX, the Windows extension for the same PKCS#12 format) is a digital vault that bundles in a single file:
- your electronic signature certificate;
- the matching private key, which is what allows you to sign;
- the certificate chain of the authority that issued it.
It is password-protected, with the password you chose when it was issued. A few good habits:
.p12and.pfxare equivalent: renaming one to the other changes nothing.- Do not confuse it with a
.ceror.crtfile, which only holds the public certificate and cannot sign: Billora needs the file that contains the private key (P12/PFX). - Keep a backup of the file and of its password, stored separately in a safe place. Without the password the file is unusable; without the file you must ask your provider for a new certificate.
- Never send it by email or messaging apps: anyone holding the file and its password can sign in your name.
Importing your certificate into Billora
Once you have your P12/PFX file, go to Settings → Electronic invoicing:
- Click "Activate electronic invoicing"
- In the "Signature certificate" step, click "Import a P12/PFX certificate"
- Select your
.p12or.pfxfile - Enter the password provided by your provider
- Choose your provider from the list
- Click "Import"
Billora automatically checks the certificate's validity and displays its expiry date. Electronic invoicing is activated immediately as soon as the certificate is recognized as valid.
What Billora does automatically after activation
Once the certificate is imported and activation is confirmed:
- Each invoice created is automatically signed in UBL 2.1 with your certificate
- The signed invoice is submitted to the DGI (or to the operator you chose)
- The DGI validates the signature and the tax content, and returns a unique archive identifier
- The final PDF includes this DGI identifier and the verification QR code
You have no technical action to take: Billora handles the entire process.
What happens if there's a certificate problem?
Billora automatically handles the following cases:
Expired certificate Billora blocks submission to the DGI and shows a clear message inviting you to renew your certificate with your provider. No invoice can be submitted until the certificate is renewed.
Invalid signature Billora detects that the password or the file is incorrect and shows an error message. Submission is blocked until corrected.
Network error (provider unavailable) Billora performs up to 3 automatic retries with increasing delays. If they all fail, the invoice is set to "network error" status (recoverable) rather than "rejected" (final). You can resubmit manually from the invoice page.
Frequently asked questions
Do I have to change my certificate every year? It depends on the validity period chosen when ordering (usually 1 to 3 years). Billora shows the expiry date in your settings and will alert you before it expires.
Can I change signature provider? Yes. Delete the old certificate in Billora and import the new one. Invoices already validated by the DGI are not affected.
Is the certificate stored securely in Billora? Yes. Billora never stores the raw P12 file: only the connection information required for signing is kept, encrypted on the server side.
Need help configuring your certificate? Read our detailed documentation or contact support.