Factur-X France 2027
A zero-dependency Python validator for French e-invoices (Factur-X, EN 16931). It ships as a CLI, a library and a reusable GitHub Action, with a browser-only audit page on the FacturKit site.
- Status
- Status: Released
- Stack
- Python standard library, GitHub Actions, PDF/A-3, EN 16931
- Last commit
- 17 November 2026
- Try it
- Browser audit on the FacturKit site
- Sources
- Each tag opens the README line that makes the claim, at commit
d724024.
The problem
France’s e-invoicing reform makes structured invoices such as Factur-X mandatory. Per README, every company must be able to receive them from 1 September 2026, and small companies must issue them from 1 September 2027. README L42–44 (source in the Factur-X France 2027 repository) A plain office PDF no longer qualifies. README L228 (source in the Factur-X France 2027 repository) Finance teams need to catch a bad file before a platform rejects it.
What I built
The README is in French, with an English summary. README L240 (source in the Factur-X France 2027 repository)
- A single-file validator, standard library only: no pip install, no C compiler. README L9 (source in the Factur-X France 2027 repository) README L68 (source in the Factur-X France 2027 repository)
- Extraction of
factur-x.xmlfrom hybrid PDF/A-3 invoices, with checks on/AFand XMP metadata. README L11 (source in the Factur-X France 2027 repository) - Validation of CII XML against the Factur-X 1.0.07 / EN 16931 profiles, MINIMUM to EXTENDED. README L12 (source in the Factur-X France 2027 repository)
- An audit of the 4 new mandatory French invoice mentions (proof: Factur-X France 2027 README L13), including the buyer’s SIREN checked with Luhn.
- A reusable GitHub Action that annotates failing files in pull requests. README L167 (source in the Factur-X France 2027 repository)
- A browser-only audit page on the FacturKit site; no data is sent to a server. README L16 (source in the Factur-X France 2027 repository)
System as built
Invoice in
A PDF/A-3 file, a CII XML file, or a whole folder.README L86–94 (source in the Factur-X France 2027 repository)
Streams decompressed
/FlateDecodeand/ObjStm; the XML is pulled from/EmbeddedFiles.README L194 (source in the Factur-X France 2027 repository)PDF/A-3 checks
The
/AFentry, XMP metadata and conformance level.README L195–196 (source in the Factur-X France 2027 repository)CII root and profile
Namespace and profile URN.README L197–198 (source in the Factur-X France 2027 repository)
Header, SIREN and totals
Luhn checks and strict
Decimalarithmetic.README L199–201 (source in the Factur-X France 2027 repository)The 4 mentions for 2026–2027
Buyer SIREN, operation category, delivery address, VAT regime.README L202–205 (source in the Factur-X France 2027 repository)
Report
Terminal, JSON or pull-request annotations; exit code 1 if an invoice fails.README L93–97 (source in the Factur-X France 2027 repository)
How it is verified
- GitHub Actions CI: the latest run on
mainpassed on 17 November 2026. - Release v1.0.0, used by the Action as
yannabadie/facturx-france-2027@v1.0.0. README L4 (source in the Factur-X France 2027 repository) README L181 (source in the Factur-X France 2027 repository) - Unit tests:
python3 test_validator.py -v. README L235 (source in the Factur-X France 2027 repository) - 14 checks across PDF/A-3, EN 16931, accounting and the 2027 mentions, each listed in the README. README L190–207 (source in the Factur-X France 2027 repository)
- Sample PDF/A-3 and XML invoices ship in the repository. README L77 (source in the Factur-X France 2027 repository)
What this means for your project
- Compliance as code: a CI gate fails the build before a bad invoice reaches a platform. When an agent prepares invoices, that is part of an Agent or MCP build.
- With zero dependencies it runs where installs are locked down, such as a CI runner or an Alpine container. README L68 (source in the Factur-X France 2027 repository)
- Exit codes and JSON output plug into an ERP job or a webhook. README L93–97 (source in the Factur-X France 2027 repository)
Status & limits
- Working. v1.0.0 was released on 14 November 2026; last commit 17 November 2026.
- This repository covers audit and verification only. It does not generate invoices. README L213 (source in the Factur-X France 2027 repository)
- It runs the 14 checks it lists and nothing more. It is a tool, not a certification.
Links
- View the repo on GitHub
- Browser audit on the FacturKit site
- README at commit d724024, as read for this page
Next case study: Meta-YGN
Want this pattern in your stack?
Contracted and paid on Upwork, at $90/h.