# Worked minimal invoice in both syntaxes
Same business fact in both permitted syntaxes: one seller in Austria, one buyer in Germany, two units at 100.00 EUR, 20 % standard-rated VAT, total 240.00 EUR. Element names and cardinalities are taken from docs.peppol.eu/poacc/billing/3.0/syntax/ubl-invoice/tree/ (UBL) and from the CEN reference example `cii/examples/CII_business_example_01.xml` in github.com/ConnectingEurope/eInvoicing-EN16931 (CII).
**Element order is part of the schema in both syntaxes.** UBL 2.1 and CII D16B are sequence-constrained; moving `cac:PaymentMeans` after `cac:TaxTotal` is a schema error, not a style question. Generate from a template or a serialiser that preserves order — never by string concatenation in arbitrary order.
Replace every `[[…]]` before use, then validate. These examples are constructed to satisfy BR-01…BR-16, BR-CO-10…BR-CO-17, BR-CO-25 and BR-CO-26; they are still not "known good" until a validator says so (`implementation.md`).
## UBL 2.1 — `ubl:Invoice`
```xml
urn:cen.eu:en16931:2017
2026-000417
2026-08-05
2026-09-04
380
EUR
[[BT-10 buyer routing reference]]
[[ATU12345678]]
[[street and number]]
[[city]]
[[postcode]]
AT
[[ATU12345678]]
VAT
[[seller legal name]]
[[FN 123456a]]
[[DE123456789]]
[[street and number]]
[[city]]
[[postcode]]
DE
[[DE123456789]]
VAT
[[buyer legal name]]
30
2026-000417
[[IBAN]]
Net 30 days
40.00
200.00
40.00
S
20
VAT
200.00
200.00
240.00
240.00
1
2
200.00
[[item name]]
S
20
VAT
100.00
```
For **Peppol BIS Billing 3.0**, three changes: `cbc:CustomizationID` becomes `urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0`, a `cbc:ProfileID` of `urn:fdc:peppol.eu:2017:poacc:billing:01:1.0` is inserted immediately after it, and `cbc:EndpointID` on both parties is mandatory with a valid EAS `schemeID` (`identifiers.md`).
For a **credit note**, the root element is `CreditNote` in namespace `urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2`, `cbc:InvoiceTypeCode` becomes `cbc:CreditNoteTypeCode` with value `381`, and `cac:InvoiceLine` becomes `cac:CreditNoteLine` with `cbc:CreditedQuantity`.
## UN/CEFACT CII D16B — `rsm:CrossIndustryInvoice`
```xml
urn:cen.eu:en16931:2017
2026-000417
380
20260805
1
[[item name]]
100.00
2
VAT
S
20
200.00
[[BT-10 buyer routing reference]]
[[seller legal name]]
[[FN 123456a]]
[[postcode]]
[[street and number]]
[[city]]
AT
[[ATU12345678]]
[[buyer legal name]]
[[postcode]]
[[street and number]]
[[city]]
DE
[[DE123456789]]
EUR
30
[[IBAN]]
40.00
VAT
200.00
S
20
Net 30 days
20260904
200.00
200.00
40.00
240.00
240.00
```
CII notes that catch people out:
- Dates are `udt:DateTimeString` with `format="102"` and value `YYYYMMDD` — not ISO `YYYY-MM-DD`.
- `ram:TaxTotalAmount` carries `currencyID`; the other monetary summation elements do not.
- `ram:ApplicableHeaderTradeDelivery` is mandatory as a container even when empty.
- A credit note in CII is not a different root element: it is `ram:TypeCode` = `381` inside the same `rsm:CrossIndustryInvoice`. This is the biggest structural difference from UBL.
- CII carries the VAT identifier in `ram:SpecifiedTaxRegistration/ram:ID` with `schemeID="VA"`; the company registration number goes in `ram:SpecifiedLegalOrganization/ram:ID`.
## Which syntax to pick
| Situation | Syntax |
|---|---|
| Peppol network, any country | UBL 2.1 in practice — Peppol BIS Billing 3.0 defines both, UBL dominates |
| Germany XRechnung | Either; UBL is the more common implementation, CII is fully supported |
| Factur-X / ZUGFeRD hybrid PDF | CII only — the embedded XML is CII D16B |
| France PDP flows | Factur-X (CII), UBL and CII all accepted as the *socle* formats |
| Italy SdI | Neither — FatturaPA is a national XML, not an EN 16931 syntax |
| You have no constraint | UBL. More tooling, more examples, more validators |
Do not build both unless a channel forces it. Build the semantic model once and serialise; the BT-/BG- numbers are the stable interface between your domain model and either syntax.
## Checkpoints
- [ ] Element order matches the schema sequence, verified by XSD validation
- [ ] `[[…]]` placeholders all resolved
- [ ] CustomizationID matches the target specification exactly
- [ ] CII dates use `format="102"` and `YYYYMMDD`
- [ ] `currencyID` present on every UBL amount and on CII `ram:TaxTotalAmount`
- [ ] Credit note modelled per syntax: separate root in UBL, type code 381 in CII
- [ ] Validated against EN 16931 Schematron and the target CIUS Schematron before shipping