Guide · Invoice Parsing · Automation

Germany's 2027 E-Invoice Deadline: XRechnung, ZUGFeRD, and Suppliers Who Still Send PDFs

By Othmane M., founder of DocuParse API

2026-11-21 · 7 min read

German businesses have been able to receive e-invoices since the start of 2025, which for most of them meant doing nothing in particular. The dates that force a change are the next two.

From 1 January 2027, a domestic business whose turnover in the previous calendar year was above €800,000 must issue structured e-invoices for domestic B2B transactions. From 1 January 2028, every other domestic business must do the same. Both dates come from the Growth Opportunities Act and the amendments it made to §14 of the German VAT Act (Advisori, Sovos).

Checked on 21 November 2026. Industry and policy representatives confirmed at the Berlin E-Invoicing Summit in June 2026 that the rollout remains on track, with no postponement expected, but re-check before planning around it.

If you receive invoices from German suppliers, the practical consequence is that your inbox splits in two for about a year, and then mostly converges.

Who is in scope, and when

The threshold is measured on the previous calendar year, so the question for 1 January 2027 is what a supplier turned over in 2026 — a number that is being decided right now and that you cannot see from outside.

That has a mundane consequence for anyone building a process: you cannot reliably predict which of your German suppliers switch in 2027 and which in 2028. Plan to accept both routes from every German supplier for the whole of 2027, rather than trying to maintain a list.

The mandate covers transactions where both parties are established in Germany. An invoice from a German supplier to a French customer is not in scope of these rules, and neither is an invoice from a foreign supplier to a German customer.

XRechnung and ZUGFeRD are not the same problem

Both formats satisfy the mandate, and both follow EN 16931, but they behave completely differently once they arrive.

XRechnung is pure XML. There is nothing to look at. Opening one in a reader shows markup, which is why the tax administration provides a viewer. For software this is the easy case: the fields are named, the date is unambiguous, and nothing has to be inferred from a layout.

ZUGFeRD is a hybrid. It is a PDF/A file with the invoice XML embedded inside it as an attachment. A person opens it and sees an ordinary invoice page. Software opens it and reads the XML.

The hybrid is where money gets wasted, because a ZUGFeRD file looks exactly like a PDF to every existing process. If your pipeline sends everything that arrives as a PDF to document parsing, it will happily parse the rendered page of a file that was carrying perfect structured data all along — slower, less reliable, and billed.

Read the attachment before you parse the page

The rule is simple: for any incoming PDF, look for an embedded invoice XML first, and only fall back to parsing the page if there isn't one.

The attachment's filename varies between ZUGFeRD and Factur-X versions, so match a set of known names and fall back to any XML attachment rather than hard-coding one:

python · 24 lines
from pypdf import PdfReader

KNOWN_NAMES = {
    "factur-x.xml",
    "zugferd-invoice.xml",
    "xrechnung.xml",
    "order-x.xml",
}

def embedded_invoice_xml(pdf_path):
    """Return the embedded invoice XML from a hybrid PDF, or None."""
    reader = PdfReader(pdf_path)
    attachments = reader.attachments or {}

    for name, payloads in attachments.items():
        if name.lower() in KNOWN_NAMES and payloads:
            return payloads[0].decode("utf-8")

    # Fall back to any XML attachment: newer profiles rename the file.
    for name, payloads in attachments.items():
        if name.lower().endswith(".xml") and payloads:
            return payloads[0].decode("utf-8")

    return None

And the branch that decides what happens to each document:

python · 19 lines
import os
import requests

API_KEY = os.environ["DOCUPARSE_API_KEY"]

def ingest(pdf_path):
    xml = embedded_invoice_xml(pdf_path)
    if xml is not None:
        return ("structured", xml)        # map the XML fields directly

    with open(pdf_path, "rb") as handle:  # no embedded data: parse the page
        response = requests.post(
            "https://docuparseapi.com/api/v1/extract",
            headers={"Authorization": f"Bearer {API_KEY}"},
            files={"file": handle},
            timeout=30,
        )
    response.raise_for_status()
    return ("parsed", response.json()["document_id"])

Submitting a document returns a document_id; the extracted fields are fetched from GET /api/v1/documents/{document_id} or delivered to a webhook when the document finishes. The full flow, with polling and the webhook alternative, is in the Python tutorial, and the fields you get back are listed in the invoice JSON schema.

Map both branches to the same field names. The whole point of doing this work now is that by 2028 nothing downstream should know or care which branch a given invoice came through.

One thing to check on any parser you pilot

German invoices test number handling in a way British and American ones do not. We keep a few sample invoices for testing our own extraction, chosen because they are awkward rather than tidy. One of them prints a quantity as 5,00, a unit price as 342,00 and an amount as 2 000,00 — comma decimals, and a space where an English invoice would put a comma.

Those came back from our own pipeline as "quantity": 5, "price": "342.00" and "2000.00". That conversion is where hand-typed data and naive scripts go wrong, and they go wrong by a factor of a hundred or a thousand rather than by a rounding error, so the result looks obviously wrong only if somebody is looking. It is the first thing worth checking when you pilot any parser on European documents, ours included.

The duplicate that 2027 will create

Expect this one. A supplier switches to structured invoicing, and for a few months also emails the human-readable PDF to the contact they have always emailed — a courtesy, and sometimes a hedge against the new channel failing.

If the structured invoice is picked up by one process and the PDF by another, the bill is recorded twice. Match on supplier plus invoice number before anything is written, and treat the structured file as the invoice of record. The checks and the code are in detecting duplicate invoices and receipts.

A ZUGFeRD file carries the same risk inside a single file: parse the page and read the XML without deciding which wins, and one invoice becomes two records.

What is left to parse after 2028

Being honest about this is more useful than selling against it.

Once the 2028 date passes, invoices between German businesses are structured, and if your suppliers are all domestic German companies, document parsing stops being your bottleneck. Put the effort into the receiving route instead.

What the mandate does not touch:

  • Receipts and expense claims. Fuel, hotels, restaurants, taxis, everything an employee photographs. Entirely out of scope, in Germany and everywhere else.
  • Suppliers established outside Germany. They keep sending PDFs until the EU's cross-border requirement arrives in July 2030, and longer if they are outside the EU.
  • The transition itself. Through 2027, smaller suppliers are still issuing PDFs, legitimately.
  • Your archive. Invoices already received keep the format they arrived in, for the whole retention period.

That is the realistic 2027 picture: structured XML from your larger German suppliers, PDFs from the smaller ones, PDFs from everyone abroad, and photographs of receipts from your own staff. The country timeline for the rest of Europe is in our e-invoicing mandates guide.

A short checklist

  1. Accept both routes from every German supplier for all of 2027; do not try to track who crossed €800,000.
  2. Check every incoming PDF for an embedded invoice XML before parsing the page.
  3. Map structured and parsed invoices to one set of field names.
  4. Turn on duplicate checks on supplier plus invoice number before the first supplier switches.
  5. Keep unstructured capture for receipts and foreign suppliers — see what we parse, or try it on one of your own documents without an account.

Sign up free for 20 documents a month, no credit card.

More from the blog

All posts →