Skip to content

Ironfang Finance - Rule reference

PEPPOL-EN16931-R101: Use a line document reference only for the invoiced object, with type code 130

A cac:DocumentReference on an invoice line must be the invoiced object, with cbc:DocumentTypeCode 130. Other documents belong at document level.

Peppol BIS BillingFatal: the document is invalidLines and pricesProcess and references

On this page

The short answer

PEPPOL-EN16931-R101 fails when a line carries a cac:DocumentReference and none of its references has cbc:DocumentTypeCode 130. In the recorded example the line identifies meter METER-0042 but gives no type code. If the reference is the object being invoiced, such as a meter, a subscription or a vehicle, add <cbc:DocumentTypeCode>130</cbc:DocumentTypeCode> after its cbc:ID.

If it is some other document, such as a delivery note or a timesheet, it has no place on the line. Refer to it at document level instead, for example as a despatch advice reference or a supporting document.

What the rule checks

The rule runs on each cac:InvoiceLine and cac:CreditNoteLine. A line with no cac:DocumentReference passes; a line with one passes only if its cbc:DocumentTypeCode is exactly 130.

Any other code fails, and so does a padded one. When tried, 916, 50 and 130 with a leading space each reported this rule; an empty code reported it together with PEPPOL-EN16931-R008.

With several references on one line, one of them having 130 is enough for this rule. When tried, a line with the meter reference and a second reference without a type code passed it, and was reported instead by PEPPOL-EN16931-R100 and UBL-SR-52, which allow one reference per line.

A scheme on the identifier does not stand in for the type code. When tried, adding a schemeID attribute to the cbc:ID of the untyped reference still reported this rule.

TermMeaningUBL element
BT-128Invoice line object identifiercac:InvoiceLine/cac:DocumentReference/cbc:ID (cac:CreditNoteLine/cac:DocumentReference/cbc:ID in a credit note)
-Document type code of a line document referencecac:InvoiceLine/cac:DocumentReference/cbc:DocumentTypeCode

How an integration ends up here

Possible causes, from the shape of the rule rather than from measured usage:

  • The line reference is used for the delivery note or timesheet behind the line, because it is the only reference element a line offers.
  • The mapping fills the object identifier but not the fixed code 130 that has to accompany it.
  • A document type code meant for document-level references is copied onto the line reference.

How to fix it

  1. Ask what the line reference identifies. An invoiced object is something the line is billed for and the buyer keeps track of, such as a meter, a subscription or a vehicle.
  2. For an invoiced object, write 130 in cbc:DocumentTypeCode directly after cbc:ID, and add schemeID to the identifier if the object belongs to a known identification scheme.
  3. For any other document, remove the line reference and refer to the document at document level: cac:DespatchDocumentReference for a despatch advice, or cac:AdditionalDocumentReference for a supporting document, with the file attached there if needed.
  4. Keep a single cac:DocumentReference per line.

Validate your corrected invoice

Before and after

These are fragments, not complete documents. The complete synthetic documents they come from are linked below.

Fragment of the failing invoice: the line names meter METER-0042 without a document type code

<cac:InvoiceLine>
  <cbc:ID>1</cbc:ID>
  <cbc:InvoicedQuantity unitCode="C62">2</cbc:InvoicedQuantity>
  <cbc:LineExtensionAmount currencyID="GBP">25.00</cbc:LineExtensionAmount>
  <cac:DocumentReference>
    <cbc:ID>METER-0042</cbc:ID>
  </cac:DocumentReference>
  <!-- item and price omitted from this fragment -->
</cac:InvoiceLine>

Fragment of the corrected invoice: the same reference typed as the invoiced object, code 130

<cac:InvoiceLine>
  <cbc:ID>1</cbc:ID>
  <cbc:InvoicedQuantity unitCode="C62">2</cbc:InvoicedQuantity>
  <cbc:LineExtensionAmount currencyID="GBP">25.00</cbc:LineExtensionAmount>
  <cac:DocumentReference>
    <cbc:ID>METER-0042</cbc:ID>
    <cbc:DocumentTypeCode>130</cbc:DocumentTypeCode>
  </cac:DocumentReference>
  <!-- item and price omitted from this fragment -->
</cac:InvoiceLine>

The corrected invoice adds <cbc:DocumentTypeCode>130</cbc:DocumentTypeCode> to the line reference for METER-0042; the failing invoice has the identifier alone. Only PEPPOL-EN16931-R101 is reported, at the line, and the EN 16931 layer passes: the schema accepts a document reference without a type code, and no EN 16931 rule asks for one on a line.

What the validator reported

Recorded on phive 12.1.0 / phive-rules-peppol 4.5.6 / Saxon-HE 12.10, the engine behind the free validator, using synthetic data. A recorded result is regression evidence for these documents; it is not a certification.

Where it applies

  • Applies to Invoice and CreditNote. When tried, a credit note line with the same untyped reference reported this rule, and passed once 130 was added.
  • A Peppol BIS rule, reported in the Peppol layer only.
  • References at document level are not affected. When tried, a delivery note given as cac:DespatchDocumentReference passed every layer.
  • Other children of a line reference bring UBL warnings. When tried, a description on the typed meter reference added the warning UBL-CR-543, and a PDF attached to an untyped one added UBL-CR-544 beside this rule.

Scope and source

Written for Peppol BIS Billing 3.0.21 (May 2026), EN 16931 1.3.16, as applied to UBL 2.1 Invoice and CreditNote documents. Other profiles, syntaxes and releases can define this identifier differently. Guidance version 2026-09-28.1: source checked 2026-09-28, explanation last updated 2026-09-28.

The official definition of PEPPOL-EN16931-R101 carries the normative wording and test. This page is our explanation of it, not a copy.

Guidance does not change the engine verdict. Fixing this finding does not mean the document passes every layer, and validation does not certify legal or tax compliance or transmit a document over Peppol.