Skip to content
Back to blog
EDIFACTPublished 6 July 202612 min read

EDIFACT to Peppol: how to migrate INVOIC and ORDERS to EN 16931 e-invoicing

A practical guide to migrating EDIFACT (INVOIC, ORDERS) to Peppol BIS 3.0 and XRechnung: why the mandates force it, how EDIFACT segments map to UBL, the conversion pitfalls and a working API example.

EDIFACT has moved trillions in trade for decades — INVOIC for invoices, ORDERS for orders, DESADV for despatch. But the new European e-invoicing mandates (Germany, Belgium, France, Poland) are built on EN 16931 and Peppol, not classic EDIFACT. That does not mean throwing away your EDI investment; it means adding a translation layer. This guide explains why the shift is happening, how EDIFACT maps to UBL, the pitfalls, and how to convert INVOIC to Peppol BIS 3.0 or XRechnung without rebuilding your stack.

Why the mandates force the change

Legislators standardised on the EN 16931 semantic model, expressed in XML syntaxes (UBL 2.1 and UN/CEFACT CII). Classic EDIFACT INVOIC is not one of the legally accepted formats for the new B2B mandates. So even where you exchange EDIFACT today with a large retailer or manufacturer, the compliant invoice for tax purposes has to exist as EN 16931 — typically Peppol BIS 3.0 or XRechnung. Many companies keep EDIFACT with their established trading partners and generate the compliant Peppol/XRechnung version alongside it.

EDIFACT vs Peppol: two different models

  • Syntax: EDIFACT is compact segment/element notation (UNH, BGM, NAD, LIN, MOA); Peppol is verbose XML with named elements.
  • Semantics: EDIFACT is flexible and subset-heavy — every industry has its own message implementation guideline. EN 16931 is a fixed semantic core with defined business terms (BT-) and rules (BR-).
  • Transport: EDIFACT typically rides over AS2/VAN/OFTP; Peppol uses the four-corner network with Access Points and SMP lookups.
  • Validation: EDIFACT is validated against a partner-specific guideline; Peppol is validated against XSD plus published Schematron rules everyone shares.

How EDIFACT INVOIC maps to UBL

The good news: the core commercial data is the same, so most fields map cleanly. A rough correspondence for an INVOIC:

  • BGM (document/message name + number) → cbc:ID + cbc:InvoiceTypeCode
  • DTM (dates) → cbc:IssueDate, cbc:DueDate, invoice period
  • NAD (parties: SU supplier, BY buyer) → cac:AccountingSupplierParty / cac:AccountingCustomerParty
  • RFF (references: buyer order, contract) → cac:OrderReference, cac:ContractDocumentReference
  • LIN / IMD / QTY (line, description, quantity) → cac:InvoiceLine + cac:Item + cbc:InvoicedQuantity
  • MOA (amounts) → cac:LegalMonetaryTotal, line amounts
  • TAX / MOA (VAT) → cac:TaxTotal + cac:TaxSubtotal + cac:TaxCategory

The hard part is not the mapping table — it is the EN 16931 business rules that EDIFACT never enforced.

The conversion pitfalls

  • VAT breakdown rules: EN 16931 requires a tax subtotal per category/rate that sums correctly (BR-CO rules). EDIFACT often carried only line-level tax — you must aggregate.
  • Mandatory business terms: fields that were optional in your INVOIC guideline (e.g. buyer VAT ID, a proper payment means code) may be required by EN 16931.
  • Code lists: EDIFACT qualifiers must be translated to EN 16931 code lists (UNCL1001 document types, UNCL5305 VAT categories, UNCL4461 payment means).
  • Rounding: totals must reconcile to the cent under the rules — half-built converters fail BR-CO-15 on rounding.
  • Decimals and units: unit codes map to UN/ECE Rec 20; quantities and prices need the right precision.

This is exactly why a validated converter matters: it is not enough to reshape XML, the output has to pass Schematron.

Convert INVOIC to Peppol BIS 3.0 in one call

You post your EDIFACT INVOIC and choose the target profile. MyInvoice parses the segments, applies the EN 16931 mapping, aggregates VAT, and returns UBL validated against XSD and the Peppol Schematron — so what comes back is ready for your Access Point:

curl -X POST https://api.myinvoice.llc/v1/convert \
  -H "X-API-Key: ek_live_..." \
  -F "[email protected]" \
  -F "format=edifact" \
  -F "profile=peppol-bis-3"

Need the German flavour instead? Swap the profile to XRechnung — same INVOIC input, EN 16931 output for the German mandate:

curl -X POST https://api.myinvoice.llc/v1/convert \
  -H "X-API-Key: ek_live_..." \
  -F "[email protected]" \
  -F "format=edifact" \
  -F "profile=xrechnung-3"
Try an EDIFACT conversion in your browser

A pragmatic migration path

  • Keep EDIFACT with partners who require it — don't rip out working EDI.
  • Add a conversion step that emits EN 16931 (Peppol/XRechnung) for compliance and for partners who moved.
  • Validate every output against Schematron before it leaves — catch BR-CO errors early.
  • Run both in parallel during the transition; retire EDIFACT lanes only when each partner is ready.

Frequently asked questions

Do I have to abandon EDIFACT? No. EDIFACT stays valid between partners who agree to use it. The mandate requires that the compliant invoice also exists as EN 16931 — you convert, you don't discard.

Can I go the other way, Peppol back to EDIFACT? Reading incoming Peppol/CII into structured data your systems can post is part of the same problem, and yes — normalising inbound European e-invoices is supported.

Where MyInvoice fits in

MyInvoice sits between your EDI stack and the mandates: send EDIFACT INVOIC, CSV, Excel, UBL or CII, get validated Peppol BIS 3.0, XRechnung, Factur-X or EHF back — VAT aggregated, code lists translated, Schematron-checked. One API to bridge legacy EDI and EN 16931 without rebuilding either side.

Read the API docs