Skip to content

[Docs D-25] Reference — Validation and testing #90

Description

@nielsdrost7

Wiki section: Reference
Tier: 3 — Reference
Publish when: InvoicePlane v1.8.0 is released

Always validate a newly generated invoice before sending it to a client or submitting it to a platform. One validation round against the official validator for your format will catch the vast majority of issues.


Validator directory

Format / Country Validator URL
EN 16931 (generic) Ecosio https://ecosio.com/en/peppol-and-xml-document-validator/
Factur-X, ZUGFeRD Ecosio / Mustangproject https://www.mustangproject.org/
France — Factur-X PDP FactPulse https://www.factpulse.fr/
France — Factur-X PDP SuperPDP https://www.superpdp.fr/
Germany — ZUGFeRD / XRechnung Invoice portal (KoSIT) https://www.invoice-portal.de/validator
Germany — XRechnung Ecosio https://ecosio.com/en/peppol-and-xml-document-validator/
Belgium — UBL.BE UBL.BE validator https://www.ubl.be/validator/
Romania — CIUS-RO ANAF e-Factura https://efactura.mfinante.gov.ro/
Poland — KSeF KSeF test environment https://ap-test.ksef.mf.gov.pl/
Italy — FatturaPA SdI test environment https://ivaservizi.agenziaentrate.gov.it/ser/
Spain — Facturae FACe portal https://face.gob.es/
Peppol generic Peppol validator https://peppol-validator.com/

Recommended validation workflow

For a new format or config

  1. Generate a test invoice for a known client
  2. Upload the XML (or XML+PDF for embedded formats) to the relevant validator
  3. Fix any reported errors — see Common validation errors for a mapped list
  4. Re-generate and re-validate until clean
  5. Save a passing test invoice as a reference fixture

For ongoing production use

  • Validate the first invoice of each calendar month
  • Validate whenever the InvoicePlane version or this module is updated
  • Validate after any change to a config file in XMLconfigs/

Testing embedded formats (Factur-X / ZUGFeRD)

For embedXML: true formats, the validator needs the PDF file, not just the XML. Upload the PDF — the validator extracts and validates the embedded XML attachment automatically.

To inspect the embedded XML manually:

# Extract XML from PDF using pdfdetach (poppler-utils)
pdfdetach -saveall invoice.pdf
# or
unzip invoice.pdf -d extracted/

The embedded file will be named factur-x.xml or zugferd-invoice.xml.


Validating against XSD schemas locally

For CI pipelines or automated testing, download the official XSD schemas:

Format Schema location
EN 16931 CII https://www.xoev.de/dam/xrechnung/2017
EN 16931 UBL https://docs.oasis-open.org/ubl/os-UBL-2.1/
XRechnung https://xeinkauf.de/xrechnung/
UBL.BE https://www.ubl.be/
xmllint --schema urn-un-unece-uncefact-data-standard-CrossIndustryInvoice-100.xsd \
        --noout invoice.xml

Common first-run failures

Error Likely cause Fix
Empty EndpointID client_vat_id or client_tax_code not filled Fill client record
Missing BuyerReference invoice_routing_code_1 not set Add via invoice E-Invoicing section
BR-FR-02 Invoice number contains . or # Change numbering scheme
ubl-BE-15 Tax rate not in TaxName mapping Use 21, 12, 6, or 0 % only
BR-50 / BR-61 No IBAN set Fill user_iban in Settings → User

Full error reference: Common validation errors and fixes


Migrated from InvoicePlane/InvoicePlane-e-invoices#49.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions