E-Invoice Validation Rules Reference

Look up any e-invoice validation rule by its ID — what it checks, the technical test, which formats enforce it and how to fix a violation. Covers the EN 16931 European core, PEPPOL BIS 3.0, XRechnung and national CIUS profiles, generated from the same schematron our validators run.

240documented rules
220fatal (blocking)
13rule families

Showing240240rules

EN 16931 — core rules (59)

BR-01

fatal

An Invoice shall have a Specification identifier (BT-24).

EN 16931CIIUBLBT-24
Technical test (XPath)
normalize-space(rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID) != ''
Validate against this rule →

BR-02

fatal

The invoice number is missing — every invoice needs its own number.

An Invoice shall have an Invoice number (BT-1).

EN 16931CIIUBLBT-1
Technical test (XPath)
normalize-space(rsm:ExchangedDocument/ram:ID) != ''
Validate against this rule →

BR-03

fatal

The invoice issue date is missing.

An Invoice shall have an Invoice issue date (BT-2).

EN 16931CIIUBLBT-2
Technical test (XPath)
normalize-space(rsm:ExchangedDocument/ram:IssueDateTime/udt:DateTimeString[@format='102']) != ''
Validate against this rule →

BR-04

fatal

An Invoice shall have an Invoice type code (BT-3).

EN 16931CIIUBLBT-3
Technical test (XPath)
normalize-space(rsm:ExchangedDocument/ram:TypeCode) != ''
Validate against this rule →

BR-05

fatal

An Invoice shall have an Invoice currency code (BT-5).

EN 16931CIIUBLBT-5
Technical test (XPath)
normalize-space(rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode) != ''
Validate against this rule →

BR-06

fatal

The seller's name is missing.

An Invoice shall contain the Seller name (BT-27).

EN 16931CIIUBLBT-27
Technical test (XPath)
normalize-space(rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:Name) != ''
Validate against this rule →

BR-07

fatal

The buyer's name is missing.

An Invoice shall contain the Buyer name (BT-44).

EN 16931CIIUBLBT-44
Technical test (XPath)
normalize-space(rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:Name) != ''
Validate against this rule →

BR-08

fatal

An Invoice shall contain the Seller postal address.

EN 16931CIIUBL
Technical test (XPath)
rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress
Validate against this rule →

BR-09

fatal

The Seller postal address (BG-5) shall contain a Seller country code (BT-40).

EN 16931CIIUBLBG-5BT-40
Technical test (XPath)
normalize-space(rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:CountryID) != ''
Validate against this rule →

BR-10

fatal

An Invoice shall contain the Buyer postal address (BG-8).

EN 16931CIIUBLBG-8
Technical test (XPath)
rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress
Validate against this rule →

BR-11

fatal

The Buyer postal address shall contain a Buyer country code (BT-55).

EN 16931CIIUBLBT-55
Technical test (XPath)
normalize-space(rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:CountryID) != ''
Validate against this rule →

BR-16

fatal

The invoice has no lines — add at least one invoice line.

An Invoice shall have at least one Invoice line (BG-25).

EN 16931CIIUBLBG-25
Technical test (XPath)
//ram:IncludedSupplyChainTradeLineItem
Validate against this rule →

BR-17

fatal

The Payee name (BT-59) shall be provided in the Invoice, if the Payee (BG-10) is different from the Seller (BG-4).

EN 16931CIIUBLBT-59BG-10BG-4
Technical test (XPath)
(ram:Name) and (not(ram:Name = ../../ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:Name) and not(ram:ID = ../../ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:ID) and not(ram:SpecifiedLegalOrganization/ram:ID = ../../ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedLegalOrganization/ram:ID))
Validate against this rule →

BR-18

fatal

The Seller tax representative name (BT-62) shall be provided in the Invoice, if the Seller (BG-4) has a Seller tax representative party (BG-11).

EN 16931CIIUBLBT-62BG-4BG-11
Technical test (XPath)
(ram:Name)
Validate against this rule →

BR-19

fatal

The Seller tax representative postal address (BG-12) shall be provided in the Invoice, if the Seller (BG-4) has a Seller tax representative party (BG-11).

EN 16931CIIUBLBG-12BG-4BG-11
Technical test (XPath)
(ram:PostalTradeAddress)
Validate against this rule →

BR-20

fatal

The Seller tax representative postal address (BG-12) shall contain a Tax representative country code (BT-69), if the Seller (BG-4) has a Seller tax representative party (BG-11).

EN 16931CIIUBLBG-12BT-69BG-4BG-11
Technical test (XPath)
(ram:PostalTradeAddress/ram:CountryID)
Validate against this rule →

BR-21

fatal

Each Invoice line (BG-25) shall have an Invoice line identifier (BT-126).

EN 16931CIIUBLBG-25BT-126
Technical test (XPath)
normalize-space(ram:AssociatedDocumentLineDocument/ram:LineID) != ''
Validate against this rule →

BR-22

fatal

Each Invoice line (BG-25) shall have an Invoiced quantity (BT-129).

EN 16931CIIUBLBG-25BT-129
Technical test (XPath)
(ram:SpecifiedLineTradeDelivery/ram:BilledQuantity)
Validate against this rule →

BR-23

fatal

An Invoice line (BG-25) shall have an Invoiced quantity unit of measure code (BT-130).

EN 16931CIIUBLBG-25BT-130
Technical test (XPath)
(ram:SpecifiedLineTradeDelivery/ram:BilledQuantity/@unitCode)
Validate against this rule →

BR-24

fatal

Each Invoice line (BG-25) shall have an Invoice line net amount (BT-131).

EN 16931CIIUBLBG-25BT-131
Technical test (XPath)
(ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)
Validate against this rule →

BR-25

fatal

An invoice line has no item name — say on every line what you are invoicing.

Each Invoice line (BG-25) shall contain the Item name (BT-153).

EN 16931CIIUBLBG-25BT-153
Technical test (XPath)
normalize-space(ram:SpecifiedTradeProduct/ram:Name) != ''
Validate against this rule →

BR-26

fatal

An invoice line has no net price (the price per unit without VAT).

Each Invoice line (BG-25) shall contain the Item net price (BT-146).

EN 16931CIIUBLBG-25BT-146
Technical test (XPath)
(ram:SpecifiedLineTradeAgreement/ram:NetPriceProductTradePrice/ram:ChargeAmount)
Validate against this rule →

BR-27

fatal

An item price is negative — enter prices as positive numbers and use an allowance or a credit note for reductions.

The Item net price (BT-146) shall NOT be negative.

EN 16931CIIUBLBT-146
Validate against this rule →

BR-29

fatal

If both Invoicing period start date (BT-73) and Invoicing period end date (BT-74) are given then the Invoicing period end date (BT-74) shall be later or equal to the Invoicing period start date (BT-73).

EN 16931CIIUBLBT-73BT-74
Validate against this rule →

BR-30

fatal

If both Invoice line period start date (BT-134) and Invoice line period end date (BT-135) are given then the Invoice line period end date (BT-135) shall be later or equal to the Invoice line period start date (BT-134).

EN 16931CIIUBLBT-134BT-135
Validate against this rule →

BR-31

fatal

Each Document level allowance (BG-20) shall have a Document level allowance amount (BT-92).

EN 16931CIIUBLBG-20BT-92
Technical test (XPath)
(../ram:ActualAmount)
Validate against this rule →

BR-32

fatal

Each Document level allowance (BG-20) shall have a Document level allowance VAT category code (BT-95).

EN 16931CIIUBLBG-20BT-95
Technical test (XPath)
(../ram:CategoryTradeTax[upper-case(ram:TypeCode) = 'VAT']/ram:CategoryCode)
Validate against this rule →

BR-33

fatal

Each Document level allowance (BG-20) shall have a Document level allowance reason (BT-97) or a Document level allowance reason code (BT-98).

EN 16931CIIUBLBG-20BT-97BT-98
Technical test (XPath)
(../ram:Reason) or (../ram:ReasonCode)
Validate against this rule →

BR-36

fatal

Each Document level charge (BG-21) shall have a Document level charge amount (BT-99).

EN 16931CIIUBLBG-21BT-99
Technical test (XPath)
(../ram:ActualAmount)
Validate against this rule →

BR-37

fatal

Each Document level charge (BG-21) shall have a Document level charge VAT category code (BT-102).

EN 16931CIIUBLBG-21BT-102
Technical test (XPath)
(../ram:CategoryTradeTax[upper-case(ram:TypeCode) = 'VAT']/ram:CategoryCode)
Validate against this rule →

BR-38

fatal

Each Document level charge (BG-21) shall have a Document level charge reason (BT-104) or a Document level charge reason code (BT-105).

EN 16931CIIUBLBG-21BT-104BT-105
Technical test (XPath)
(../ram:Reason) or (../ram:ReasonCode)
Validate against this rule →

BR-41

fatal

Each Invoice line allowance (BG-27) shall have an Invoice line allowance amount (BT-136).

EN 16931CIIUBLBG-27BT-136
Technical test (XPath)
(../ram:ActualAmount)
Validate against this rule →

BR-42

fatal

Each Invoice line allowance (BG-27) shall have an Invoice line allowance reason (BT-139) or an Invoice line allowance reason code (BT-140).

EN 16931CIIUBLBG-27BT-139BT-140
Technical test (XPath)
(../ram:Reason) or (../ram:ReasonCode)
Validate against this rule →

BR-43

fatal

Each Invoice line charge (BG-28) shall have an Invoice line charge amount (BT-141).

EN 16931CIIUBLBG-28BT-141
Technical test (XPath)
(../ram:ActualAmount)
Validate against this rule →

BR-44

fatal

Each Invoice line charge shall have an Invoice line charge reason or an invoice line allowance reason code.

EN 16931CIIUBL
Technical test (XPath)
(../ram:Reason) or (../ram:ReasonCode)
Validate against this rule →

BR-47

fatal

Each VAT breakdown (BG-23) shall be defined through a VAT category code (BT-118).

EN 16931CIIUBLBG-23BT-118
Technical test (XPath)
(.[upper-case(ram:TypeCode) = 'VAT']/ram:CategoryCode)
Validate against this rule →

BR-48

fatal

Each VAT breakdown (BG-23) shall have a VAT category rate (BT-119), except if the Invoice is not subject to VAT.

EN 16931CIIUBLBG-23BT-119
Technical test (XPath)
(.[upper-case(ram:TypeCode) = 'VAT']/ram:RateApplicablePercent) or (.[upper-case(ram:TypeCode) = 'VAT']/ram:CategoryCode = 'O')
Validate against this rule →

BR-50

fatal

Credit transfer details are given, but the account number (IBAN) is missing.

A Payment account identifier (BT-84) shall be present if Credit transfer (BG-17) information is provided in the Invoice.

EN 16931CIIUBLBT-84BG-17
Technical test (XPath)
(ram:IBANID) or (ram:ProprietaryID)
Validate against this rule →

BR-51

fatal

In accordance with card payments security standards an invoice should never include a full card primary account number (BT-87).

EN 16931CIIUBLBT-87
Technical test (XPath)
string-length(ram:ID)<=10
Validate against this rule →

BR-52

fatal

Each Additional supporting document (BG-24) shall contain a Supporting document reference (BT-122).

EN 16931CIIUBLBG-24BT-122
Technical test (XPath)
normalize-space(ram:IssuerAssignedID) != ''
Validate against this rule →

BR-53

fatal

If the VAT accounting currency code (BT-6) is present, then the Invoice total VAT amount in accounting currency (BT-111) shall be provided.

EN 16931CIIUBLBT-6BT-111
Technical test (XPath)
not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode) or (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode and (ram:TaxTotalAmount/@currencyID = /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode) and not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode = /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode))
Validate against this rule →

BR-54

fatal

Each Item attribute (BG-32) shall contain an Item attribute name (BT-160) and an Item attribute value (BT-161).

EN 16931CIIUBLBG-32BT-160BT-161
Technical test (XPath)
(ram:Description) and (ram:Value)
Validate against this rule →

BR-55

fatal

Each Preceding Invoice reference (BG-3) shall contain a Preceding Invoice reference (BT-25).

EN 16931CIIUBLBG-3BT-25
Technical test (XPath)
normalize-space(ram:IssuerAssignedID) != ''
Validate against this rule →

BR-56

fatal

Each Seller tax representative party (BG-11) shall have a Seller tax representative VAT identifier (BT-63).

EN 16931CIIUBLBG-11BT-63
Technical test (XPath)
normalize-space(ram:SpecifiedTaxRegistration/ram:ID[@schemeID='VA']) != ''
Validate against this rule →

BR-57

fatal

Each Deliver to address (BG-15) shall contain a Deliver to country code (BT-80).

EN 16931CIIUBLBG-15BT-80
Technical test (XPath)
(ram:ShipToTradeParty/ram:PostalTradeAddress and normalize-space(ram:ShipToTradeParty/ram:PostalTradeAddress/ram:CountryID) != '') or not (ram:ShipToTradeParty/ram:PostalTradeAddress)
Validate against this rule →

BR-61

fatal

The payment method is a credit transfer, so the payee's account number (IBAN) is required.

If the Payment means type code (BT-81) means SEPA credit transfer, Local credit transfer or Non-SEPA international credit transfer, the Payment account identifier (BT-84) shall be present.

EN 16931CIIUBLBT-81BT-84
Technical test (XPath)
(ram:IBANID) or (ram:ProprietaryID)
Validate against this rule →

BR-62

fatal

The seller's electronic address has no scheme — state what kind of identifier it is (for example a VAT number or a GLN).

The Seller electronic address (BT-34) shall have a Scheme identifier.

EN 16931CIIUBLBT-34
Technical test (XPath)
normalize-space(rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:URIUniversalCommunication[1]/ram:URIID/@schemeID) != '' or not (rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:URIUniversalCommunication)
Validate against this rule →

BR-63

fatal

The buyer's electronic address has no scheme — state what kind of identifier it is (for example a VAT number or a GLN).

The Buyer electronic address (BT-49) shall have a Scheme identifier.

EN 16931CIIUBLBT-49
Technical test (XPath)
normalize-space(rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:URIUniversalCommunication[1]/ram:URIID/@schemeID) != '' or not (rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:URIUniversalCommunication)
Validate against this rule →

BR-64

fatal

The Item standard identifier (BT-157) shall have a Scheme identifier.

EN 16931CIIUBLBT-157
Technical test (XPath)
normalize-space(ram:SpecifiedTradeProduct/ram:GlobalID/@schemeID) != '' or not (ram:SpecifiedTradeProduct/ram:GlobalID)
Validate against this rule →

BR-65

fatal

The Item classification identifier (BT-158) shall have a Scheme identifier.

EN 16931CIIUBLBT-158
Technical test (XPath)
normalize-space(ram:ClassCode/@listID) != '' or not (ram:ClassCode)
Validate against this rule →

EN 16931 — calculation rules (18)

BR-CO-03

fatal

Value added tax point date (BT-7) and Value added tax point date code (BT-8) are mutually exclusive.

EN 16931CIIUBLBT-7BT-8
Technical test (XPath)
((//ram:TaxPointDate) and not(//ram:DueDateTypeCode)) or (not (//ram:TaxPointDate) and (//ram:DueDateTypeCode)) or (not (//ram:TaxPointDate) and not (//ram:DueDateTypeCode))
Validate against this rule →

BR-CO-04

fatal

An invoice line has no VAT category — for example S (standard rate), Z (zero rated), E (exempt) or AE (reverse charge).

Each Invoice line (BG-25) shall be categorized with an Invoiced item VAT category code (BT-151).

EN 16931CIIUBLBG-25BT-151
Technical test (XPath)
(ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[upper-case(ram:TypeCode) = 'VAT']/ram:CategoryCode)
Validate against this rule →

BR-CO-05

fatal

Document level allowance reason code (BT-98) and Document level allowance reason (BT-97) shall indicate the same type of allowance.

EN 16931CIIUBLBT-98BT-97
Technical test (XPath)
true()
Validate against this rule →

BR-CO-06

fatal

Document level charge reason code (BT-105) and Document level charge reason (BT-104) shall indicate the same type of charge.

EN 16931CIIUBLBT-105BT-104
Technical test (XPath)
true()
Validate against this rule →

BR-CO-07

fatal

Invoice line allowance reason code (BT-140) and Invoice line allowance reason (BT-139) shall indicate the same type of allowance reason.

EN 16931CIIUBLBT-140BT-139
Technical test (XPath)
true()
Validate against this rule →

BR-CO-08

fatal

Invoice line charge reason code (BT-145) and Invoice line charge reason (BT-144) shall indicate the same type of charge reason.

EN 16931CIIUBLBT-145BT-144
Technical test (XPath)
true()
Validate against this rule →

BR-CO-09

fatal

A VAT number must start with its two-letter country code, for example DE123456789 (Greece uses EL).

The Seller VAT identifier (BT-31), the Seller tax representative VAT identifier (BT-63) and the Buyer VAT identifier (BT-48) shall have a prefix in accordance with ISO code ISO 3166-1 alpha-2 by which the country of issue may be identified. Nevertheless, Greece may use the prefix 'EL'.

EN 16931CIIUBLBT-31BT-63BT-48
Technical test (XPath)
contains(' 1A AD AE AF AG AI AL AM AN AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BL BJ BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH EL ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS XI YE YT ZA ZM ZW ', concat(' ', substring(.,1,2), ' '))
Validate against this rule →

BR-CO-10

fatal

The invoice's sum of line amounts does not equal the line amounts added up — usually a rounding difference or a line changed after the totals.

Sum of Invoice line net amount (BT-106) = Sum of Invoice line net amounts (BT-131).

EN 16931CIIUBLBT-106BT-131
Technical test (XPath)
xs:decimal(ram:LineTotalAmount) = round(xs:decimal(sum(../../ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)) * xs:decimal(100)) div xs:decimal(100)
Validate against this rule →

BR-CO-11

fatal

Sum of allowances on document level (BT-107) = Sum of Document level allowance amounts (BT-92).

EN 16931CIIUBLBT-107BT-92
Technical test (XPath)
(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false()])and not (ram:AllowanceTotalAmount)) or ram:AllowanceTotalAmount = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false()]/ram:ActualAmount)* 10 * 10 ) div 100)
Validate against this rule →

BR-CO-12

fatal

Sum of charges on document level (BT-108) = Sum of Document level charge amounts (BT-99).

EN 16931CIIUBLBT-108BT-99
Technical test (XPath)
(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true()])and not (ram:ChargeTotalAmount)) or ram:ChargeTotalAmount = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true()]/ram:ActualAmount)* 10 * 10 ) div 100)
Validate against this rule →

BR-CO-13

fatal

The total without VAT must equal the sum of the lines, minus document-level allowances, plus document-level charges.

Invoice total amount without VAT (BT-109) = Sum of Invoice line net amounts (BT-131) - Sum of allowances on document level (BT-107) + Sum of charges on document level (BT-108).

EN 16931CIIUBLBT-109BT-131BT-107BT-108
Technical test (XPath)
(xs:decimal(ram:TaxBasisTotalAmount) = round((xs:decimal(ram:LineTotalAmount) - xs:decimal(ram:AllowanceTotalAmount) + xs:decimal(ram:ChargeTotalAmount)) *10 * 10) div 100) or ((xs:decimal(ram:TaxBasisTotalAmount) = round((xs:decimal(ram:LineTotalAmount) - xs:decimal(ram:AllowanceTotalAmount)) *10 * 10) div 100) and not (ram:ChargeTotalAmount)) or ((xs:decimal(ram:TaxBasisTotalAmount) = round((xs:decimal(ram:LineTotalAmount) + xs:decimal(ram:ChargeTotalAmount)) *10 * 10) div 100) and not (ram:AllowanceTotalAmount)) or ((xs:decimal(ram:TaxBasisTotalAmount) = round((xs:decimal(ram:LineTotalAmount)) *10 * 10) div 100) and not (ram:ChargeTotalAmount) and not (ram:AllowanceTotalAmount))
Validate against this rule →

BR-CO-15

fatal

The total with VAT must equal the total without VAT plus the VAT amount.

Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110).

EN 16931CIIUBLBT-112BT-109BT-110
Technical test (XPath)
every $Currency in rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode satisfies ( count ( rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TaxTotalAmount[@currencyID=$Currency] ) eq 1 and (//ram:SpecifiedTradeSettlementHeaderMonetarySummation/xs:decimal(ram:GrandTotalAmount) = round( (//ram:SpecifiedTradeSettlementHeaderMonetarySummation/xs:decimal(ram:TaxBasisTotalAmount) + (//ram:SpecifiedTradeSettlementHeaderMonetarySummation/xs:decimal(ram:TaxTotalAmount[@currencyID=$Currency]))) * 10 * 10) div 100)) or (//ram:SpecifiedTradeSettlementHeaderMonetarySummation/xs:decimal(ram:GrandTotalAmount) = (//ram:SpecifiedTradeSettlementHeaderMonetarySummation/xs:decimal(ram:TaxBasisTotalAmount)))
Validate against this rule →

BR-CO-16

fatal

The amount due must equal the total with VAT, minus any amount already paid, plus the rounding amount.

Amount due for payment (BT-115) = Invoice total amount with VAT (BT-112) - Paid amount (BT-113) + Rounding amount (BT-114).

EN 16931CIIUBLBT-115BT-112BT-113BT-114
Technical test (XPath)
(xs:decimal(ram:DuePayableAmount) = xs:decimal(ram:GrandTotalAmount) - xs:decimal(ram:TotalPrepaidAmount) + xs:decimal(ram:RoundingAmount)) or ((xs:decimal(ram:DuePayableAmount) = xs:decimal(ram:GrandTotalAmount) + xs:decimal(ram:RoundingAmount)) and not (xs:decimal(ram:TotalPrepaidAmount))) or ((xs:decimal(ram:DuePayableAmount) = xs:decimal(ram:GrandTotalAmount) - xs:decimal(ram:TotalPrepaidAmount)) and not (xs:decimal(ram:RoundingAmount))) or ((xs:decimal(ram:DuePayableAmount) = xs:decimal(ram:GrandTotalAmount)) and not (xs:decimal(ram:TotalPrepaidAmount)) and not (xs:decimal(ram:RoundingAmount)))
Validate against this rule →

BR-CO-17

fatal

A VAT amount in the VAT breakdown does not match taxable amount × rate, rounded to two decimals.

VAT category tax amount (BT-117) = VAT category taxable amount (BT-116) x (VAT category rate (BT-119) / 100), rounded to two decimals.

EN 16931CIIUBLBT-117BT-116BT-119
Validate against this rule →

BR-CO-18

fatal

The invoice has no VAT breakdown — at least one VAT group (category, rate, taxable amount, tax) is required, even at 0%.

An Invoice shall at least have one VAT breakdown group (BG-23).

EN 16931CIIUBLBG-23
Technical test (XPath)
//rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax
Validate against this rule →

BR-CO-21

fatal

Each Document level allowance (BG-20) shall contain a Document level allowance reason (BT-97) or a Document level allowance reason code (BT-98), or both.

EN 16931CIIUBLBG-20BT-97BT-98
Technical test (XPath)
(../ram:Reason) or (../ram:ReasonCode)
Validate against this rule →

BR-CO-22

fatal

Each Document level charge (BG-21) shall contain a Document level charge reason (BT-104) or a Document level charge reason code (BT-105), or both.

EN 16931CIIUBLBG-21BT-104BT-105
Technical test (XPath)
(../ram:Reason) or (../ram:ReasonCode)
Validate against this rule →

BR-CO-25

fatal

An amount is due, so the invoice needs either a payment due date or payment terms.

In case the Amount due for payment (BT-115) is positive, either the Payment due date (BT-9) or the Payment terms (BT-20) shall be present.

EN 16931CIIUBLBT-115BT-9BT-20
Validate against this rule →

EN 16931 — VAT category rules (16)

BR-AE-01

fatal

An Invoice that contains an Invoice line, Document level allowance or Document level charge where the VAT category code is "Reverse charge" shall contain in the VAT Breakdown exactly one VAT category code equal with "VAT reverse charge".

EN 16931CIIUBL
Technical test (XPath)
(count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='AE'])=0 and count(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='AE'])=0 and count(//ram:CategoryTradeTax[ram:CategoryCode='AE'])=0) or ( count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='AE'])=1 and (exists(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='AE']) or exists(//ram:CategoryTradeTax[ram:CategoryCode='AE'])))
Validate against this rule →

BR-AE-02

fatal

Reverse charge is used, so both parties must be identified for VAT: the seller's VAT number (or tax registration) and the buyer's VAT number (or legal registration number).

An Invoice that contains an Invoice line where the Invoiced item VAT category code is "Reverse charge" shall contain the Seller VAT Identifier, the Seller Tax registration identifier and/or the Seller tax representative VAT identifier and the Buyer VAT identifier and/or the Buyer legal registration identifier.

EN 16931CIIUBL
Technical test (XPath)
(//ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or //ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and (//ram:BuyerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'] or //ram:BuyerTradeParty/ram:SpecifiedLegalOrganization/ram:ID)
Validate against this rule →

BR-AE-05

fatal

In an Invoice line where the Invoiced item VAT category code is "Reverse charge" the Invoiced item VAT rate shall be 0 (zero).

EN 16931CIIUBL
Technical test (XPath)
ram:RateApplicablePercent = 0
Validate against this rule →

BR-AE-09

fatal

The VAT category tax amount in a VAT breakdown where the VAT category code is "Reverse charge" shall be 0 (zero).

EN 16931CIIUBL
Technical test (XPath)
../ram:CalculatedAmount = 0
Validate against this rule →

BR-AE-10

fatal

A reverse-charge VAT group needs an exemption reason — the code VATEX-EU-AE or the text 'Reverse charge'.

A VAT breakdown with VAT Category code "Reverse charge" shall have a VAT exemption reason code or the VAT exemption reason text "Reverse charge".

EN 16931CIIUBL
Technical test (XPath)
(../ram:ExemptionReason) or (../ram:ExemptionReasonCode)
Validate against this rule →

BR-E-01

fatal

An Invoice that contains an Invoice line, Document level allowance or Document level charge where the VAT category code is "Exempt from VAT" shall contain exactly one VAT breakdown with the VAT category code equal to "Exempt from VAT".

EN 16931CIIUBL
Technical test (XPath)
(count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='E'])=0 and count(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='E'])=0 and count(//ram:CategoryTradeTax[ram:CategoryCode='E'])=0) or ( count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='E'])=1 and (exists(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='E']) or exists(//ram:CategoryTradeTax[ram:CategoryCode='E'])))
Validate against this rule →

BR-E-02

fatal

An Invoice that contains an Invoice line where the Invoiced item VAT category code is "Exempt from VAT" shall contain the Seller VAT Identifier, the Seller tax registration identifier and/or the Seller tax representative VAT identifier.

EN 16931CIIUBL
Technical test (XPath)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']
Validate against this rule →

BR-G-01

fatal

An Invoice that contains an Invoice line, Document level allowance or Document level charge where the VAT category code is "Export outside the EU" shall contain in the VAT breakdown exactly one VAT category code equal with "Export outside the EU".

EN 16931CIIUBL
Technical test (XPath)
(count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='G'])=0 and count(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='G'])=0 and count(//ram:CategoryTradeTax[ram:CategoryCode='G'])=0) or ( count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='G'])=1 and (exists(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='G']) or exists(//ram:CategoryTradeTax[ram:CategoryCode='G'])))
Validate against this rule →

BR-G-02

fatal

An Invoice that contains an Invoice line where the Invoiced item VAT category code is "Export outside the EU" shall contain the Seller VAT Identifier or the Seller tax representative VAT identifier.

EN 16931CIIUBL
Technical test (XPath)
(//ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'] or //ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'])
Validate against this rule →

BR-IC-01

fatal

An Invoice that contains an Invoice line, Document level allowance or Document level charge where the VAT category code is "Intra-community supply" shall contain in the VAT breakdown exactly one VAT category code equal with "Intra-community supply".

EN 16931CIIUBL
Technical test (XPath)
(count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='K'])=0 and count(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='K'])=0 and count(//ram:CategoryTradeTax[ram:CategoryCode='K'])=0) or ( count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='K'])=1 and (exists(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='K']) or exists(//ram:CategoryTradeTax[ram:CategoryCode='K'])))
Validate against this rule →

BR-IC-02

fatal

An Invoice that contains an Invoice line where the Invoiced item VAT category code is "Intra-community supply" shall contain the Seller VAT Identifier or the Seller tax representative VAT identifier and the Buyer VAT identifier.

EN 16931CIIUBL
Technical test (XPath)
(//ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'] or //ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and //ram:BuyerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']
Validate against this rule →

BR-O-01

fatal

An Invoice that contains an Invoice line, Document level allowance or Document level charge where the VAT category code is "Not subject to VAT" shall contain exactly one VAT breakdown group with the VAT category code equal to "Not subject to VAT".

EN 16931CIIUBL
Technical test (XPath)
not(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='O']) or ( count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='O'])=1 and (exists(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='O']) or exists(//ram:CategoryTradeTax[ram:CategoryCode='O'])))
Validate against this rule →

BR-S-01

fatal

Something on the invoice uses the standard VAT rate (category S), but the VAT breakdown has no standard-rate entry.

An Invoice that contains an Invoice line, Document level allowance or Document level charge where the VAT category code is "Standard rate" shall contain in the VAT breakdown at least one VAT category code equal with "Standard rate".

EN 16931CIIUBL
Validate against this rule →

BR-S-02

fatal

Standard-rate VAT is used, so the seller's VAT number (or tax registration) must be on the invoice.

An Invoice that contains an Invoice line where the Invoiced item VAT category code is "Standard rate" shall contain the Seller VAT Identifier, the Seller tax registration identifier and/or the Seller tax representative VAT identifier.

EN 16931CIIUBL
Technical test (XPath)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']
Validate against this rule →

BR-Z-01

fatal

An Invoice that contains an Invoice line, Document level allowance or Document level charge where the VAT category code is "Zero rated" shall contain in the VAT breakdown exactly one VAT category code equal with "Zero rated".

EN 16931CIIUBL
Technical test (XPath)
(count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='Z'])=0 and count(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='Z'])=0 and count(//ram:CategoryTradeTax[ram:CategoryCode='Z'])=0) or ( count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='Z'])=1 and (exists(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='Z']) or exists(//ram:CategoryTradeTax[ram:CategoryCode='Z'])))
Validate against this rule →

BR-Z-02

fatal

An Invoice that contains an Invoice line where the Invoiced item VAT category code is "Zero rated" shall contain the Seller VAT Identifier, the Seller tax registration identifier and/or the Seller tax representative VAT identifier.

EN 16931CIIUBL
Technical test (XPath)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']
Validate against this rule →

EN 16931 — decimal rules (14)

BR-DEC-01

fatal

The allowed maximum number of decimals for the Document level allowance amount (BT-92) is 2.

EN 16931CIIUBLBT-92
Technical test (XPath)
string-length(substring-after(../ram:ActualAmount,'.'))<=2
Validate against this rule →

BR-DEC-02

fatal

The allowed maximum number of decimals for the Document level allowance base amount (BT-93) is 2.

EN 16931CIIUBLBT-93
Technical test (XPath)
string-length(substring-after(../ram:BasisAmount,'.'))<=2
Validate against this rule →

BR-DEC-05

fatal

The allowed maximum number of decimals for the Document level charge amount (BT-99) is 2.

EN 16931CIIUBLBT-99
Technical test (XPath)
string-length(substring-after(../ram:ActualAmount,'.'))<=2
Validate against this rule →

BR-DEC-06

fatal

The allowed maximum number of decimals for the Document level charge base amount (BT-100) is 2.

EN 16931CIIUBLBT-100
Technical test (XPath)
string-length(substring-after(../ram:BasisAmount,'.'))<=2
Validate against this rule →

BR-DEC-09

fatal

The allowed maximum number of decimals for the Sum of Invoice line net amount (BT-106) is 2.

EN 16931CIIUBLBT-106
Technical test (XPath)
string-length(substring-after(ram:LineTotalAmount,'.'))<=2
Validate against this rule →

BR-DEC-10

fatal

The allowed maximum number of decimals for the Sum of allowances on document level (BT-107) is 2.

EN 16931CIIUBLBT-107
Technical test (XPath)
string-length(substring-after(ram:AllowanceTotalAmount,'.'))<=2
Validate against this rule →

BR-DEC-11

fatal

The allowed maximum number of decimals for the Sum of charges on document level (BT-108) is 2.

EN 16931CIIUBLBT-108
Technical test (XPath)
string-length(substring-after(ram:ChargeTotalAmount,'.'))<=2
Validate against this rule →

BR-DEC-12

fatal

The allowed maximum number of decimals for the Invoice total amount without VAT (BT-109) is 2.

EN 16931CIIUBLBT-109
Technical test (XPath)
string-length(substring-after(ram:TaxBasisTotalAmount,'.'))<=2
Validate against this rule →

BR-DEC-13

fatal

The allowed maximum number of decimals for the Invoice total VAT amount (BT-110) is 2.

EN 16931CIIUBLBT-110
Technical test (XPath)
not(ram:TaxTotalAmount) or ram:TaxTotalAmount[(@currencyID =/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode and . = round(. * 100) div 100) or not (@currencyID =/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode)]
Validate against this rule →

BR-DEC-14

fatal

The allowed maximum number of decimals for the Invoice total amount with VAT (BT-112) is 2.

EN 16931CIIUBLBT-112
Technical test (XPath)
string-length(substring-after(ram:GrandTotalAmount,'.'))<=2
Validate against this rule →

BR-DEC-15

fatal

The allowed maximum number of decimals for the Invoice total VAT amount in accounting currency (BT-111) is 2.

EN 16931CIIUBLBT-111
Technical test (XPath)
not(ram:TaxTotalAmount) or ram:TaxTotalAmount[(@currencyID =/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode and . = round(. * 100) div 100) or not (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode)]
Validate against this rule →

BR-DEC-16

fatal

The allowed maximum number of decimals for the Paid amount (BT-113) is 2.

EN 16931CIIUBLBT-113
Technical test (XPath)
string-length(substring-after(ram:TotalPrepaidAmount,'.'))<=2
Validate against this rule →

BR-DEC-17

fatal

The allowed maximum number of decimals for the Rounding amount (BT-114) is 2.

EN 16931CIIUBLBT-114
Technical test (XPath)
string-length(substring-after(ram:RoundingAmount,'.'))<=2
Validate against this rule →

BR-DEC-18

fatal

The allowed maximum number of decimals for the Amount due for payment (BT-115) is 2.

EN 16931CIIUBLBT-115
Technical test (XPath)
string-length(substring-after(ram:DuePayableAmount,'.'))<=2
Validate against this rule →

PEPPOL BIS 3.0 (38)

PEPPOL-COMMON-R042

fatal

Danish organization number (CVR) MUST be stated in the correct format.

PEPPOL BIS 3.0UBL
Technical test (XPath)
(string-length(string()) = 10 and substring(string(), 1, 2) = 'DK' and string-length(translate(substring(string(), 3, 8), '1234567890', '')) = 0) or (string-length(string()) = 8) and (string-length(translate(substring(string(), 1, 8),'1234567890', '')) = 0)
Validate against this rule →

PEPPOL-COMMON-R049

fatal

Swedish organization number MUST be stated in the correct format.

PEPPOL BIS 3.0UBL
Technical test (XPath)
string-length(normalize-space()) = 10 and string(number(normalize-space())) != 'NaN' and u:checkSEOrgnr(normalize-space())
Validate against this rule →

PEPPOL-EN16931-R001

fatal

The business process identifier (ProfileID) is missing — for a normal PEPPOL invoice it is urn:fdc:peppol.eu:2017:poacc:billing:01:1.0.

Business process MUST be provided.

PEPPOL BIS 3.0XRechnung 3.xCIIUBL
Technical test (XPath)
cbc:ProfileID
Validate against this rule →

PEPPOL-EN16931-R003

fatal

The invoice needs a buyer reference or a purchase order reference — ask your customer which one they use.

A buyer reference or purchase order reference MUST be provided.

PEPPOL BIS 3.0UBL
Technical test (XPath)
cbc:BuyerReference or cac:OrderReference/cbc:ID
Validate against this rule →

PEPPOL-EN16931-R004

fatal

The specification identifier (CustomizationID) is not the PEPPOL BIS 3.0 one — the file may have been built for another format.

Specification identifier MUST have the value 'urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0'.

PEPPOL BIS 3.0UBL
Technical test (XPath)
starts-with(normalize-space(cbc:CustomizationID/text()), 'urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0')
Validate against this rule →

PEPPOL-EN16931-R005

fatal

VAT accounting currency code MUST be different from invoice currency code when provided.

PEPPOL BIS 3.0XRechnung 3.xCIIUBL
Technical test (XPath)
not(normalize-space(text()) = normalize-space(../cbc:DocumentCurrencyCode/text()))
Validate against this rule →

PEPPOL-EN16931-R008

fatal

The document contains an empty element — an XML tag with no value. Fill the field or remove it instead of leaving it blank.

Document MUST not contain empty elements.

PEPPOL BIS 3.0XRechnung 3.xCIIUBL
Technical test (XPath)
false()
Validate against this rule →

PEPPOL-EN16931-R010

fatal

The buyer's electronic address (Peppol ID) is missing — it is where the invoice is delivered on the Peppol network.

Buyer electronic address MUST be provided.

PEPPOL BIS 3.0XRechnung 3.xCIIUBL
Technical test (XPath)
cbc:EndpointID
Validate against this rule →

PEPPOL-EN16931-R043

fatal

Allowance/charge ChargeIndicator value MUST equal 'true' or 'false'.

PEPPOL BIS 3.0XRechnung 3.xUBL
Technical test (XPath)
normalize-space(cbc:ChargeIndicator/text()) = 'true' or normalize-space(cbc:ChargeIndicator/text()) = 'false'
Validate against this rule →

PEPPOL-EN16931-R046

fatal

When a gross price is given, the net price must equal the gross price minus the price discount.

Item net price MUST equal (Gross price - Allowance amount) when gross price is provided.

PEPPOL BIS 3.0XRechnung 3.xCIIUBL
Technical test (XPath)
not(cbc:BaseAmount) or xs:decimal(../cbc:PriceAmount) = xs:decimal(cbc:BaseAmount) - xs:decimal(cbc:Amount)
Validate against this rule →

PEPPOL-EN16931-R051

fatal

An amount is in a different currency from the invoice — all amounts must use the invoice currency (only the VAT total in accounting currency may differ).

All currencyID attributes must have the same value as the invoice currency code (BT-5), except for the invoice total VAT amount in accounting currency (BT-111).

PEPPOL BIS 3.0UBLBT-5BT-111
Technical test (XPath)
@currencyID = $documentCurrencyCode
Validate against this rule →

PEPPOL-EN16931-R053

fatal

There must be exactly one VAT total with a breakdown in the invoice currency.

Only one tax total with tax subtotals MUST be provided.

PEPPOL BIS 3.0XRechnung 3.xCIIUBL
Technical test (XPath)
count(cac:TaxTotal[cac:TaxSubtotal]) = 1
Validate against this rule →

PEPPOL-EN16931-R054

fatal

Only one tax total without tax subtotals MUST be provided when tax currency code is provided.

PEPPOL BIS 3.0XRechnung 3.xCIIUBL
Technical test (XPath)
count(cac:TaxTotal[not(cac:TaxSubtotal)]) = (if (cbc:TaxCurrencyCode) then 1 else 0)
Validate against this rule →

PEPPOL-EN16931-R055

fatal

Invoice total VAT amount and Invoice total VAT amount in accounting currency MUST have the same operational sign.

PEPPOL BIS 3.0XRechnung 3.xCIIUBL
Technical test (XPath)
not(cbc:TaxCurrencyCode) or (cac:TaxTotal/cbc:TaxAmount[@currencyID=normalize-space(../../cbc:TaxCurrencyCode)] <= 0 and cac:TaxTotal/cbc:TaxAmount[@currencyID=normalize-space(../../cbc:DocumentCurrencyCode)] <= 0) or (cac:TaxTotal/cbc:TaxAmount[@currencyID=normalize-space(../../cbc:TaxCurrencyCode)] >= 0 and cac:TaxTotal/cbc:TaxAmount[@currencyID=normalize-space(../../cbc:DocumentCurrencyCode)] >= 0)
Validate against this rule →

PEPPOL-EN16931-R101

fatal

Element Document reference can only be used for Invoice line object.

PEPPOL BIS 3.0XRechnung 3.xCIIUBL
Technical test (XPath)
(not(cac:DocumentReference) or (cac:DocumentReference/cbc:DocumentTypeCode='130'))
Validate against this rule →

PEPPOL-EN16931-R110

fatal

A line's period starts before the invoice period — line periods must fall within it.

Start date of line period MUST be within invoice period.

PEPPOL BIS 3.0XRechnung 3.xCIIUBL
Technical test (XPath)
xs:date(text()) >= xs:date(../../../cac:InvoicePeriod/cbc:StartDate)
Validate against this rule →

PEPPOL-EN16931-R111

fatal

A line's period ends after the invoice period — line periods must fall within it.

End date of line period MUST be within invoice period.

PEPPOL BIS 3.0XRechnung 3.xCIIUBL
Technical test (XPath)
xs:date(text()) <= xs:date(../../../cac:InvoicePeriod/cbc:EndDate)
Validate against this rule →

PEPPOL-EN16931-R120

fatal

A line's net amount does not equal quantity × net price (divided by the price base quantity), plus line charges, minus line allowances.

Invoice line net amount MUST equal (Invoiced quantity * (Item net price/item price base quantity) + Sum of invoice line charge amount - sum of invoice line allowance amount.

PEPPOL BIS 3.0XRechnung 3.xUBL
Technical test (XPath)
u:slack($lineExtensionAmount, ($quantity * ($priceAmount div $baseQuantity)) + $chargesTotal - $allowancesTotal, 0.02)
Validate against this rule →

PEPPOL-EN16931-R121

fatal

The price base quantity must be greater than zero — usually 1.

Base quantity MUST be a positive number above zero.

PEPPOL BIS 3.0XRechnung 3.xCIIUBL
Technical test (XPath)
not(cac:Price/cbc:BaseQuantity) or xs:decimal(cac:Price/cbc:BaseQuantity) > 0
Validate against this rule →

PEPPOL-EN16931-R130

fatal

The price base quantity uses a different unit from the invoiced quantity — use the same unit code for both.

Unit code of price base quantity MUST be same as invoiced quantity.

PEPPOL BIS 3.0XRechnung 3.xCIIUBL
Technical test (XPath)
not($hasQuantity) or @unitCode = $quantity/@unitCode
Validate against this rule →

XRechnung (Germany) (31)

BR-DE-1

fatal

XRechnung requires payment instructions — add the payment method (for example credit transfer) with your account details.

An invoice must contain PAYMENT INSTRUCTIONS (BG-16).

XRechnung 3.xCIIUBLBG-16
Technical test (XPath)
rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans
Validate against this rule →

BR-DE-2

fatal

XRechnung requires the seller's contact — a contact person or department, a phone number and an email address.

The group SELLER CONTACT (BG-6) must be provided.

XRechnung 3.xCIIUBLBG-6
Technical test (XPath)
ram:DefinedTradeContact
Validate against this rule →

BR-DE-5

fatal

Seller contact point (BT-41) must be provided.

XRechnung 3.xCIIUBLBT-41
Technical test (XPath)
(ram:PersonName,ram:DepartmentName)[boolean(normalize-space(.))]
Validate against this rule →

BR-DE-6

fatal

Seller contact telephone number (BT-42) must be provided.

XRechnung 3.xCIIUBLBT-42
Technical test (XPath)
ram:TelephoneUniversalCommunication/ram:CompleteNumber[boolean(normalize-space(.))]
Validate against this rule →

BR-DE-7

fatal

Seller contact email address (BT-43) must be provided.

XRechnung 3.xCIIUBLBT-43
Technical test (XPath)
ram:EmailURIUniversalCommunication/ram:URIID[boolean(normalize-space(.))]
Validate against this rule →

BR-DE-10

fatal

Deliver to city (BT-77) must be provided when DELIVER TO ADDRESS (BG-15) is provided.

XRechnung 3.xCIIUBLBT-77BG-15
Technical test (XPath)
ram:CityName[boolean(normalize-space(.))]
Validate against this rule →

BR-DE-11

fatal

Deliver to post code (BT-78) must be provided when DELIVER TO ADDRESS (BG-15) is provided.

XRechnung 3.xCIIUBLBT-78BG-15
Technical test (XPath)
ram:PostcodeCode[boolean(normalize-space(.))]
Validate against this rule →

BR-DE-15

fatal

The buyer reference is missing — for German public-sector invoices this is the Leitweg-ID the authority gave you.

Buyer reference (BT-10) must be provided. For German public-sector invoices this is the Leitweg-ID.

XRechnung 3.xCIIUBLBT-10
Technical test (XPath)
rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerReference[boolean(normalize-space(.))]
Validate against this rule →

BR-DE-16

fatal

With these VAT categories the seller's VAT number, tax number or tax representative must be on the invoice.

When VAT category code S, Z, E, AE, K, G, L or M is used, at least one of Seller VAT identifier (BT-31), Seller tax registration identifier (BT-32) or SELLER TAX REPRESENTATIVE PARTY (BG-11) must be provided.

XRechnung 3.xCIIUBLBT-31BT-32BG-11
Technical test (XPath)
not((rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax/ram:TypeCode = 'VAT' and rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax/ram:CategoryCode = ('S', 'Z', 'E', 'AE', 'K', 'G', 'L', 'M')) or (rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CategoryTradeTax = 'VAT' and rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:CategoryTradeTax/ram:CategoryCode = ('S', 'Z', 'E', 'AE', 'K', 'G', 'L', 'M')) or (rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax/ram:TypeCode = 'VAT' and rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax/ram:CategoryCode = ('S', 'Z', 'E', 'AE', 'K', 'G', 'L', 'M'))) or ((rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID='VA' or @schemeID='FC'][boolean(normalize-space(.))], rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty))
Validate against this rule →

BR-DE-17

warning

Invoice type code (BT-3) should use only these UNTDID 1001 codes: 326, 380, 381, 384, 389, 875, 876, 877.

XRechnung 3.xCIIUBLBT-3
Technical test (XPath)
rsm:ExchangedDocument/ram:TypeCode = ('326', '380', '384', '389', '381', '875', '876', '877')
Validate against this rule →

BR-DE-18

fatal

Early-payment discount (Skonto) terms stated in Payment terms (BT-20) must follow the prescribed #SKONTO# format.

XRechnung 3.xCIIUBLBT-20
Technical test (XPath)
every $line in rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:Description[1]/tokenize(. , '(\r?\n)')[starts-with( normalize-space(.) , '#')] satisfies matches ( normalize-space ($line), $XR-SKONTO-REGEX ) and matches( rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:Description[1]/tokenize(. , '#.+#')[last()], '^\s*\n' )
Validate against this rule →

BR-DE-19

warning

For a SEPA credit transfer, the account number must be a valid IBAN.

Payment account identifier (BT-84) should contain a valid IBAN when Payment means type code (BT-81) requests SEPA credit transfer (code 58).

XRechnung 3.xCIIUBLBT-84BT-81
Technical test (XPath)
not(ram:TypeCode = '58') or matches(normalize-space(replace(ram:PayeePartyCreditorFinancialAccount/ram:IBANID, '([ \n\r\t\s])', '')), '^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{0,30}$') and xs:integer(string-join(for $cp in string-to-codepoints(concat(substring(normalize-space(replace(ram:PayeePartyCreditorFinancialAccount/ram:IBANID, '([ \n\r\t\s])', '')),5),upper-case(substring(normalize-space(replace(ram:PayeePartyCreditorFinancialAccount/ram:IBANID, '([ \n\r\t\s])', '')),1,2)),substring(normalize-space(replace(ram:PayeePartyCreditorFinancialAccount/ram:IBANID, '([ \n\r\t\s])', '')),3,2))) return (if($cp > 64) then string($cp - 55) else string($cp - 48)),'')) mod 97 = 1
Validate against this rule →

BR-DE-20

warning

Debited account identifier (BT-91) should contain a valid IBAN when Payment means type code (BT-81) requests SEPA direct debit (code 59).

XRechnung 3.xCIIUBLBT-91BT-81
Technical test (XPath)
not(ram:TypeCode = '59') or matches(normalize-space(replace(ram:PayerPartyDebtorFinancialAccount/ram:IBANID, '([ \n\r\t\s])', '')), '^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{0,30}$') and xs:decimal(string-join(for $cp in string-to-codepoints(concat(substring(normalize-space(replace(ram:PayerPartyDebtorFinancialAccount/ram:IBANID, '([ \n\r\t\s])', '')),5),upper-case(substring(normalize-space(replace(ram:PayerPartyDebtorFinancialAccount/ram:IBANID, '([ \n\r\t\s])', '')),1,2)),substring(normalize-space(replace(ram:PayerPartyDebtorFinancialAccount/ram:IBANID, '([ \n\r\t\s])', '')),3,2))) return (if($cp > 64) then string($cp - 55) else string($cp - 48)),'')) mod 97 = 1
Validate against this rule →

BR-DE-21

warning

Specification identifier (BT-24) should syntactically match the XRechnung standard identifier.

XRechnung 3.xCIIUBLBT-24
Technical test (XPath)
ram:GuidelineSpecifiedDocumentContextParameter/ram:ID = $XR-CIUS-ID or ram:GuidelineSpecifiedDocumentContextParameter/ram:ID = $XR-EXTENSION-ID
Validate against this rule →

BR-DE-22

fatal

The filename attribute of every EmbeddedDocumentBinaryObject element must be unique.

XRechnung 3.xCIIUBL
Technical test (XPath)
count(//ram:AdditionalReferencedDocument) = count(//ram:AdditionalReferencedDocument[not(./ram:AttachmentBinaryObject/@filename = preceding-sibling::ram:AdditionalReferencedDocument/ram:AttachmentBinaryObject/@filename)])
Validate against this rule →

BR-DE-23-a

fatal

When Payment means type code (BT-81) is a credit-transfer code (30, 58), CREDIT TRANSFER (BG-17) must be provided.

XRechnung 3.xCIIUBLBT-81BG-17
Technical test (XPath)
ram:PayeePartyCreditorFinancialAccount
Validate against this rule →

BR-DE-23-b

fatal

When Payment means type code (BT-81) is a credit-transfer code (30, 58), BG-18 and BG-19 must not be provided.

XRechnung 3.xCIIUBLBT-81BG-18BG-19
Technical test (XPath)
not(ram:ApplicableTradeSettlementFinancialCard) and not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:DirectDebitMandateID or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:CreditorReferenceID or ram:PayerPartyDebtorFinancialAccount/ram:IBANID)
Validate against this rule →

BR-DE-24-a

fatal

When Payment means type code (BT-81) is a card-payment code (48, 54, 55), exactly one PAYMENT CARD INFORMATION (BG-18) must be provided.

XRechnung 3.xCIIUBLBT-81BG-18
Technical test (XPath)
ram:ApplicableTradeSettlementFinancialCard
Validate against this rule →

BR-DE-24-b

fatal

When Payment means type code (BT-81) is a card-payment code (48, 54, 55), BG-17 and BG-19 must not be provided.

XRechnung 3.xCIIUBLBT-81BG-17BG-19
Technical test (XPath)
not(ram:PayeePartyCreditorFinancialAccount) and not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:DirectDebitMandateID or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:CreditorReferenceID or ram:PayerPartyDebtorFinancialAccount/ram:IBANID)
Validate against this rule →

BR-DE-25-a

fatal

When Payment means type code (BT-81) is a direct-debit code (59), exactly one DIRECT DEBIT (BG-19) must be provided.

XRechnung 3.xCIIUBLBT-81BG-19
Technical test (XPath)
/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:DirectDebitMandateID or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:CreditorReferenceID or ram:PayerPartyDebtorFinancialAccount/ram:IBANID
Validate against this rule →

BR-DE-25-b

fatal

When Payment means type code (BT-81) is a direct-debit code (59), BG-17 and BG-18 must not be provided.

XRechnung 3.xCIIUBLBT-81BG-17BG-18
Technical test (XPath)
not(ram:PayeePartyCreditorFinancialAccount) and not(ram:ApplicableTradeSettlementFinancialCard)
Validate against this rule →

BR-DE-26

warning

When Invoice type code (BT-3) is 384 (Corrected invoice), PRECEDING INVOICE REFERENCE (BG-3) should be present at least once.

XRechnung 3.xCIIUBLBT-3BG-3
Technical test (XPath)
not(rsm:ExchangedDocument/ram:TypeCode = 384) or (rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceReferencedDocument)
Validate against this rule →

BR-DE-27

warning

Seller contact telephone number (BT-42) should contain at least three digits.

XRechnung 3.xCIIUBLBT-42
Technical test (XPath)
matches(normalize-space(ram:TelephoneUniversalCommunication/ram:CompleteNumber), $XR-TELEPHONE-REGEX)
Validate against this rule →

BR-DE-28

warning

Seller contact email address (BT-43) should contain exactly one @ character with at least two characters on each side, not adjacent to a space or a dot; a dot must not be first or last.

XRechnung 3.xCIIUBLBT-43
Technical test (XPath)
matches(normalize-space(ram:EmailURIUniversalCommunication/ram:URIID), $XR-EMAIL-REGEX)
Validate against this rule →

BR-DE-30

fatal

When DIRECT DEBIT (BG-19) is present, Bank assigned creditor identifier (BT-90) must be provided.

XRechnung 3.xCIIUBLBG-19BT-90
Technical test (XPath)
(($BT-89-path or $BT-91-path) and $BT-90-path) or $BG-19-not-existing
Validate against this rule →

BR-DE-31

fatal

When DIRECT DEBIT (BG-19) is present, Debited account identifier (BT-91) must be provided.

XRechnung 3.xCIIUBLBG-19BT-91
Technical test (XPath)
(($BT-89-path or $BT-90-path) and $BT-91-path) or $BG-19-not-existing
Validate against this rule →

National CIUS (DK) (13)

DK-R-002

fatal

Danish suppliers MUST provide legal entity (CVR-number).

PEPPOL BIS 3.0UBL
Technical test (XPath)
(normalize-space(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID/text()) != '')
Validate against this rule →

DK-R-003

warning

Danish Suppliers MUST provide legal entity identifier (CVR number) when Item Classification Code is TST.

PEPPOL BIS 3.0UBL
Technical test (XPath)
not((cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode/@listID = 'TST') and not((cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode/@listVersionID = '19.05.01') or (cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode/@listVersionID = '19.0501') or (cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode/@listVersionID = '26.08.01') or (cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode/@listVersionID = '26.0801') ) )
Validate against this rule →

DK-R-004

fatal

Danish Suppliers MUST provide reason text when Allowance/Charge reason code is ZZZ.

PEPPOL BIS 3.0UBL
Technical test (XPath)
not((cbc:AllowanceChargeReasonCode = 'ZZZ') and not(((string-length(normalize-space(cbc:AllowanceChargeReason/text())) = 4) and (number(cbc:AllowanceChargeReason) >= 0) and (number(cbc:AllowanceChargeReason) <= 9999)) or (((cbc:AllowanceChargeReason and contains(cbc:AllowanceChargeReason, '#') and not(starts-with(cbc:AllowanceChargeReason, '#')) and not(ends-with(cbc:AllowanceChargeReason, '#')))) ) ) )
Validate against this rule →

DK-R-005

fatal

For Danish suppliers the following Payment means codes are allowed: 1, 10, 31, 42, 48, 49, 50, 58, 59, 93 and 97.

PEPPOL BIS 3.0UBL
Technical test (XPath)
contains(' 1 10 31 42 48 49 50 58 59 93 97 ', concat(' ', cbc:PaymentMeansCode, ' '))
Validate against this rule →

DK-R-006

fatal

For Danish Suppliers bank account and routing numbers are mandatory for payment by bank transfer.

PEPPOL BIS 3.0UBL
Technical test (XPath)
not(((cbc:PaymentMeansCode = '31') or (cbc:PaymentMeansCode = '42')) and not((normalize-space(cac:PayeeFinancialAccount/cbc:ID/text()) != '') and (normalize-space(cac:PayeeFinancialAccount/cac:FinancialInstitutionBranch/cbc:ID/text()) != '')) )
Validate against this rule →

DK-R-007

fatal

For Danish Suppliers PaymentMandate ID and Seller account ID are mandatory for direct debit.

PEPPOL BIS 3.0UBL
Technical test (XPath)
not((cbc:PaymentMeansCode = '49') and not((normalize-space(cac:PaymentMandate/cbc:ID/text()) != '') and (normalize-space(cac:PaymentMandate/cac:PayerFinancialAccount/cbc:ID/text()) != '')) )
Validate against this rule →

DK-R-008

fatal

For Danish Suppliers PaymentCard primary account number is mandatory for payment by card.

PEPPOL BIS 3.0UBL
Technical test (XPath)
not((cbc:PaymentMeansCode = '50') and not(((substring(cbc:PaymentID, 1, 3) = '01#') or (substring(cbc:PaymentID, 1, 3) = '04#') or (substring(cbc:PaymentID, 1, 3) = '15#')) and matches(cac:PayeeFinancialAccount/cbc:ID, '^[0-9]{7,8}$') ) )
Validate against this rule →

DK-R-009

fatal

For Danish Suppliers PaymentCard holder name is mandatory for payment by card.

PEPPOL BIS 3.0UBL
Technical test (XPath)
not((cbc:PaymentMeansCode = '50') and ((substring(cbc:PaymentID, 1, 3) = '04#') or (substring(cbc:PaymentID, 1, 3) = '15#')) and not(string-length(cbc:PaymentID) = 19) )
Validate against this rule →

DK-R-010

fatal

For Danish Suppliers FinancialInstitutionBranch ID is mandatory for payment type 93.

PEPPOL BIS 3.0UBL
Technical test (XPath)
not((cbc:PaymentMeansCode = '93') and not(((substring(cbc:PaymentID, 1, 3) = '71#') or (substring(cbc:PaymentID, 1, 3) = '73#') or (substring(cbc:PaymentID, 1, 3) = '75#')) and (string-length(cac:PayeeFinancialAccount/cbc:ID/text()) = 8) ) )
Validate against this rule →

DK-R-011

fatal

For Danish Suppliers PayeeFinancialAccount ID is mandatory for payment type 93.

PEPPOL BIS 3.0UBL
Technical test (XPath)
not((cbc:PaymentMeansCode = '93') and ((substring(cbc:PaymentID, 1, 3) = '71#') or (substring(cbc:PaymentID, 1, 3) = '75#')) and not((string-length(cbc:PaymentID) = 18) or (string-length(cbc:PaymentID) = 19)) )
Validate against this rule →

DK-R-013

fatal

For Danish Suppliers only positive values are allowed for the InvoicedQuantity.

PEPPOL BIS 3.0UBL
Technical test (XPath)
not((boolean(cbc:ID)) and (normalize-space(cbc:ID/@schemeID) = '') )
Validate against this rule →

DK-R-014

fatal

For Danish Suppliers DocumentCurrencyCode must match TaxCurrencyCode when provided.

PEPPOL BIS 3.0UBL
Technical test (XPath)
not(((boolean(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID)) and (normalize-space(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID/@schemeID) != '0184')) )
Validate against this rule →

DK-R-016

fatal

For Danish Credit Notes with Danish Buyer, a preceding invoice reference must be provided.

PEPPOL BIS 3.0UBL
Technical test (XPath)
not((boolean(/ubl-creditnote:CreditNote) and ($DKCustomerCountry = 'DK')) and (number(cac:LegalMonetaryTotal/cbc:PayableAmount/text()) < 0) )
Validate against this rule →

National CIUS (GR) (17)

GR-R-001-2

fatal

When Supplier is Greek, the Invoice ID first segment must be a valid 9 digit Tax ID.

PEPPOL BIS 3.0UBL
Technical test (XPath)
string-length(normalize-space($IdSegments[1])) = 9 and u:TinVerification($IdSegments[1]) and ($IdSegments[1] = /*/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID = 'VAT']/substring(cbc:CompanyID, 3, 9) or $IdSegments[1] = /*/cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/cbc:ID = 'VAT']/substring(cbc:CompanyID, 3, 9) )
Validate against this rule →

GR-R-003

fatal

For the Greek Suppliers, the VAT must start with 'EL' and must be a valid TIN number.

PEPPOL BIS 3.0UBL
Technical test (XPath)
substring(.,1,2) = 'EL' and u:TinVerification(substring(.,3))
Validate against this rule →

GR-R-004-1

fatal

When Supplier is Greek, there must be one MARK Number.

PEPPOL BIS 3.0UBL
Technical test (XPath)
count(cac:AdditionalDocumentReference[cbc:DocumentDescription = '##M.AR.K##'])=1
Validate against this rule →

GR-R-006

fatal

For Greek buyers, the invoice MUST contain their VAT number.

PEPPOL BIS 3.0UBL
Technical test (XPath)
count(cac:PartyTaxScheme[normalize-space(cac:TaxScheme/cbc:ID) = 'VAT']/cbc:CompanyID)=1 and substring(cac:PartyTaxScheme[normalize-space(cac:TaxScheme/cbc:ID) = 'VAT']/cbc:CompanyID,1,2) = 'EL' and u:TinVerification(substring(cac:PartyTaxScheme[normalize-space(cac:TaxScheme/cbc:ID) = 'VAT']/cbc:CompanyID,3))
Validate against this rule →

GR-R-008-2

fatal

When Supplier is Greek, there should be no more than one invoice url.

PEPPOL BIS 3.0UBL
Technical test (XPath)
(count(cac:AdditionalDocumentReference[cbc:DocumentDescription = '##INVOICE|URL##']) = 0 ) or (count(cac:AdditionalDocumentReference[cbc:DocumentDescription = '##INVOICE|URL##']) = 1 )
Validate against this rule →

GR-R-009

fatal

Greek suppliers that send an invoice through the PEPPOL network must use a correct TIN number as an electronic address.

PEPPOL BIS 3.0UBL
Technical test (XPath)
./@schemeID='9933' and u:TinVerification(.)
Validate against this rule →

GR-R-010

fatal

Greek Suppliers that send an invoice through the PEPPOL network to a greek buyer must use a correct TIN number as an electronic address.

PEPPOL BIS 3.0UBL
Technical test (XPath)
./@schemeID='9933' and u:TinVerification(.)
Validate against this rule →

National CIUS (IS) (6)

IS-R-002

fatal

If seller is icelandic then it shall contain sellers legal id.

PEPPOL BIS 3.0UBL
Technical test (XPath)
exists(cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID) and cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID/@schemeID = '0196'
Validate against this rule →

IS-R-003

fatal

If seller is icelandic then it shall contain his address with street name and zip code.

PEPPOL BIS 3.0UBL
Technical test (XPath)
exists(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:StreetName) and exists(cac:AccountingSupplierParty/cac:Party/cac:PostalAddress/cbc:PostalZone)
Validate against this rule →

IS-R-004

fatal

If seller and buyer are icelandic then the invoice shall contain the buyers icelandic legal identifier.

PEPPOL BIS 3.0UBL
Technical test (XPath)
exists(cac:Party/cac:PartyLegalEntity/cbc:CompanyID) and cac:Party/cac:PartyLegalEntity/cbc:CompanyID/@schemeID = '0196'
Validate against this rule →

IS-R-005

fatal

If seller and buyer are icelandic then the invoice shall contain the buyers address with street name and zip code.

PEPPOL BIS 3.0UBL
Technical test (XPath)
exists(cac:Party/cac:PostalAddress/cbc:StreetName) and exists(cac:Party/cac:PostalAddress/cbc:PostalZone)
Validate against this rule →

IS-R-006

fatal

If seller is icelandic and payment means is debit transfer, a valid PayeeFinancialAccount ID must be provided.

PEPPOL BIS 3.0UBL
Technical test (XPath)
exists(cac:PaymentMeans[cbc:PaymentMeansCode = '9']/cac:PayeeFinancialAccount/cbc:ID) and string-length(normalize-space(cac:PaymentMeans[cbc:PaymentMeansCode = '9']/cac:PayeeFinancialAccount/cbc:ID)) = 12 or not(exists(cac:PaymentMeans[cbc:PaymentMeansCode = '9']))
Validate against this rule →

IS-R-007

fatal

If seller is icelandic and payment means is bank transfer, a valid PayeeFinancialAccount ID must be provided.

PEPPOL BIS 3.0UBL
Technical test (XPath)
exists(cac:PaymentMeans[cbc:PaymentMeansCode = '42']/cac:PayeeFinancialAccount/cbc:ID) and string-length(normalize-space(cac:PaymentMeans[cbc:PaymentMeansCode = '42']/cac:PayeeFinancialAccount/cbc:ID)) = 12 or not(exists(cac:PaymentMeans[cbc:PaymentMeansCode = '42']))
Validate against this rule →

National CIUS (IT) (4)

IT-R-001

fatal

For Italian suppliers BT-32 minimum length 11 and maximum length shall be 16.

PEPPOL BIS 3.0UBLBT-32
Technical test (XPath)
matches(normalize-space(cbc:CompanyID),'^[A-Z0-9]{11,16}$')
Validate against this rule →

National CIUS (NL) (9)

NL-R-001

fatal

For suppliers in the Netherlands, if the document is a creditnote, the document MUST contain an invoice reference.

PEPPOL BIS 3.0UBL
Technical test (XPath)
/*/cac:BillingReference/cac:InvoiceDocumentReference/cbc:ID
Validate against this rule →

NL-R-002

fatal

For suppliers in the Netherlands the supplier's address MUST contain street name, city and post code.

PEPPOL BIS 3.0UBL
Technical test (XPath)
cbc:StreetName and cbc:CityName and cbc:PostalZone
Validate against this rule →

NL-R-003

fatal

For suppliers in the Netherlands, the legal entity identifier MUST be either a KVK or OIN number (schemeID 0106 or 0190).

PEPPOL BIS 3.0UBL
Technical test (XPath)
(contains(concat(' ', string-join(@schemeID, ' '), ' '), ' 0106 ') or contains(concat(' ', string-join(@schemeID, ' '), ' '), ' 0190 ')) and (normalize-space(.) != '')
Validate against this rule →

NL-R-004

fatal

For suppliers in the Netherlands, if the customer is in the Netherlands, the customer address MUST contain the street name, the city and post code.

PEPPOL BIS 3.0UBL
Technical test (XPath)
cbc:StreetName and cbc:CityName and cbc:PostalZone
Validate against this rule →

NL-R-005

fatal

For suppliers in the Netherlands, if the customer is in the Netherlands, the customer's legal entity identifier MUST be either a KVK or OIN number.

PEPPOL BIS 3.0UBL
Technical test (XPath)
(contains(concat(' ', string-join(@schemeID, ' '), ' '), ' 0106 ') or contains(concat(' ', string-join(@schemeID, ' '), ' '), ' 0190 ')) and (normalize-space(.) != '')
Validate against this rule →

NL-R-006

fatal

For suppliers in the Netherlands, if the fiscal representative is in the Netherlands, the representative's address MUST contain street name, city and post code.

PEPPOL BIS 3.0UBL
Technical test (XPath)
cbc:StreetName and cbc:CityName and cbc:PostalZone
Validate against this rule →

NL-R-007

fatal

For suppliers in the Netherlands, the supplier MUST provide a means of payment if the payment is from customer to supplier.

PEPPOL BIS 3.0UBL
Technical test (XPath)
(/ubl-invoice:Invoice and xs:decimal(cbc:PayableAmount) <= 0.0) or (/ubl-creditnote:CreditNote and xs:decimal(cbc:PayableAmount) >= 0.0) or (//cac:PaymentMeans)
Validate against this rule →

NL-R-008

fatal

For suppliers in the Netherlands, the payment means code should be 30, 48, 49, 57, 58 or 59.

PEPPOL BIS 3.0UBL
Technical test (XPath)
normalize-space(cbc:PaymentMeansCode) = '30' or normalize-space(cbc:PaymentMeansCode) = '48' or normalize-space(cbc:PaymentMeansCode) = '49' or normalize-space(cbc:PaymentMeansCode) = '57' or normalize-space(cbc:PaymentMeansCode) = '58' or normalize-space(cbc:PaymentMeansCode) = '59'
Validate against this rule →

NL-R-009

fatal

For suppliers in the Netherlands, if an order line reference is used, there must be an order reference on the document level.

PEPPOL BIS 3.0UBL
Technical test (XPath)
exists(/*/cac:OrderReference/cbc:ID)
Validate against this rule →

National CIUS (NO) (2)

NO-R-001

fatal

Norwegian suppliers MUST provide VAT ID in correct format (12 digits + 'MVA').

PEPPOL BIS 3.0UBL
Technical test (XPath)
cac:PartyTaxScheme[normalize-space(cac:TaxScheme/cbc:ID) = 'VAT']/substring(cbc:CompanyID, 1, 2)='NO' and matches(cac:PartyTaxScheme[normalize-space(cac:TaxScheme/cbc:ID) = 'VAT']/substring(cbc:CompanyID,3), '^[0-9]{9}MVA$') and u:mod11(substring(cac:PartyTaxScheme[normalize-space(cac:TaxScheme/cbc:ID) = 'VAT']/cbc:CompanyID, 3, 9)) or not(cac:PartyTaxScheme[normalize-space(cac:TaxScheme/cbc:ID) = 'VAT']/substring(cbc:CompanyID, 1, 2)='NO')
Validate against this rule →

NO-R-002

warning

For Norwegian suppliers, most invoice issuers are required to append "Foretaksregisteret" to their registration.

PEPPOL BIS 3.0UBL
Technical test (XPath)
normalize-space(cac:PartyTaxScheme[normalize-space(cac:TaxScheme/cbc:ID) = 'TAX']/cbc:CompanyID) = 'Foretaksregisteret'
Validate against this rule →

National CIUS (SE) (13)

SE-R-001

fatal

For Swedish suppliers, Swedish VAT-numbers must consist of 14 characters.

PEPPOL BIS 3.0UBL
Technical test (XPath)
string-length(normalize-space(cac:PartyTaxScheme[cac:TaxScheme/cbc:ID = 'VAT']/cbc:CompanyID)) = 14
Validate against this rule →

SE-R-002

fatal

For Swedish suppliers, the Swedish VAT-numbers must have the trailing 12 characters in numeric form.

PEPPOL BIS 3.0UBL
Technical test (XPath)
string(number(substring(cac:PartyTaxScheme[cac:TaxScheme/cbc:ID = 'VAT']/cbc:CompanyID, 3, 12))) != 'NaN'
Validate against this rule →

SE-R-005

fatal

For Swedish suppliers, when using Seller tax registration identifier, 'Godkand for F-skatt' must be stated.

PEPPOL BIS 3.0UBL
Technical test (XPath)
normalize-space(upper-case(.)) = 'GODKÄND FÖR F-SKATT'
Validate against this rule →

SE-R-006

fatal

For Swedish suppliers, only standard VAT rate of 6, 12 or 25 are used.

PEPPOL BIS 3.0UBL
Technical test (XPath)
number(cbc:Percent) = 25 or number(cbc:Percent) = 12 or number(cbc:Percent) = 6
Validate against this rule →

SE-R-009

warning

For Swedish suppliers using Bankgiro, the Account ID must have 7-8 characters.

PEPPOL BIS 3.0UBL
Technical test (XPath)
string-length(normalize-space(.)) = 7 or string-length(normalize-space(.)) = 8
Validate against this rule →

SE-R-010

warning

For Swedish suppliers using Plusgiro, the Account ID must have 2-8 characters.

PEPPOL BIS 3.0UBL
Technical test (XPath)
string-length(normalize-space(.)) >= 2 and string-length(normalize-space(.)) <= 8
Validate against this rule →

SE-R-011

warning

For Swedish suppliers using Swedish Bankgiro or Plusgiro, the proper way to indicate this is to use Code 30 for PaymentMeans and FinancialInstitutionBranch ID with code SE:BANKGIRO or SE:PLUSGIRO.

PEPPOL BIS 3.0UBL
Technical test (XPath)
false()
Validate against this rule →

SE-R-012

warning

For domestic transactions between Swedish trading partners, credit transfer should be indicated by PaymentMeansCode="30".

PEPPOL BIS 3.0UBL
Technical test (XPath)
false()
Validate against this rule →

SE-R-013

fatal

The last digit of a Swedish organization number must be valid according to the Luhn algorithm.

PEPPOL BIS 3.0UBL
Technical test (XPath)
u:checkSEOrgnr(normalize-space(cbc:CompanyID))
Validate against this rule →

Frequently asked questions

What is a PEPPOL / EN 16931 validation rule?

It is a business rule (identified by a code such as BR-CO-13 or PEPPOL-EN16931-R008) that an e-invoice must satisfy to be valid under the EN 16931 European standard or a national CIUS such as PEPPOL BIS 3.0 or XRechnung. Validators run these rules, expressed as schematron, against the invoice XML.

What does a "fatal" rule mean versus a "warning"?

A fatal rule must pass or the invoice is rejected by the receiver. A warning flags a likely mistake but does not block the invoice. Most BR-* and PEPPOL-* rules are fatal; a small number are warnings.

How do I fix a rule violation like BR-CO-13?

Read the rule message — it states exactly which business terms (BT-/BG- codes) must be present or must add up. Correct those fields in your invoice, then re-validate. aiDoks shows the failing rule ID and message for every uploaded invoice.

Which formats use these rules?

EN 16931 is the common core. PEPPOL BIS 3.0, XRechnung, Factur-X/ZUGFeRD and national CIUS profiles (Germany, Denmark, Sweden, Italy, the Netherlands and others) add their own rules on top. This page covers all of them.

What if my rule isn't listed here?

Don't worry — this page highlights the most common rules, but our validator always checks your invoice against the complete rule set (every EN 16931, PEPPOL, XRechnung and Factur-X rule, including the syntax and code-list checks not listed here). Upload your invoice and you'll get every rule that applies, listed on this page or not.

Stop guessing why your invoice failed

Upload your UBL, CII or Factur-X invoice and aiDoks reports every failing rule by ID and message — free, no sign-up required.