XRechnung from Stripe invoices
Stripe creates PDF invoices. German businesses increasingly need XRechnung, a structured XML e-invoice. Here is how to get a valid XRechnung for every Stripe invoice without changing how you bill.
Does Stripe create XRechnung?
No. Stripe Invoicing and Stripe Billing produce invoice records and a PDF. As Stripe's documentation explains, the legal e-invoice file comes from an e-invoicing app in the Stripe App Marketplace or from your own integration built on Stripe's API and webhooks.
Who needs XRechnung, and from when
For invoices between businesses established in Germany (domestic B2B):
- since 1 January 2025 every business must be able to receive e-invoices;
- from 1 January 2027 businesses with more than €800,000 turnover in the previous year must send them;
- from 1 January 2028 everyone must send them.
Invoices up to €250 and invoices from small businesses (Kleinunternehmer) are exempt. Public authorities (B2G) already require XRechnung, usually with a Leitweg-ID. An e-invoice must follow EN 16931: XRechnung or ZUGFeRD (EN 16931 profile or higher). A PDF by email is no longer an e-invoice. See our deadlines overview.
Option 1: an app that does it automatically
Install an e-invoicing app from the Stripe App Marketplace. With Invoiceer, every invoice you finalize in Stripe becomes an XRechnung (or ZUGFeRD, your choice) within seconds. It is validated against the official KoSIT rules and attached to the invoice as a download link in its metadata. Optionally it is emailed to your customer. Belgian customers get Peppol invoices from the same app. Setup takes five minutes: setup guide.
Option 2: build it yourself
Listen for the invoice.finalized webhook, load the invoice with its customer and tax details, map it to the EN 16931 data model and serialize it as XRechnung (UBL or CII). The tricky parts are rarely the XML itself:
- Tax mapping: each Stripe tax rate and taxability reason must become a VAT category (S, Z, E, AE reverse charge, K intra-EU, G export) with an exemption reason where required.
- Rounding: line totals, VAT breakdown and invoice total must reconcile exactly with the rules BR-CO-10 to BR-CO-17.
- German rules (BR-DE): seller contact name, phone and email; a buyer reference (BT-10); payment instructions.
- Validation: test every output with the official KoSIT validator. Our free validator runs the same rules.
Leitweg-ID for public-sector customers
German authorities route XRechnung invoices by the Leitweg-ID, sent as the buyer reference (BT-10). In Invoiceer, add it once as customer metadata leitweg_id in Stripe, or per invoice as invoice metadata buyer_reference.
Invoiceer for Stripe: XRechnung, ZUGFeRD and Peppol from every Stripe invoice, validated with the official rules. Free for 5 e-invoices a month.
See the Stripe app Read the setup guide