Create XRechnung with Laravel and PHP
The German standard based on EN 16931, mandatory for invoices to federal authorities. With Quittio it is a one-line change.
What is XRechnung?
XRechnung is the German standard for e-invoices based on EN 16931. It is plain XML in CII or UBL syntax, with additional German rules (BR-DE). Invoices to authorities need the Leitweg-ID as buyer reference.
Who is it for?
- Invoices to German federal and many state authorities
- Businesses that want plain XML without a PDF
- Systems that process invoices automatically
How it works with Quittio
use Quittio\Core\Builder\Party;
use Quittio\Laravel\Facades\Quittio;
$result = Quittio::invoice()
->number('RE-2026-0042')
->deliveryDate('2026-09-30')
->buyer(Party::make('Kunde AG')
->vatId('DE987654321')
->address('Bahnhofstraße 5', '54321', 'Beispielstadt', 'DE'))
->line('Web development', netPrice: '95.00', quantity: 24)
->buyerReference('04011000-12345-03') // Leitweg-ID of the authority
->format('xrechnung-cii')
->render();Checked with: KoSIT validator with the official XRechnung configuration
Sample files: RE-2026-0042-xrechnung-cii.xml, RE-2026-0042-xrechnung-ubl.xml, KoSIT validation report
Profiles and variants
- xrechnung-ciiCII syntax
- xrechnung-ublUBL syntax
- ZUGFeRD profile XRECHNUNGXRechnung embedded in a PDF
Version 3.0, BR-DE rules from the German country pack.
Questions about XRechnung
What is a Leitweg-ID?
The routing address of the authority. It goes into the XRechnung as buyer reference (BT-10). If it is missing, Quittio reports rule BR-DE-15.
CII or UBL?
Both are equivalent. Use whatever your recipient or their portal prefers; with Quittio it is just a different format name.
Do I need a PDF as well?
No, the XRechnung is the invoice. An additional visual PDF is possible but should not be mistaken for a second invoice.
When which invoice becomes mandatory is explained in our guide to the German e-invoicing mandate.