Briefing

Factur‑X 2026: Guide d’implémentation pour les PME du BTP

e-commerce
by Olivier EBRAHIM ·

Patch: use facturx Python library to generate Factur‑X compliant XML and embed it in PDF for BTP SMEs.

What to do now

Patch: install facturx, create invoice_dict, call generate_from_dict, embed XML into PDF, and test with Piste.

Summary

Factur‑X, a composite container that bundles an XML invoice inside a human‑readable PDF, becomes mandatory for all French SMEs and ETIs in 2026, extending beyond the 250‑employee threshold that applied since 2020. The format relies on the European EN 16931 standard and offers two profiles: Minimum (mandatory fields only) and Extended (additional details such as discounts and shipping). The article walks through the implementation steps for a BTP SME: validate source data (SIRET, VAT, bank details, project reference), generate the XML using the Python facturx library, embed the XML into the PDF with PyPDF2 and reportlab, and ensure compliance with the Piste platform. It also highlights SaaS alternatives like Anodos that handle generation and compliance automatically.

Key technical points include using facturx.generate_from_dict to create the XML, adding the XML as metadata in the PDF, and validating the final file against the EN 16931 schema. The guide stresses that the Minimum profile is sufficient for 80 % of invoices, while the Extended profile can be used for more detailed billing.

The article serves as a practical reference for developers and IT managers in the construction sector who need to migrate to Factur‑X without disrupting their existing workflows.

Key changes

  • Factur‑X is a composite container with PDF and embedded XML
  • Minimum profile covers mandatory fields; Extended adds discounts, shipping, order refs
  • Python facturx library generates XML from a dictionary
  • PyPDF2 and reportlab embed XML metadata into the PDF
  • Validation of data sources includes SIRET, VAT, bank details, project reference
  • Piste platform requires Factur‑X compliance
  • SaaS options like Anodos provide turnkey solutions
  • Implementation steps: validate, generate XML, embed in PDF, test compliance

Affects

enterprise

Customer impact

Analyzing matches…

Ask about this story

Impact on an agency? Which customers? Compare historically Risks of waiting