---
title: "Create XRechnung with Laravel and PHP · Quittio"
description: "Create XRechnung 3.0 with Laravel: CII or UBL, Leitweg-ID, BR-DE rules, checked with the official KoSIT validator."
canonical_url: "https://quittio.dev/en/formats/xrechnung"
locale: en
meta:
  "og:description": "Create XRechnung 3.0 with Laravel: CII or UBL, Leitweg-ID, BR-DE rules, checked with the official KoSIT validator."
  "og:image": "https://quittio.dev/og/quittio-en.jpg"
  "og:image:alt": "Quittio: Invoices, settled. E-invoicing for PHP and Laravel, with a validated sample invoice."
  "og:image:height": "630"
  "og:image:type": image/jpeg
  "og:image:width": "1200"
  "og:title": "Create XRechnung with Laravel and PHP · Quittio"
  "twitter:image": "https://quittio.dev/og/quittio-en.jpg"
  "twitter:image:alt": "Quittio: Invoices, settled. E-invoicing for PHP and Laravel, with a validated sample invoice."
---

> Index of every page on this site: [llms.txt](https://quittio.dev/llms.txt)

# 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.

[**Get started**](https://docs.quittio.dev/getting-started) [**Formats in the docs**](https://docs.quittio.dev/formats)

## 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

InvoiceService.php

```
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](https://quittio.dev/samples/RE-2026-0042-xrechnung-cii.xml), [RE-2026-0042-xrechnung-ubl.xml](https://quittio.dev/samples/RE-2026-0042-xrechnung-ubl.xml), [KoSIT validation report](https://quittio.dev/samples/RE-2026-0042-kosit.html)

## Profiles and variants

- **xrechnung-cii**CII syntax
- **xrechnung-ubl**UBL syntax
- **ZUGFeRD profile XRECHNUNG**XRechnung 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](https://quittio.dev/en/e-invoicing-mandate-germany).

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://quittio.dev/en#website","@type":"WebSite","description":"E-invoicing for PHP and Laravel: create, validate, read and archive ZUGFeRD, XRechnung and Peppol invoices.","inLanguage":"en","name":"Quittio","url":"https://quittio.dev/en","publisher":{"@id":"https://quittio.dev/#identity"},"translationOfWork":{"@id":"https://quittio.dev/#website"}},{"@id":"https://quittio.dev/en/formats/xrechnung#webpage","@type":"WebPage","dateModified":"2026-10-15","datePublished":"2026-10-15","description":"Create XRechnung 3.0 with Laravel: CII or UBL, Leitweg-ID, BR-DE rules, checked with the official KoSIT validator.","name":"Create XRechnung with Laravel and PHP","url":"https://quittio.dev/en/formats/xrechnung","breadcrumb":{"@id":"https://quittio.dev/en/formats/xrechnung#breadcrumb"},"isPartOf":{"@id":"https://quittio.dev/en#website"},"potentialAction":[{"@type":"ReadAction","target":["https://quittio.dev/en/formats/xrechnung"]}],"primaryImageOfPage":{"@id":"https://quittio.dev/#logo"}},{"@id":"https://quittio.dev/#identity","@type":"Organization","description":"Open-Source-Bibliothek für E-Rechnungen in PHP und Laravel (ZUGFeRD, XRechnung, Peppol) und Quittio Managed.","email":"kontakt@niklasforst.de","legalName":"Niklas Forst – Softwareentwicklung","name":"Quittio","url":"https://quittio.dev","founder":{"@type":"Person","name":"Niklas Forst","url":"https://quittio.dev/ueber"},"logo":{"@id":"https://quittio.dev/#logo"},"sameAs":["https://github.com/Quittio/quittio","https://packagist.org/packages/quittio/quittio"]},{"@id":"https://quittio.dev/en/formats/xrechnung#article","dateModified":"2026-10-15","datePublished":"2026-10-15","description":"Create XRechnung 3.0 with Laravel: CII or UBL, Leitweg-ID, BR-DE rules, checked with the official KoSIT validator.","headline":"Create XRechnung with Laravel and PHP","inLanguage":"en","thumbnailUrl":"https://quittio.dev/og/quittio-en.jpg","@type":["Article","TechArticle"],"author":{"@id":"https://quittio.dev/#/schema/person/1"},"image":{"@id":"https://quittio.dev/#/schema/image/1"},"isPartOf":{"@id":"https://quittio.dev/en/formats/xrechnung#webpage"},"mainEntityOfPage":{"@id":"https://quittio.dev/en/formats/xrechnung#webpage"},"publisher":{"@id":"https://quittio.dev/#identity"}},{"@id":"https://quittio.dev/en/formats/xrechnung#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://quittio.dev/en","position":1},{"@type":"ListItem","name":"Formats","item":"https://quittio.dev/en/formats","position":2},{"@type":"ListItem","name":"XRechnung","position":3}]},{"@id":"https://quittio.dev/en/formats/xrechnung#/schema/question/1","@type":"Question","inLanguage":"en","name":"What is a Leitweg-ID?","acceptedAnswer":{"@type":"Answer","text":"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."}},{"@id":"https://quittio.dev/en/formats/xrechnung#/schema/question/2","@type":"Question","inLanguage":"en","name":"CII or UBL?","acceptedAnswer":{"@type":"Answer","text":"Both are equivalent. Use whatever your recipient or their portal prefers; with Quittio it is just a different format name."}},{"@id":"https://quittio.dev/en/formats/xrechnung#/schema/question/3","@type":"Question","inLanguage":"en","name":"Do I need a PDF as well?","acceptedAnswer":{"@type":"Answer","text":"No, the XRechnung is the invoice. An additional visual PDF is possible but should not be mistaken for a second invoice."}},{"@id":"https://quittio.dev/#/schema/person/1","@type":"Person","name":"Niklas Forst","url":"https://quittio.dev/ueber"},{"@id":"https://quittio.dev/#logo","@type":"ImageObject","caption":"Quittio","contentUrl":"https://quittio.dev/logo.png","inLanguage":"en","url":"https://quittio.dev/logo.png"},{"@id":"https://quittio.dev/#/schema/image/1","@type":"ImageObject","contentUrl":"https://quittio.dev/og/quittio-en.jpg","inLanguage":"en","url":"https://quittio.dev/og/quittio-en.jpg"}]}
```