Skip to main content

Free e-invoice examples: one valid invoice, and one invalid variant per official rule

Valid and invalid e-invoice examples, one invalid example per rule, checked against the official rules. Free to use for anything: the examples are in the public domain (CC0).

Status: 0.1.0, first target fr (Factur-X / CII, French reform rules).

Download the examples

examples/fr/ holds, as XML (CII) and as a Factur-X PDF:

  • valid.xml, valid.pdf: a French invoice that passes every rule listed below;
  • invalid/<rule>.xml, invalid/<rule>.pdf: the same invoice with one thing wrong, for example invalid/BR-FR-10.xml (the seller's SIREN is missing);
  • manifest.json: for each example, the rules it fails, in English and French, and the rule versions.
Rules checked Version
EN 16931 (CII) 1.3.17
Factur-X, EN 16931 profile 1.09.2
BR-FR (French e-invoicing reform), FNFE-MPE France_RFE 1.4.0.04

Valid means:

  • no fatal error from these three rule sets;
  • valid against the Factur-X 1.09.2 EN 16931 schema.

Invalid means the example fails exactly the rules its manifest entry lists, and nothing else.

  • Most fail one rule.
  • A few fail two or more, because the official rules overlap (for example BR-FR-DEC-01 and EN 16931 BR-DEC-14).
  • Every invalid example stays schema-valid: only a business rule is broken.

Coverage: 91 invalid examples cover all 98 BR-FR rule ids that can fire on a Factur-X EN 16931 invoice. Three more apply but cannot fire, two because of the Factur-X schema and one because of how the rule file is written: COVERAGE.md says why.

About the PDFs: they carry the XML as factur-x.xml. They are not PDF/A-3: they are for testing XML extraction and the XML rules, not PDF/A-3 validation.

Use them in a test suite

The same examples also ship as a Python package, so a test suite can pin a version instead of copying files:

uvx invoice-examples generate --target fr --out examples/   # writes exactly the files of examples/fr/

The same version always writes the same bytes. Each release also ships its wheel and sdist on GitHub Releases.

How the examples are checked

The test suite builds every example and runs the official artefacts on it, pinned and downloaded once:

  • the EN 16931 Schematron;
  • the Factur-X profile rules;
  • the BR-FR Schematron (run with Saxon);
  • the Factur-X schema.

It fails if:

  • the valid example fails any rule;
  • an invalid example fails a rule it does not declare, or misses one it does;
  • the committed examples/ folder differs from what the code generates.

The checks use the official files only, not a validator of ours, so the examples are an independent reference. France_RFE's AFNOR documents are never downloaded.

uv sync && uv run pytest
uv run python scripts/coverage.py   # rewrites COVERAGE.md

Possible next targets

chorus-pro (the historic channels of the French public portal), xrechnung, peppol; UBL alongside CII.

Licences

  • The examples (examples/): CC0-1.0.
  • The code: MIT.
  • The official rules used by the tests keep their own licences (EUPL-1.2 for EN 16931; Apache-2.0 for the France_RFE repository, whose Schematron file headers say EUPL) and are not part of this repository.

Metadata

Release files for invoice-examples 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for invoice-examples 0.1.0
File Size Uploaded Provenance Actions
invoice_examples-0.1.0.tar.gz 87.2 kB With provenance Details for invoice_examples-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for invoice-examples 0.1.0
File Interpreter ABI Platform Actions
invoice_examples-0.1.0-py3-none-any.whl Python 3 none any Details for invoice_examples-0.1.0-py3-none-any.whl

Total release size: 108.7 kB

Release files / invoice_examples-0.1.0.tar.gz

Download URL invoice_examples-0.1.0.tar.gz
Size 87.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e5657564063953884914bbea743cacdb585783407293d001dd8a501f5ae667c2
BLAKE2b-256 checksum
How to use checksums
51d9af4fee416d7efc3e7d4b597137403b205ba2f0da651656aa175f4b701393
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Release files / invoice_examples-0.1.0-py3-none-any.whl

Download URL invoice_examples-0.1.0-py3-none-any.whl
Size 21.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e3048e1b48e6a1e91f9b20af7b7c621a8b0778d672048d74fffe430b1837f61
BLAKE2b-256 checksum
How to use checksums
b824fff7bee7e991ae64df06260fb37ccf97b6f190ff2df668515f1c361d8698
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Security for invoice-examples 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for invoice_examples-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page