Skip to content

Factur-X / EN16931 #11

@ThierryHFR

Description

@ThierryHFR

Title

French PDP compliance improvements

Expected Behavior

Summary

While integrating the InvoicePlane e-invoicing module with French PDP platforms, I identified several interoperability issues that cause generated Factur-X invoices to fail validation against current French e-invoicing requirements.

The proposed changes have been tested successfully against:

  • SuperPDP validator
  • FactPulse validator

After applying these modifications, the generated invoices pass both validators.

Context

The current Factur-X implementation generates XML files that may pass some historical Factur-X validators but fail the latest French FNFE-MPE / PDP validation rules (XP Z12-012 / CTC France).

The changes below were implemented during a real-world integration project targeting French electronic invoicing compliance.

Custom fields used

To support French PDP routing requirements, I used:

Seller

A custom field:

user_siren

containing the seller SIREN.

Buyer

The existing field:

client_company

is used to store the buyer SIREN.

In the localization configuration, I mapped:

SIREN => client_company

allowing the buyer SIREN to be exported without database schema changes.

Problems identified

1. Invalid GuidelineSpecifiedDocumentContextParameter ID

Current value:

urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended

Rejected by current French validation suites.

Working value:

urn:cen.eu:en16931:2017

2. Invoice identifier contains invalid characters

French rule BR-FR-02 rejects invoice references containing characters outside:

A-Z a-z 0-9 + - _ /

Example:

2026.05.0023

should become:

2026-05-0023

3. Missing mandatory French legal notes

French validation requires BT-22 notes:

  • PMT (collection costs)
  • PMD (late payment penalties)
  • AAB (discount policy)

4. Missing Seller SIREN (BT-30)

The seller SIREN should be exported from:

user_siren

and included in:

ram:SellerTradeParty/ram:ID

and

ram:SpecifiedLegalOrganization/ram:ID schemeID="0002"

5. Missing electronic routing identifiers

French PDP routing requires:

  • BT-34 Seller electronic address
  • BT-49 Buyer electronic address

Using SIREN identifiers:

<ram:URIID schemeID="0002">123456789</ram:URIID>

For my implementation:

  • BT-34 = user_siren
  • BT-49 = client_company

6. Invalid payment means generation

The module may generate a payment block without IBAN or account identifier.

This causes failures:

  • BR-50
  • BR-61
  • BR-CO-27

If payment type 30 is used, either:

<ram:IBANID>...</ram:IBANID>

or

<ram:ProprietaryID>...</ram:ProprietaryID>

must be present.

Otherwise the entire payment block should not be generated.

Validation results

The modified implementation was validated successfully using:

  • FactPulse
  • SuperPDP

These validators implement the latest French FNFE-MPE / PDP requirements and are representative of upcoming production PDP checks.

Benefits

  • Improved EN16931 compliance
  • French PDP compatibility
  • Reduced invoice rejection risk
  • Better interoperability with future French e-invoicing platforms
  • Compatibility with SuperPDP and FactPulse validation suites

Current Behavior

No response

Steps to Reproduce

No response

Screenshots (Optional)


Possible Solution (Optional)

No response

Context (Environment)

No response

Failure Logs (Optional)

No response

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    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