insonl
← journal

Validate Peppol Invoices Before Importing Them Into Your ERP

date
20 November 2026
by
Insonl
read
7 min read

Receiving a Peppol XML file from an Access Point does not mean it is ready for ERP import. Well-formed XML can still break UBL 2.1 element order, fail a Peppol Schematron rule, carry a VAT rounding drift that Schematron permits, or reference an item code your ERP cannot resolve.

Running Peppol invoice validation before ERP import separates supplier compliance defects from internal master-data gaps before an invoice reaches duplicate supplier invoice detection or three-way invoice matching.

This guide maps four validation gates across Peppol BIS Billing 3.0 and ERP intake (using Microsoft Dynamics 365 Business Central documentation as one third-party ERP example), tests four failures on an illustrative excerpt, and traces the path to a valid unposted ERP draft.

The four validation gates before ERP import

Peppol BIS Billing 3.0 stages compliance checks against published validation artefacts; ERP staging runs after receipt:

Gate Artefact or control What it catches Proposed intake policy
1. Envelope & UBL 2.1 XSD UBL-Invoice-2.1.xsd / UBL-CreditNote-2.1.xsd, PeppolBIS-Envelope-Rules.sch Malformed XML, wrong element order, missing UBL elements, invalid types, SBDH vs. EndpointID mismatch Reject before ERP import
2. EN 16931 rules CEN-EN16931-UBL.sch (BR-*, BR-CO-*, BR-DEC-*, BR-S-*) Missing core terms, bad code lists, >2-decimal amounts, broken totals, VAT breakdown errors Reject (fatal) to supplier
3. Peppol BIS 3.0 rules PEPPOL-EN16931-UBL.sch (PEPPOL-EN16931-*, PEPPOL-COMMON-*, country rules) Bad CustomizationID / ProfileID, missing buyer/PO ref, empty tags, bad dates, currency mix, line math Reject (fatal); accept & log warning
4. ERP pre-import & draft Post-receipt ERP import rules (e.g., Business Central E-Document Services) Unknown vendor, unmapped item/UOM/G/L line, missing PO link, VAT or totals mismatch Quarantine in ERP staging; keep compliant XML

Three details in Gates 1–3 drive integration design:

  • Schema and enveloping. Per section 14 of Peppol BIS Billing 3.0, invoices use UBL-Invoice-2.1.xsd (urn:oasis:names:specification:ubl:schema:xsd:Invoice-2) and credit notes use UBL-CreditNote-2.1.xsd (urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2). Under BIS compliance, an enveloped SBDH Sender/Identifier and Receiver/Identifier must match the payload’s Party/EndpointID values including schemeID (for example, 0088:7315458756324). Running PeppolBIS-Envelope-Rules.sch is optional, but conformance is mandatory.
  • Fatal errors vs. warnings. Under BIS compliance, compliance is evaluated against the current validation artefacts: a message with no fatal errors—including warnings only—is compliant. Senders must not send non-compliant messages; receivers may reject non-compliant messages and must not reject receipt of compliant messages.
  • Built-in Schematron tolerances. Arithmetic rules enforce different bounds:
    • BR-CO-10, BR-CO-13, BR-CO-15, and BR-CO-16 check numeric equality under each rule’s rounding logic (BR-CO-10 rounds the sum of line net amounts; BR-CO-13 applies document charges and allowances and rounds when either is present; BR-CO-15 requires one invoice-currency VAT total and rounds its sum with TaxExclusiveAmount; BR-CO-16 handles prepayments and payable rounding by XPath branch).
    • PEPPOL-EN16931-R120 checks line net amount (quantity * (net price / base quantity) + line charges - line allowances) with a difference up to and including 0.02.
    • BR-S-08 checks a difference strictly below 1 on each standard-rated taxable base by rate; BR-S-09 applies the same strict bound comparing absolute reported tax to the two-decimal calculation on absolute taxable base. A 0.40 VAT drift can pass if dependent totals reconcile and other rules pass—yet fail your ERP’s tax check.

Illustrative UBL excerpt: walking through four failures

(Illustrative UBL excerpt—not a real company or an Insonl client. It omits both parties’ postal addresses and legal names, plus the seller tax identification required for a standard-rated invoice—under BR-S-02, a seller VAT ID, seller tax registration ID, or seller tax representative VAT ID.)

<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
         xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
         xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
  <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>
  <cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
  <cbc:ID>INV-2026-0418</cbc:ID>
  <cbc:IssueDate>2026-11-18</cbc:IssueDate>
  <cbc:DueDate>2026-12-18</cbc:DueDate>
  <cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
  <cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
  <cac:OrderReference><cbc:ID>PO-88412</cbc:ID></cac:OrderReference>
  <cac:AccountingSupplierParty>
    <cac:Party><cbc:EndpointID schemeID="0088">9900000000011</cbc:EndpointID></cac:Party>
  </cac:AccountingSupplierParty>
  <cac:AccountingCustomerParty>
    <cac:Party><cbc:EndpointID schemeID="0088">9900000000028</cbc:EndpointID></cac:Party>
  </cac:AccountingCustomerParty>
  <cac:TaxTotal>
    <cbc:TaxAmount currencyID="EUR">294.00</cbc:TaxAmount>
    <cac:TaxSubtotal>
      <cbc:TaxableAmount currencyID="EUR">1400.00</cbc:TaxableAmount>
      <cbc:TaxAmount currencyID="EUR">294.00</cbc:TaxAmount>
      <cac:TaxCategory>
        <cbc:ID>S</cbc:ID><cbc:Percent>21</cbc:Percent>
        <cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme>
      </cac:TaxCategory>
    </cac:TaxSubtotal>
  </cac:TaxTotal>
  <cac:LegalMonetaryTotal>
    <cbc:LineExtensionAmount currencyID="EUR">1400.00</cbc:LineExtensionAmount>
    <cbc:TaxExclusiveAmount currencyID="EUR">1400.00</cbc:TaxExclusiveAmount>
    <cbc:TaxInclusiveAmount currencyID="EUR">1694.00</cbc:TaxInclusiveAmount>
    <cbc:PayableAmount currencyID="EUR">1694.00</cbc:PayableAmount>
  </cac:LegalMonetaryTotal>
  <cac:InvoiceLine>
    <cbc:ID>1</cbc:ID>
    <cbc:InvoicedQuantity unitCode="C62">20</cbc:InvoicedQuantity>
    <cbc:LineExtensionAmount currencyID="EUR">900.00</cbc:LineExtensionAmount>
    <cac:Item>
      <cbc:Name>M8 Stainless Hex Bolt Pack</cbc:Name>
      <cac:SellersItemIdentification><cbc:ID>EX-BOLT-M8</cbc:ID></cac:SellersItemIdentification>
      <cac:ClassifiedTaxCategory>
        <cbc:ID>S</cbc:ID><cbc:Percent>21</cbc:Percent>
        <cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme>
      </cac:ClassifiedTaxCategory>
    </cac:Item>
    <cac:Price>
      <cbc:PriceAmount currencyID="EUR">45.00</cbc:PriceAmount>
      <cbc:BaseQuantity unitCode="C62">1</cbc:BaseQuantity>
    </cac:Price>
  </cac:InvoiceLine>
  <cac:InvoiceLine>
    <cbc:ID>2</cbc:ID>
    <cbc:InvoicedQuantity unitCode="HUR">4</cbc:InvoicedQuantity>
    <cbc:LineExtensionAmount currencyID="EUR">500.00</cbc:LineExtensionAmount>
    <cac:Item>
      <cbc:Name>On-site calibration service</cbc:Name>
      <cac:ClassifiedTaxCategory>
        <cbc:ID>S</cbc:ID><cbc:Percent>21</cbc:Percent>
        <cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme>
      </cac:ClassifiedTaxCategory>
    </cac:Item>
    <cac:Price>
      <cbc:PriceAmount currencyID="EUR">125.00</cbc:PriceAmount>
      <cbc:BaseQuantity unitCode="HUR">1</cbc:BaseQuantity>
    </cac:Price>
  </cac:InvoiceLine>
</Invoice>

Four independent changes to an otherwise compliant invoice illustrate each gate and owner:

Gate Change on INV-2026-0418 Rule triggered Cause Proposed action and owner
1. XSD <cbc:DocumentCurrencyCode> before <cbc:IssueDate> UBL-Invoice-2.1.xsd sequence error Serializer writes valid tags out of UBL 2.1 order Reject pre-Schematron; return line/element error
2. EN 16931 Line 1 emits 900.005, or both TaxInclusiveAmount and PayableAmount are 1694.01 when the expected total is 1694.00 (1400.00 + 294.00) BR-DEC-23 or BR-CO-15 (fatal) Seller rounds at display instead of two-decimal XML values Reject to supplier; never rewrite legal amounts
3. Peppol BIS Exporter leaves <cbc:Note/> in sequence, or omits both BuyerReference and OrderReference/cbc:ID PEPPOL-EN16931-R008 or PEPPOL-EN16931-R003 (fatal) An empty cbc:Note in position passes UBL XSD while R008 rejects childless whitespace-only elements; missing ref breaks routing Reject to supplier with rule ID and XPath
4. ERP import Valid XML, but EX-BOLT-M8 lacks an item ref and Line 2 lacks a G/L mapping (or BuyerReference replaces OrderReference/cbc:ID on a PO vendor) ERP line-resolution or PO-link error Payload is BIS-compliant; gap is in buyer ERP master data Quarantine in ERP staging -> AP Ops maps line or links PO

Notice the Gate 3–4 boundary: <cbc:BuyerReference>CC-400</cbc:BuyerReference> without <cac:OrderReference><cbc:ID> satisfies PEPPOL-EN16931-R003; when all other applicable checks pass, the invoice is BIS-compliant. Rejecting receipt violates OpenPeppol’s receiver rule; ERP staging lets AP link the PO cleanly.

The path from validated XML to an unposted ERP draft

After receipt clears Gates 1–3 with zero fatal errors, ERP intake controls draft creation. Microsoft Dynamics 365 Business Central documentation provides one documented example of ERP intake controls that custom ERP pipelines replicate:

  1. Pre-draft import switches. In Business Central’s e-document setup, E-Document Services supports PEPPOL BIS 3 with Importing FastTab toggles: Validate Receiving Company, Resolve Unit Of Measure, Lookup Item Reference, Lookup Item GTIN, Lookup Account Mapping, Validate Line Discount, Apply Invoice Discount, and Verify Totals. Setting Automatic processing to No holds e-documents for review via View extracted data (Received purchase document data).
  2. Deterministic vendor lookup. Per Business Central’s e-documents purchase guide, matching runs in order: GLN, VAT Registration No., Participation Identifier (via E-Document Service Participation on the vendor card), then Name and Address.
  3. Line resolution in staging. Unrecognized lines are the most common incoming e-document error. Line 1 (EX-BOLT-M8) resolves once Item Reference No. maps the supplier’s code; Line 2 (On-site calibration service) resolves via Map Text to Account (Mapping Text up to 50 characters, Vendor No., and Debit Acc. No.—leaving Credit Acc. No., Bal. Source Type, and Bal. Source No. unused).
  4. Purchase-invoice draft vs. linked-PO workflow. In the purchase-invoice workflow, clearing staging errors and selecting Create Document produces an unposted purchase invoice and attaches any embedded Peppol PDF (Recreate Document rebuilds an accidentally deleted unposted invoice or credit memo, not purchase orders). When Receive E-Document To is Purchase Order, Business Central links an existing PO when the file includes the PO number (Document Status = In Progress, E-Document Status = Order linked), and line matching updates Qty. to Invoice on the order before posting it. If a PO exists but the file omits the PO number during automatic job-queue import, Document Status = Error and E-Document Status = Imported document processing error; AP uses Update Purchase Order Link to select the vendor’s order. In multi-country setups, PO line matching cannot be used when incoming and company VAT percentages differ.
  5. Downstream and pre-posting checks. With Ext. Doc. No. Mandatory enabled on Purchases & Payables Setup (per Business Central’s purchase invoice guide), posting requires Vendor Invoice No. (or Vendor Cr. Memo No. for credit memos). Run duplicate supplier invoice detection and three-way invoice matching. Check rounded amounts on the Statistics page, or choose Release to update the displayed totals with rounding. Use Preview Posting to inspect expected ledger entries before posting.

Where AI fits beside deterministic Peppol validation

Keep every validation gate deterministic. XML parsing, XSD checks, CEN-EN16931-UBL.sch, PEPPOL-EN16931-UBL.sch, currency checks (PEPPOL-EN16931-R051, requiring all currencyID attributes to match the invoice currency except the invoice total VAT amount in accounting currency, BT-111), totals checks, and posting stops are exact rules—never ask an LLM whether an XML invoice is compliant.

AI fits only on unstructured edges around Gate 4, consistent with our breakdown of AI document and order processing operations:

  • Mapping suggestions for uncoded lines. Proposing a G/L Debit Acc. No. or item match for descriptions like On-site calibration service, held for AP approval before saving a persistent mapping.
  • Embedded PDF context. Extracting project, cost-center, or service-period detail from PDFs at cac:AdditionalDocumentReference/cac:Attachment/cbc:EmbeddedDocumentBinaryObject when summary lines omit coding context.
  • Diagnostic summaries. Translating Schematron rule IDs and XPath pointers into plain rejection notices while keeping the raw rule ID intact.

Audit your e-invoice pipeline before adding AI

Insonl is a Ho Chi Minh City engineering studio building ERP systems and operational AI. If incoming Peppol XML files are stalling in manual review, failing ERP imports, or mixing with PDFs in one AP queue, start with our free AI workflow audit.

The audit is free. Follow-on work is optional; Insonl charges only for work you choose afterward.

Sources