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.
| Term | Meaning | UBL element |
|---|---|---|
| BT-128 | Invoice line object identifier | cac:InvoiceLine/cac:DocumentReference/cbc:ID (cac:CreditNoteLine/cac:DocumentReference/cbc:ID in a credit note) |
| - | Document type code of a line document reference | cac: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
130that has to accompany it. - A document type code meant for document-level references is copied onto the line reference.
How to fix it
- 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.
- For an invoiced object, write
130incbc:DocumentTypeCodedirectly aftercbc:ID, and addschemeIDto the identifier if the object belongs to a known identification scheme. - For any other document, remove the line reference and refer to the document at document level:
cac:DespatchDocumentReferencefor a despatch advice, orcac:AdditionalDocumentReferencefor a supporting document, with the file attached there if needed. - Keep a single
cac:DocumentReferenceper 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
- The failing invoice reports PEPPOL-EN16931-R101. The corrected document passes every layer with no findings.Download the failing XMLDownload the corrected XML
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
InvoiceandCreditNote. When tried, a credit note line with the same untyped reference reported this rule, and passed once130was 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:DespatchDocumentReferencepassed 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 addedUBL-CR-544beside this rule.
Related rules
- PEPPOL-EN16931-R100 allows no more than one document reference on a line
- BR-CL-07 checks the scheme identifier of an invoiced object reference
- UBL-DT-07 requires a file name on an attachment, including one moved from a line to a document-level reference
- PEPPOL-EN16931-R111 checks the line period that often accompanies a meter or subscription line
- Browse every rule in the reference
- Background: How Peppol invoice validation actually works
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.

