XRechnung & ZUGFeRD E-Rechnung for WooCommerce
XRechnung & ZUGFeRD E-Rechnung for WooCommerce
Description
Since 2025 every business in Germany must be able to receive e-invoices; from 2027/2028 B2B invoices must be issued as e-invoices. This plugin connects WooCommerce to the external xrechnung.dev service, which turns an order into an EN 16931 e-invoice:
- ZUGFeRD 2.x (PDF/A-3 with embedded XML) for business customers – the PDF looks like a normal invoice, the recipient’s software reads the XML.
- XRechnung 3.0 (pure XML) for public-sector customers, with Leitweg-ID.
- Every invoice is checked by the official KoSIT validator before it is returned.
- Attached to the order e-mail, downloadable in My Account (“My orders”) and in the order admin, manual regeneration.
- Small-business rule (§ 19 UStG), VAT rates 19 %/7 %/0 %, shipping and fees as line items, HPOS compatible.
Nothing is sent before you opt in. After activation the plugin is idle until you tick “Verbindung zu xrechnung.dev” in WooCommerce Settings E-Rechnung. See “External services” below for exactly what is sent and when.
The plugin itself is free (GPL) and has no locked features. Invoice generation is done by xrechnung.dev, a metered service: 30 documents per month are free without an account; for more you need an API key (paid plan). If the service refuses a request (for example because the monthly quota is used up), the plugin shows the service’s message in the order notes and in the order’s E-Rechnung box.
Deutsch: E-Rechnung für WooCommerce – XRechnung und ZUGFeRD (EN 16931) automatisch zu jeder Bestellung, geprüft mit dem KoSIT-Validator, als Anhang der Bestell-E-Mail und als Download im Kundenkonto. Die Benutzeroberfläche des Plugins ist auf Deutsch.
External services
This plugin relies on a third-party service, the xrechnung.dev API, operated by xrechnung.dev (https://xrechnung.dev). It is only contacted after an administrator has enabled the setting “Verbindung zu xrechnung.dev” (default: off).
What it is used for: converting WooCommerce order data into a validated ZUGFeRD PDF or XRechnung XML file.
Endpoints and when they are called:
POST https://xrechnung.dev/v1/invoices– when an order reaches the configured trigger status (default “Completed”), when a customer order e-mail is sent for an order that has no e-invoice yet (only if “attach to e-mail” is on and the trigger is not “manual”), or when an administrator clicks “E-Rechnung erzeugen” / “Neu erzeugen” on an order.GET https://xrechnung.dev/v1/usage– when an administrator opens the plugin’s settings tab, to show the monthly document count.
What data is sent with each invoice: the seller details from the settings (company name, address, VAT ID or tax number, e-mail, phone, IBAN, BIC, payment terms) and the order’s invoice data: customer name or company name, billing address, customer e-mail, customer VAT ID (if stored on the order), Leitweg-ID (if set), order number and date, payment method title, line items, quantities, prices, VAT rates, shipping and fees. If you entered an API key, it is sent in the X-Api-Key header. As with any HTTP request, the service also sees your server’s IP address; without an API key the free quota is counted per IP address.
Pricing of the service (net, per month): free – 30 documents without an account; Starter – 19 € for 200 documents; Pro – 40 € for 1,000; Business – 99 € for 5,000; Unlimited – 499 €. Current prices: https://xrechnung.dev/#pricing
- Terms of service: https://xrechnung.dev/agb.html
- Privacy policy: https://xrechnung.dev/datenschutz.html
Installation
- Install and activate the plugin (WooCommerce must be active).
- WooCommerce Settings tab E-Rechnung: enter the seller details (name, address, VAT ID or tax number, e-mail, phone, IBAN).
- Choose the format and the trigger status (default: ZUGFeRD on “Completed”).
- Tick Verbindung zu xrechnung.dev to allow the plugin to send invoice data to the service. Until then, nothing is sent.
- Optional: enter an xrechnung.dev API key if you need more than 30 invoices per month.
Faq
No. It sends nothing until you enable “Verbindung zu xrechnung.dev” in the settings.
According to xrechnung.dev, invoice data is processed only to generate the document and is not stored afterwards (see the privacy policy). The finished file is stored in your WordPress uploads directory (folder xrechnung, with a random file name and an .htaccess deny rule; on nginx, block that folder in your server config).
The service returns an error, and the plugin shows that message on the order. All plugin settings and existing invoice files stay available. Add an API key or wait for the next month.
As order meta _xrwc_leitweg_id (e.g. via a checkout-field plugin or the xrwc_invoice_payload filter).
Yes, via the xrwc_invoice_payload filter (e.g. custom number ranges from an invoice-number plugin).
Reviews
Changelog
0.2.1
- Readme and settings text: the free tier of xrechnung.dev is now 30 documents per month.
0.2.0
- New: explicit opt-in setting “Verbindung zu xrechnung.dev” (default off). No request is made to xrechnung.dev before it is enabled.
- Readme: full description of the external service, data sent, pricing, terms and privacy links.
- Plugin renamed to “XRechnung & ZUGFeRD E-Rechnung for WooCommerce”; “Requires Plugins: woocommerce” header.
0.1.0
- First release: ZUGFeRD/XRechnung generation, e-mail attachment, downloads, settings, HPOS.