XML invoice examples: UBL 2.1 and CII (Factur-X), read part by part

Six real e-invoices to download: two XML invoices under EN 16931, in CII (the XML inside a Factur-X invoice) and UBL 2.1, read part by part with their BT numbers, and four XRechnung 3.0.2 samples, among them a credit note and a ZUGFeRD PDF.

  • Updated 27 November 2026
  • 18 min read
  • In English, French and German

In short

Here are six sample invoices to download, real files with fictional data. Four of them are XRechnung invoices, the German standard, in version 3.0.2: an invoice in UBL, the same invoice in CII, a credit note in UBL, and a ZUGFeRD PDF that carries the XRechnung as the attachment xrechnung.xml. All four pass their schema, the rules of EN 16931 and the BR-DE rules of the KoSIT without a single finding. The other two, cii-d22b.xml and ubl-2.1.xml, are the same invoice under the European standard EN 16931: in CII, the XML syntax a Factur-X invoice carries inside its PDF, and in UBL 2.1, the syntax of the Peppol network.

This page first reads the two EN 16931 files part by part: the header, the seller and the buyer, a line, the VAT breakdown and the totals, the payment. Each part shows the CII extract, then the UBL one, with the number EN 16931 gives each field (BT-1, BT-2...), so you can find the same value in both. It then shows what the XRechnung samples do differently: the Leitweg-ID, the seller contact, a cash discount (Skonto), a credit note and the ZUGFeRD PDF.

To try them without downloading anything: each file opens in one click in the viewer or the validator of this site, and the converter, the viewer and the validator offer the two EN 16931 files under "Try a sample".

The sample files to download

FileWhat it isType (BT-3)Open
xrechnung-ubl.xmlXRechnung 3.0.2 in UBL 2.1Invoice (380)in the viewer · validate
xrechnung-cii.xmlThe same XRechnung in CIIInvoice (380)in the viewer · validate
xrechnung-credit-note-ubl.xmlXRechnung 3.0.2 in UBL 2.1, as a CreditNoteCredit note (381)in the viewer · validate
zugferd-xrechnung.pdfZUGFeRD PDF (PDF/A-3) in the XRECHNUNG profile, with xrechnung.xmlInvoice (380)in the viewer · validate
cii-d22b.xmlEN 16931 in CII D22B, with comments that name the fieldsInvoice (380)in the viewer · validate
ubl-2.1.xmlThe same invoice in UBL 2.1, written from the CII file by the converter of this siteInvoice (380)in the viewer · validate

The XRechnung samples are invoice RE-2026-0815 of 16 November 2026 from Lindner Büromöbel GmbH in Berlin to Musteramt Bremen, a fictional public body: four height-adjustable desks and four office chairs at 19% VAT, two books at 7%. That is 2,981.80 EUR without VAT and 3,539.97 EUR with 558.17 EUR of VAT, payable in 30 days, with a 2% discount within 10 days. Credit note GS-2026-0012 of 20 November takes back one of the chairs: 239.00 EUR without VAT, 284.41 EUR with it. The four files were checked with the rules the validator runs: their schema (UBL 2.1, and for CII the D16B schema, as the KoSIT does), the rules of EN 16931 and those of XRechnung 3.0.2. None gets an error, a warning or a notice.

The two EN 16931 files are invoice FA-2026-000342 of 15 January 2026, type 380 (a commercial invoice), from a seller in Paris to a buyer in Lyon. Their specification identifier (BT-24) is that of EN 16931 alone, urn:cen.eu:en16931:2017. Their three lines are paper and pens at 20% VAT and biscuits at 5.5%; a shipping charge is at 0%. The invoice totals 1,167.07 EUR with VAT, of which 300.00 EUR is already paid and 867.07 EUR is due. The VAT is also given in pounds sterling (GBP), the VAT accounting currency (BT-6).

The files also hold fields from outside EN 16931, those of the EXTENDED profiles: more parties (an invoicer, ram:InvoicerTradeParty, a seller's agent, a payer) and a sub-line attached to another line. They show what the converter carries over. The extracts below keep to the fields of EN 16931.

How a CII and a UBL invoice are built

A CII invoice has the root element rsm:CrossIndustryInvoice and three blocks, in this order:

  1. rsm:ExchangedDocumentContext: the specification the invoice follows (BT-24) and its business process (BT-23).
  2. rsm:ExchangedDocument: the number, the type, the issue date and the notes.
  3. rsm:SupplyChainTradeTransaction: first the lines, one ram:IncludedSupplyChainTradeLineItem each, then the agreement (ram:ApplicableHeaderTradeAgreement: seller, buyer, references), the delivery (ram:ApplicableHeaderTradeDelivery) and the settlement (ram:ApplicableHeaderTradeSettlement: currency, payment, VAT, totals).

A UBL invoice has the root element Invoice and no such blocks. The header fields and the references come first, one element each, then the parties, the delivery, the payment, the allowances and charges, the VAT (TaxTotal), the totals (LegalMonetaryTotal), and the lines (InvoiceLine) last.

The prefixes in the extracts are those of the files. In the CII file, rsm: is the namespace of the invoice, ram: that of its reusable components, udt: and qdt: those of its data types (all UN/CEFACT). In the UBL file, the basic elements have no prefix (the namespace CommonBasicComponents-2, written cbc: in most documents), the groups have ns3: (CommonAggregateComponents-2, usually cac:) and the root is ns4:Invoice; ns2:, for extensions, is declared but not used. A prefix is only a short name declared at the top of the file: ns3:Party and cac:Party are the same element. The extracts are copied from the files with the comments and some sibling elements left out; nothing is added.

The header: number, date, type and currency

In CII, the header is split between the first two blocks:

<rsm:ExchangedDocumentContext>
    <ram:BusinessProcessSpecifiedDocumentContextParameter>
        <ram:ID>B1</ram:ID>
    </ram:BusinessProcessSpecifiedDocumentContextParameter>
    <ram:GuidelineSpecifiedDocumentContextParameter>
        <ram:ID>urn:cen.eu:en16931:2017</ram:ID>
    </ram:GuidelineSpecifiedDocumentContextParameter>
</rsm:ExchangedDocumentContext>
<rsm:ExchangedDocument>
    <ram:ID>FA-2026-000342</ram:ID>
    <ram:TypeCode>380</ram:TypeCode>
    <ram:IssueDateTime>
        <udt:DateTimeString format="102">20260115</udt:DateTimeString>
    </ram:IssueDateTime>
</rsm:ExchangedDocument>

The specification identifier (BT-24) urn:cen.eu:en16931:2017 says the invoice follows EN 16931 with no further set of rules. The business process (BT-23) B1 is a code of the French reform: a goods invoice, one of the values rule BR-FR-08 accepts. Then come the invoice number (BT-1), the type code (BT-3) and the issue date (BT-2), written 20260115 with format="102": year, month, day. The currency (BT-5) is not in the header in CII: it is ram:InvoiceCurrencyCode, EUR, in the settlement block, next to ram:TaxCurrencyCode (BT-6), GBP.

In UBL, the same fields are single elements at the top of the file:

<CustomizationID>urn:cen.eu:en16931:2017</CustomizationID>
<ProfileID>B1</ProfileID>
<ID>FA-2026-000342</ID>
<IssueDate>2026-01-15</IssueDate>
<DueDate>2026-02-14</DueDate>
<InvoiceTypeCode>380</InvoiceTypeCode>
<Note>#AAI#Commande passée via notre site internet professionnel</Note>
<Note>Marchandises livrées sur le quai de réception de l'entrepôt</Note>
<DocumentCurrencyCode>EUR</DocumentCurrencyCode>
<TaxCurrencyCode>GBP</TaxCurrencyCode>
<BuyerReference>REF-Achat-0123</BuyerReference>

CustomizationID is BT-24 and ProfileID is BT-23. The date is written 2026-01-15. The due date (BT-9) sits here in UBL, and in the payment terms in CII. The two notes (BT-22) show one difference: in CII, the subject code of the first note (BT-21) is an element of its own, ram:SubjectCode with AAI; in UBL it goes between two # at the start of the note, as annex A of the French standard XP Z12-012 describes. The buyer reference (BT-10) is ram:BuyerReference in the CII agreement block.

The seller and the buyer

The seller (BG-4) in CII, in the agreement block:

<ram:SellerTradeParty>
    <ram:Name>Fournitures Bureau Excellence SAS</ram:Name>
    <ram:SpecifiedLegalOrganization>
        <ram:ID schemeID="0002">823654971</ram:ID>
    </ram:SpecifiedLegalOrganization>
    <ram:PostalTradeAddress>
        <ram:CityName>Paris</ram:CityName>
        <ram:CountryID>FR</ram:CountryID>
    </ram:PostalTradeAddress>
    <ram:URIUniversalCommunication>
        <ram:URIID schemeID="0088">5410012345676</ram:URIID>
    </ram:URIUniversalCommunication>
    <ram:SpecifiedTaxRegistration>
        <ram:ID schemeID="VA">FR20823654971</ram:ID>
    </ram:SpecifiedTaxRegistration>
</ram:SellerTradeParty>

The same seller in UBL:

<ns3:AccountingSupplierParty>
    <ns3:Party>
        <EndpointID schemeID="0088">5410012345676</EndpointID>
        <ns3:PartyTaxScheme>
            <CompanyID>FR20823654971</CompanyID>
            <ns3:TaxScheme>
                <ID>VAT</ID>
            </ns3:TaxScheme>
        </ns3:PartyTaxScheme>
        <ns3:PartyLegalEntity>
            <RegistrationName>Fournitures Bureau Excellence SAS</RegistrationName>
            <CompanyID schemeID="0002">823654971</CompanyID>
        </ns3:PartyLegalEntity>
    </ns3:Party>
</ns3:AccountingSupplierParty>

The seller's name (BT-27) is ram:Name in CII and RegistrationName in UBL, under ns3:PartyLegalEntity, next to the legal identifier (BT-30): here a SIREN, with the scheme 0002. The VAT identifier (BT-31) is marked schemeID="VA" in CII; UBL puts it in ns3:PartyTaxScheme, with the tax scheme VAT. The electronic address (BT-34), with the scheme 0088 (EAN Location Code in the code list), is ram:URIUniversalCommunication in CII and EndpointID, the first child of the party, in UBL. The seller's country (BT-40) is ram:CountryID in CII and sits in ns3:PostalAddress in UBL, left out above. The trading name (BT-28), Excellence Bureau, is left out too: ram:TradingBusinessName in CII, ns3:PartyName in UBL.

The buyer (BG-7) has the same structure, in ram:BuyerTradeParty and ns3:AccountingCustomerParty: the name Distribution Papeterie Nationale SARL (BT-44), the SIREN 419283746 (BT-47), the VAT identifier FR64419283746 (BT-48) and the electronic address 5410098765433 (BT-49).

An invoice line

In CII, each line is a ram:IncludedSupplyChainTradeLineItem, and all the lines come before the agreement block. These are the first four children of the third line: which line, what is sold, at what price and how many.

<ram:AssociatedDocumentLineDocument>
    <ram:LineID>3</ram:LineID>
</ram:AssociatedDocumentLineDocument>
<ram:SpecifiedTradeProduct>
    <ram:SellerAssignedID>BISC-ASST-001</ram:SellerAssignedID>
    <ram:Name>Assortiment de biscuits pour salle de pause</ram:Name>
</ram:SpecifiedTradeProduct>
<ram:SpecifiedLineTradeAgreement>
    <ram:NetPriceProductTradePrice>
        <ram:ChargeAmount>2.00</ram:ChargeAmount>
    </ram:NetPriceProductTradePrice>
</ram:SpecifiedLineTradeAgreement>
<ram:SpecifiedLineTradeDelivery>
    <ram:BilledQuantity unitCode="C62">500</ram:BilledQuantity>
</ram:SpecifiedLineTradeDelivery>

Its fifth child, the settlement of the line, holds its VAT and its net amount:

<ram:SpecifiedLineTradeSettlement>
    <ram:ApplicableTradeTax>
        <ram:TypeCode>VAT</ram:TypeCode>
        <ram:CategoryCode>S</ram:CategoryCode>
        <ram:RateApplicablePercent>5.5</ram:RateApplicablePercent>
    </ram:ApplicableTradeTax>
    <ram:SpecifiedTradeSettlementLineMonetarySummation>
        <ram:LineTotalAmount>1000.00</ram:LineTotalAmount>
    </ram:SpecifiedTradeSettlementLineMonetarySummation>
</ram:SpecifiedLineTradeSettlement>

In UBL, the same line is a single ns3:InvoiceLine, near the end of the file:

<ns3:InvoiceLine>
    <ID>3</ID>
    <InvoicedQuantity unitCode="C62">500</InvoicedQuantity>
    <LineExtensionAmount currencyID="EUR">1000.00</LineExtensionAmount>
    <ns3:Item>
        <Name>Assortiment de biscuits pour salle de pause</Name>
        <ns3:ClassifiedTaxCategory>
            <ID>S</ID>
            <Percent>5.5</Percent>
        </ns3:ClassifiedTaxCategory>
    </ns3:Item>
    <ns3:Price>
        <PriceAmount currencyID="EUR">2.00</PriceAmount>
    </ns3:Price>
</ns3:InvoiceLine>

The line identifier (BT-126) is 3 and the item name (BT-153) is the biscuits; the seller's item identifier (BT-155), BISC-ASST-001, is ns3:SellersItemIdentification in UBL, left out above. The quantity (BT-129) is 500, with the unit code (BT-130) C62, "one" in the code list. The net price (BT-146) is 2.00 and the line net amount (BT-131) 1000.00, that is 500 × 2.00. The VAT category code (BT-151) is S, "standard rate" in the code list, here with the rate (BT-152) 5.5; the two lines at 20% have the same category. UBL puts the VAT of the line in the item (ns3:ClassifiedTaxCategory, whose ns3:TaxScheme is left out) and repeats the currency on each amount.

The other two lines show more. Line 1 has a note and a reference to line 10 of the purchase order. Line 2 has a gross price with a price discount (BT-148, BT-147), a price per 10 units (BT-149), a line allowance and a line charge (BG-27, BG-28).

The VAT breakdown and the totals

The VAT breakdown (BG-23) has one entry per VAT category and rate. In CII, each is a ram:ApplicableTradeTax in the settlement block. The one at 20%:

<ram:ApplicableTradeTax>
    <ram:CalculatedAmount>15.01</ram:CalculatedAmount>
    <ram:TypeCode>VAT</ram:TypeCode>
    <ram:BasisAmount>75.06</ram:BasisAmount>
    <ram:CategoryCode>S</ram:CategoryCode>
    <ram:RateApplicablePercent>20</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>

In UBL, each entry is a ns3:TaxSubtotal inside ns3:TaxTotal, which also gives the total VAT. A second ns3:TaxTotal gives the VAT in the accounting currency:

<ns3:TaxTotal>
    <TaxAmount currencyID="EUR">70.01</TaxAmount>
    <ns3:TaxSubtotal>
        <TaxableAmount currencyID="EUR">75.06</TaxableAmount>
        <TaxAmount currencyID="EUR">15.01</TaxAmount>
        <ns3:TaxCategory>
            <ID>S</ID>
            <Percent>20</Percent>
        </ns3:TaxCategory>
    </ns3:TaxSubtotal>
</ns3:TaxTotal>
<ns3:TaxTotal>
    <TaxAmount currencyID="GBP">60.21</TaxAmount>
</ns3:TaxTotal>

The taxable amount (BT-116) is 75.06: the two lines at 20% (50.00 and 47.00) minus the document allowance of 21.94, which is at 20% too. The VAT amount (BT-117) is 15.01, for the category (BT-118) S and the rate (BT-119) 20. The file has two more entries, left out above: 5.5% on 1000.00 (VAT 55.00), and 0% in the category Z (zero rated goods) on the shipping charge of 22.00.

The totals (BG-22) in CII:

<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
    <ram:LineTotalAmount>1097.00</ram:LineTotalAmount>
    <ram:ChargeTotalAmount>22.00</ram:ChargeTotalAmount>
    <ram:AllowanceTotalAmount>21.94</ram:AllowanceTotalAmount>
    <ram:TaxBasisTotalAmount>1097.06</ram:TaxBasisTotalAmount>
    <ram:TaxTotalAmount currencyID="EUR">70.01</ram:TaxTotalAmount>
    <ram:TaxTotalAmount currencyID="GBP">60.21</ram:TaxTotalAmount>
    <ram:RoundingAmount>0.00</ram:RoundingAmount>
    <ram:GrandTotalAmount>1167.07</ram:GrandTotalAmount>
    <ram:TotalPrepaidAmount>300.00</ram:TotalPrepaidAmount>
    <ram:DuePayableAmount>867.07</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>

The same totals in UBL:

<ns3:LegalMonetaryTotal>
    <LineExtensionAmount currencyID="EUR">1097.00</LineExtensionAmount>
    <TaxExclusiveAmount currencyID="EUR">1097.06</TaxExclusiveAmount>
    <TaxInclusiveAmount currencyID="EUR">1167.07</TaxInclusiveAmount>
    <AllowanceTotalAmount currencyID="EUR">21.94</AllowanceTotalAmount>
    <ChargeTotalAmount currencyID="EUR">22.00</ChargeTotalAmount>
    <PrepaidAmount currencyID="EUR">300.00</PrepaidAmount>
    <PayableRoundingAmount currencyID="EUR">0.00</PayableRoundingAmount>
    <PayableAmount currencyID="EUR">867.07</PayableAmount>
</ns3:LegalMonetaryTotal>

The sum of the line net amounts (BT-106) is 1097.00, the sum of the charges (BT-108) 22.00 and that of the allowances (BT-107) 21.94. Then come the total without VAT (BT-109) 1097.06, the total VAT (BT-110) 70.01 EUR, and in the accounting currency (BT-111) 60.21 GBP, the rounding amount (BT-114) 0.00, the total with VAT (BT-112) 1167.07, the amount already paid (BT-113) 300.00 and the amount due (BT-115) 867.07. The two syntaxes give them in a different order, and in the CII totals only the VAT amounts carry a currency.

The payment

In CII, the payment instructions (BG-16) and the payment terms are in the settlement block:

<ram:SpecifiedTradeSettlementPaymentMeans>
    <ram:TypeCode>30</ram:TypeCode>
    <ram:Information>Virement bancaire</ram:Information>
    <ram:PayeePartyCreditorFinancialAccount>
        <ram:IBANID>FR7630004008250001234567890</ram:IBANID>
    </ram:PayeePartyCreditorFinancialAccount>
    <ram:PayeeSpecifiedCreditorFinancialInstitution>
        <ram:BICID>BFEXFRPPPAR</ram:BICID>
    </ram:PayeeSpecifiedCreditorFinancialInstitution>
</ram:SpecifiedTradeSettlementPaymentMeans>
<ram:SpecifiedTradePaymentTerms>
    <ram:Description>Paiement à 30 jours à compter de la date de facture</ram:Description>
    <ram:DueDateDateTime>
        <udt:DateTimeString format="102">20260214</udt:DateTimeString>
    </ram:DueDateDateTime>
</ram:SpecifiedTradePaymentTerms>

In UBL:

<ns3:PaymentMeans>
    <PaymentMeansCode name="Virement bancaire">30</PaymentMeansCode>
    <PaymentID>FA-2026-000342</PaymentID>
    <ns3:PayeeFinancialAccount>
        <ID>FR7630004008250001234567890</ID>
        <ns3:FinancialInstitutionBranch>
            <ID>BFEXFRPPPAR</ID>
        </ns3:FinancialInstitutionBranch>
    </ns3:PayeeFinancialAccount>
</ns3:PaymentMeans>
<ns3:PaymentTerms>
    <Note>Paiement à 30 jours à compter de la date de facture</Note>
</ns3:PaymentTerms>

The payment means code (BT-81) 30 is a credit transfer. Its text (BT-82), Virement bancaire, is ram:Information in CII and the name attribute of the code in UBL. Then come the payee's account, an IBAN (BT-84), and the identifier of its payment service provider, a BIC (BT-86). The payment terms (BT-20) are ram:Description in CII and Note in UBL. The due date (BT-9), 14 February 2026, is in the payment terms in CII and in the header in UBL. The remittance information (BT-83), FA-2026-000342, is PaymentID in UBL and ram:PaymentReference, in the settlement block, in CII.

What changes in a Factur-X or ZUGFeRD invoice

Under the Factur-X 1.09.2 specification (ZUGFeRD 2.5.2), a Factur-X invoice is a PDF/A-3 file (ISO 19005-3) that people can read, with the invoice attached as an XML file named factur-x.xml: a CII D22B invoice like cii-d22b.xml. ZUGFeRD is the German name of the same format: the specification says both names describe the identical data structure. The only other name it allows for the attachment is xrechnung.xml, for its XRECHNUNG reference profile.

The profile of a Factur-X invoice is its BT-24. There are five profiles, MINIMUM, BASIC WL, BASIC, EN 16931 and EXTENDED, plus the XRECHNUNG reference profile. The EN 16931 profile uses the same identifier as the example, urn:cen.eu:en16931:2017; EXTENDED uses urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended. The French reform has its own profile, EXTENDED-CTC-FR, urn:cen.eu:en16931:2017#conformant#urn.cpro.gouv.fr:1p0:extended-ctc-fr, and the converter of this site writes this identifier when it turns a Factur-X EXTENDED invoice into UBL.

Each Factur-X profile also has its own schema, narrower than the full CII D22B schema. The EN 16931 schema of Factur-X 1.09.2 does not have some of the extra fields of the example, such as ram:InvoicerTradeParty: they are in the EXTENDED schema. The validator of this site checks an XML file sent on its own against the full D22B schema, and the XML of a PDF that declares EN 16931 against the Factur-X EN 16931 schema. As it is, the example is an EN 16931 invoice in CII, not the XML of a Factur-X EN 16931 invoice.

To get the XML out of a Factur-X or ZUGFeRD PDF, use the extractor: it gives you the attached file as it is.

What the XRechnung samples do differently

An XRechnung, the German standard, is written in UBL or in CII. Its BT-24 is urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0, and the rules of the KoSIT (BR-DE) ask for more than EN 16931: the buyer reference (BT-10, rule BR-DE-15), a seller contact (BG-6) with a name, a telephone number and an email address (BR-DE-2, BR-DE-5 to BR-DE-7), payment instructions (BG-16, BR-DE-1) and the electronic addresses of the seller and the buyer (BT-34, BT-49). XRechnung 3.0.2 also takes rules from Peppol, such as PEPPOL-EN16931-R001: the business process (BT-23) must be given. The samples use that of Peppol BIS Billing 3.0, urn:fdc:peppol.eu:2017:poacc:billing:01:1.0. In CII, the KoSIT checks an XRechnung against the older CII schema D16B, not D22B, and so does the validator of this site. The XRechnung files write the UBL prefixes as most documents do: cbc: and cac:.

The Leitweg-ID and the seller contact

The start of xrechnung-ubl.xml:

<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID>
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
<cbc:ID>RE-2026-0815</cbc:ID>
<cbc:IssueDate>2026-11-16</cbc:IssueDate>
<cbc:DueDate>2026-12-16</cbc:DueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>04011000-1234512345-06</cbc:BuyerReference>

The buyer reference (BT-10) is a Leitweg-ID, the address at which a German public body receives its e-invoices. 04011000-1234512345-06 is the example of the Leitweg-ID's format specification; how a Leitweg-ID is built and how its check digits are computed is in the guide to the BR-DE rules. The seller and the buyer, without their names, addresses and VAT number:

<cac:AccountingSupplierParty>
    <cac:Party>
        <cbc:EndpointID schemeID="EM">rechnung@lindner-bueromoebel.example</cbc:EndpointID>
        <cac:Contact>
            <cbc:Name>Anna Lindner</cbc:Name>
            <cbc:Telephone>+49 30 23125 042</cbc:Telephone>
            <cbc:ElectronicMail>rechnung@lindner-bueromoebel.example</cbc:ElectronicMail>
        </cac:Contact>
    </cac:Party>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
    <cac:Party>
        <cbc:EndpointID schemeID="0204">04011000-1234512345-06</cbc:EndpointID>
    </cac:Party>
</cac:AccountingCustomerParty>

The seller's electronic address (BT-34) is an email address, with the scheme EM. The buyer's (BT-49) is its Leitweg-ID, with the scheme 0204, the code of the Leitweg-ID. The seller contact (BG-6) has the three details BR-DE-5 to BR-DE-7 ask for: a name (BT-41), a telephone number (BT-42) and an email address (BT-43). In CII they are in the seller's ram:DefinedTradeContact: ram:PersonName, ram:TelephoneUniversalCommunication/ram:CompleteNumber and ram:EmailURIUniversalCommunication/ram:URIID; the buyer reference is ram:BuyerReference in the agreement block.

A cash discount (Skonto) in the payment terms

<cac:PaymentTerms>
    <cbc:Note>#SKONTO#TAGE=10#PROZENT=2.00#
Zahlbar innerhalb von 30 Tagen ohne Abzug, innerhalb von 10 Tagen mit 2 % Skonto.</cbc:Note>
</cac:PaymentTerms>

XRechnung has no field of its own for a cash discount, Skonto in German. It writes it in a fixed form in the payment terms (BT-20), and rule BR-DE-18 checks that form: a line that begins with #, the segment SKONTO, then TAGE= with the number of days and PROZENT= with the rate, without a sign and with two decimals after a point, then # and a line break at the end. Everything is in capitals, without spaces. When the discount applies to part of the amount due (BT-115) rather than all of it, a fourth segment BASISBETRAG= gives that part, for example #SKONTO#TAGE=10#PROZENT=2.00#BASISBETRAG=2912.00#. Two discount tiers are two such lines. Lines that do not begin with # are not checked by the rule: there the sample says the same in a sentence for people, in German. A buyer who pays within 10 days here takes off 70.80 EUR and pays 3,469.17 EUR. In CII the same text is in ram:SpecifiedTradePaymentTerms/ram:Description.

The credit note: type 381

The header of xrechnung-credit-note-ubl.xml, without the identifiers BT-24 and BT-23, which are those of the invoice:

<cbc:ID>GS-2026-0012</cbc:ID>
<cbc:IssueDate>2026-11-20</cbc:IssueDate>
<cbc:CreditNoteTypeCode>381</cbc:CreditNoteTypeCode>
<cbc:Note>Rücknahme eines Bürodrehstuhls aus der Rechnung RE-2026-0815.</cbc:Note>
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
<cbc:BuyerReference>04011000-1234512345-06</cbc:BuyerReference>
<cac:OrderReference>
    <cbc:ID>BEST-2026-0042</cbc:ID>
</cac:OrderReference>
<cac:BillingReference>
    <cac:InvoiceDocumentReference>
        <cbc:ID>RE-2026-0815</cbc:ID>
        <cbc:IssueDate>2026-11-16</cbc:IssueDate>
    </cac:InvoiceDocumentReference>
</cac:BillingReference>

In UBL a credit note is a document of its own: the root element is CreditNote instead of Invoice, the type (BT-3) is in cbc:CreditNoteTypeCode, and each line is a cac:CreditNoteLine with cbc:CreditedQuantity instead of cbc:InvoicedQuantity. In CII it stays a rsm:CrossIndustryInvoice, with ram:TypeCode 381. The amounts are positive: the type says that the money goes back to the buyer.

cac:BillingReference is the preceding invoice reference (BG-3), with that invoice's number (BT-25) and date (BT-26). The only XRechnung rule that names it is for a corrected invoice, code 384: BR-DE-26 warns when it is missing there. The credit note gives it all the same, so that the buyer knows which invoice it reduces. BR-DE-1 asks for payment instructions (BG-16) in a credit note too, and with code 58, a SEPA credit transfer, BR-DE-23-a asks for an account (BG-17). The sample gives there the account the amount is refunded to, and says so in the payment terms (BT-20).

In German, "Gutschrift" has two meanings. Code 381 (credit note) is the commercial one: the seller reduces an invoice, as here. In the German VAT act, a Gutschrift is instead an invoice that the customer issues for the supplier's supply, when both agreed to it beforehand (section 14(2) UStG). Its code is 389 (self-billed invoice). Both codes are among those BR-DE-17 allows for the type: 326, 380, 381, 384, 389, 875, 876 and 877.

The ZUGFeRD PDF

zugferd-xrechnung.pdf is a PDF/A-3 file with two pages that show invoice RE-2026-0815 in German, and one attachment: xrechnung.xml, the same invoice in CII. Under the ZUGFeRD 2.5.2 specification (Factur-X 1.09.2), this is its reference profile XRECHNUNG: the attachment's BT-24 is the XRechnung identifier, and the attachment is named xrechnung.xml instead of factur-x.xml. The attachment is checked as an XRechnung in CII, with the same rules; the validator takes it out of the PDF to do so. As a PDF/A-3, at levels a and b, the file also passes veraPDF. The viewer opens it through the XML it carries, and the extractor gives you that XML as it is.

What changes in a Peppol BIS invoice

A Peppol BIS Billing 3.0 invoice is written in UBL. Its CustomizationID must begin with urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0 (rule PEPPOL-EN16931-R004), and its ProfileID (BT-23) must be a Peppol business process, for example urn:fdc:peppol.eu:2017:poacc:billing:01:1.0 (R001, R007): the B1 of the EN 16931 samples is not one. Peppol also asks for the electronic addresses of the seller and the buyer (R020, R010), a buyer reference or a purchase order reference (R003), and at most one invoice note (BT-22) unless the seller and the buyer are both German (R002). The EN 16931 samples have two notes.

Where this site fits

  • Open them. The viewer turns any of the six files into a PDF in English, French or German, with the fields of EN 16931; it opens the ZUGFeRD PDF through the XML it carries. The extra fields of the EXTENDED-CTC-FR profile are not shown yet.
  • Check them. The validator checks the schema, then the rules of the profile the file declares, EN 16931 (CEN 1.3.16) for the two EN 16931 samples, XRechnung 3.0.2 for the others. The XRechnung samples pass without a finding, the two EN 16931 samples with no error; the CII file gets warnings (CII-SR-…) for the fields it holds beyond EN 16931. You can add the rules of France or Germany: with those of France, the EN 16931 samples do not pass, as they lack the notes BR-FR-05 asks for, among others.
  • Convert them. CII to UBL writes a file like ubl-2.1.xml from cii-d22b.xml, and UBL to CII goes the other way.
  • Take the XML out of a PDF. The extractor gives you the XML attached to a Factur-X or ZUGFeRD PDF, such as zugferd-xrechnung.pdf.

The converter, the viewer and the validator offer the two EN 16931 files under "Try a sample", so you can try each tool without a file of your own. To go further: what a UBL invoice is, where each field sits in CII and in UBL, and how UBL, CII and Factur-X differ.

Sources

Last updated: 27 November 2026 · Written by CTC Engine. How the guides are written

Did this guide help you?

The guides are free and follow each new version of the rules. A small thank-you helps keep them up to date.