{
  "id": 21137819,
  "title": "German e-invoicing for developers: XRechnung and ZUGFeRD via REST API and MCP",
  "url": "https://urgent.news/2026/11/21/german-e-invoicing-for-developers-xrechnung-and-zugferd-via-rest-api",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-21T23:32:15.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/dominikschroeter/german-e-invoicing-for-developers-xrechnung-and-zugferd-via-rest-api-and-mcp-16dl"
  },
  "original_language": "en",
  "account": "From 2027, German businesses must begin sending structured e-invoices to other businesses, with almost all having to do so by 2028. Receiving e-invoices has been mandatory since January 1, 2025. This article covers what constitutes an e-invoice, the two formats businesses will encounter (XRechnung and ZUGFeRD), how to validate them, and how to generate both formats from a single invoice object using the developers' API.\n\nKey dates:\n- January 1, 2025: All German businesses must be able to receive e-invoices.\n- January 1, 2027: Businesses with prior-year revenue of €800,000 must send domestic B2B e-invoices.\n- January 1, 2028: All other businesses must send domestic B2B e-invoices.\n\nAn e-invoice is a structured, machine-readable format that complies with the European standard EN 16931. While PDFs are not e-invoices, other agreed formats like EDI are allowed if the data can be extracted in a compatible way. Two main formats businesses will encounter are:\n- XRechnung: pure XML (UBL or CII syntax)\n- ZUGFeRD (Factur-X in France): a PDF/A-3 with the XML embedded\n\nTo validate e-invoices, two open validators are available:\n- KoSIT validator for XRechnung\n- Mustang (open-source Java library and CLI) for ZUGFeRD/Factur-X\n\nGenerating both formats from one invoice object:\n1. Create a draft invoice with the desired recipient information, e-invoice formats, service date, payment term, and line items.\n2. Finalize the draft invoice, which checks mandatory invoice fields required by §14 UStG. If something is missing, a validation_failed error is returned, and the invoice is immutable.\n3. Fetch the XRechnung format using the invoice ID. This returns the XRechnung 3.0.2 (CII) format. The JSON wrapper will include the validation results and warnings, such as missing seller contact or buyer email address.",
  "summary": "From 2027, many German businesses have to send structured e-invoices to other businesses, and from 2028 almost all of them. Receiving them has been mandatory since 1 January 2025. If you build software that creates or processes invoices for German customers, this is now your problem too. This post covers what counts as an e-invoice, the two formats you will meet, how to validate them, and how we…",
  "key_points": [
    "German businesses must send e-invoices by 2028, starting 2027 for high-revenue firms",
    "XRechnung is pure XML (UBL or CII syntax) format",
    "ZUGFeRD combines PDF/A-3 with embedded XML"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}