Generates PDF/A-3 invoices compliant with the Factur-X (EN16931) standard for French electronic invoicing requirements.
The module intercepts Thelia's PDF invoice generation. When an invoice is produced, it:
- Builds a CrossIndustryInvoice XML (CII) from the order data
- Embeds the XML into the PDF and converts it to PDF/A-3 using atgp/factur-x
- Archives the resulting PDF to disk
- Returns the compliant PDF to the user
The process is transparent — existing invoice generation continues to work as before, with Factur-X compliance added on top.
- Thelia 3
- PHP 8.2+
Via Composer:
composer require thelia/facturx-module
php Thelia module:activate FacturX
php Thelia cache:clearManual installation:
git clone <repository-url> local/modules/FacturX
composer require atgp/factur-x
php Thelia module:activate FacturX
php Thelia cache:clearNavigate to Back-office > Modules > Factur-X and fill in:
| Field | Description |
|---|---|
| SIRET | Your company's 14-digit SIRET number |
| VAT identification number | EU VAT number, e.g. FR12345678901 |
| Enable Factur-X | Toggle automatic generation on/off |
Seller name and address are read from the store configuration (Settings > Store).
The generated XML covers the EN16931 comfort profile:
- Seller: name, address, SIRET (BT-30), VAT number (BT-31)
- Buyer: name and address from the invoice address
- Invoice: number, date, currency, type code (380)
- Lines: product name, quantity, unit price, VAT rate
- Totals: line total, tax basis, tax amount, grand total, due payable amount
Generated Factur-X PDFs are automatically archived on disk, organized by year. The storage path is configurable in the module settings.
FacturX/
├── composer.json
├── FacturX.php
├── Config/
│ ├── module.xml
│ └── config.xml
├── EventListener/
│ └── InvoicePdfListener.php
├── Service/
│ └── FacturXService.php
├── Form/
│ └── ConfigurationForm.php
├── Controller/
│ └── Admin/
│ └── ConfigurationController.php
├── I18n/
│ ├── fr_FR.php
│ └── en_US.php
└── templates/
└── backOffice/
└── default/
└── facturx-configuration.html
This module is part of the Thelia e-commerce ecosystem.