# Rechnung2XML — https://rechnung2xml.de Rechnung2XML converts German invoices into valid e-invoices. Upload an invoice file; the service extracts the invoice data, generates an XRechnung 3.0 (EN 16931, CII syntax) XML plus a ZUGFeRD PDF, and checks every generated invoice with the official KoSIT validator (the German government's validation tool, operated by the KoSIT office in Bremen). Note: invoices are "checked with the official KoSIT validator" — there is no government certification or authorization of this service, and none is claimed. ## Why this exists Germany's e-invoicing mandate (Wachstumschancengesetz / §14 UStG): receiving e-invoices has been mandatory since 1 January 2025. Issuing e-invoices becomes mandatory on 1 January 2027 for businesses with more than EUR 800,000 prior-year revenue, and on 1 January 2028 for all businesses. A plain PDF is not an e-invoice; the structured XML is. ## Inputs and outputs - Accepted inputs: PDF invoices (with text layer or scanned), photos / scans (PNG, JPG — OCR), Word (.docx) and Excel (.xlsx, .xls) invoices — or the invoice data itself as JSON, for callers (e.g. an AI assistant) that have already read the invoice (see `POST /api/v1/invoices`). - Outputs: XRechnung 3.0 XML and a ZUGFeRD PDF (the XML embedded in the original PDF; only for PDF inputs). - A free web validator (check an existing XRechnung/ZUGFeRD file) and a free viewer (read a received e-invoice) are also available. ## API (for programs and AI agents) Base URL: https://rechnung2xml.de/api/v1 Authentication: `Authorization: Bearer ` on every request. API keys are self-serve: any account holder creates their personal key in their account at https://rechnung2xml.de/konto (shown once, stored as a SHA-256 hash only). The key draws on the account's own plan — free accounts share the 10 free conversions/month with the website; day pass and Pro are unlimited (see https://rechnung2xml.de/api). Endpoints: - `POST /api/v1/convert` — multipart upload, form field `file`. Runs the full pipeline (extraction + generation + KoSIT validation). There is no human review step in the API, so the JSON response contains the extracted fields for you to verify, plus the validation verdict. If validation fails, the response has `status: "invalid"` and the KoSIT findings (code, original message, plain-German explanation) — never treat a result as a valid invoice unless `validation.valid` is true. Response: job_id, status ("valid" | "invalid"), extracted fields, validation, download URLs, usage. Optional form field `profile`: "xrechnung" (default) or "en16931" — see below. - `POST /api/v1/invoices` — send the invoice DATA as a JSON object (no file): the same data shape the converter's review step uses — invoice_number, issue_date, delivery_date, due_date (ISO dates), buyer_reference, seller{ name, street, zip, city, country, email, contact_name, phone, vat_id, iban }, buyer{ name, street, zip, city, country, email, vat_id (optional) }, items[ { name, quantity, unit (UN/ECE code, default C62), unit_price (net), vat_rate (percent) } ], optional currency (default EUR) and vat_mode ("standard", "kleinunternehmer", "exempt", "reverse_charge"). Totals are computed from the items — do not send sums. Rechnung2XML generates the XRechnung XML + ZUGFeRD PDF and KoSIT-validates them; the response is the same job payload as /convert (plus `source: "data-in"`). An optional `source_invoice_pdf` field (Base64) supplies the visual layer of the ZUGFeRD PDF; without it, a plain invoice PDF is rendered from the data. If required fields are missing, the answer is HTTP 422 with `missing` (dotted field paths), `missing_labels` (German) and `invalid` (present-but-unusable values) — no job is created and no conversion is counted. Complete data that KoSIT rejects returns 201 with `status: "invalid"` and the itemised findings, exactly like /convert. Same auth and quota rules as /convert. An optional JSON field `profile` ("xrechnung" | "en16931") selects the result profile — see below. - Result profile (`profile`, both POST endpoints): "xrechnung" is the default and requires the buyer reference (buyer_reference, BT-10 / Leitweg-ID): /invoices answers 422 without it, /convert produces a result KoSIT rejects (BR-DE-15). "en16931" generates the ZUGFeRD/EN 16931 result instead: EN 16931 does not require BT-10, so when the buyer reference is the ONLY missing field, the request succeeds and returns a KoSIT-valid EN 16931 invoice — the same fallback the website offers. Every other required field stays required under "en16931", and no placeholder buyer reference is ever invented. The job payload reports the profile used in its `profile` field. Any other profile value is answered 400 (`invalid_profile`). - `GET /api/v1/jobs/` — the same payload for a previous job. - `GET /api/v1/jobs//xml` — download the XRechnung XML. - `GET /api/v1/jobs//pdf` — download the ZUGFeRD PDF. - `GET /api/v1/usage` — the key's plan and conversions used/remaining. Jobs belong to the key that created them; other keys cannot read them (404). Uploaded files and results are deleted automatically 7 days after upload. A KoSIT validation run takes roughly 15–30 seconds, so a conversion call can take that long — set generous timeouts. Example: curl -X POST https://rechnung2xml.de/api/v1/convert \ -H "Authorization: Bearer " \ -F "file=@rechnung.pdf" curl -X POST https://rechnung2xml.de/api/v1/invoices \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"invoice_number": "RE-2026-0147", "issue_date": "2026-11-24", "delivery_date": "2026-11-20", "due_date": "2026-12-24", "buyer_reference": "EINKAUF-2026-118", "seller": {"name": "Nordlicht Bau GmbH", "street": "Musterstraße 12", "zip": "20354", "city": "Hamburg", "email": "rechnungen@nordlicht-bau.example", "contact_name": "Rechnungsabteilung", "phone": "+49 40 123456-0", "vat_id": "DE311456789", "iban": "DE89370400440532013000"}, "buyer": {"name": "Küsten Handel GmbH", "street": "Am Sandtorkai 41", "zip": "20457", "city": "Hamburg", "email": "einkauf@kuesten-handel.example"}, "items": [{"name": "Montageleistung Fenster, 2. OG", "quantity": 10, "unit": "HUR", "unit_price": 68.0, "vat_rate": 19}]}' ## Pricing - Free: 10 conversions per calendar month. - Day pass: EUR 2.99 (incl. VAT) for 24 hours of unlimited conversions. - Pro: EUR 5.99 per month or EUR 49 per year (incl. VAT), unlimited conversions. - Partner pool for firms converting for their clients (plus VAT): Starter up to 100 conversions per month, EUR 19/month; Standard up to 400 conversions per month, EUR 39/month; Large up to 1,200 conversions per month, EUR 79/month; Above 1,200 — custom pricing depending on needs, contact service@rechnung2xml.de. - The validator and the viewer are free. Web purchases run through Stripe's hosted checkout (Stripe Payments Europe, Ireland); card data is entered on Stripe's page only. API keys are issued manually by the operator after arrangement by email. ## Privacy and processing facts - Hosted in Nuremberg, Germany (Hetzner). No data leaves Germany for the conversion itself. - Extraction and conversion themselves use no AI/ML models: they are deterministic (PDF text extraction, Tesseract OCR for scans, fixed extraction rules, the official KoSIT validator). Separately, Pro, day-pass and partner-pool users may explicitly opt in to an AI re-read (Mistral AI SAS, France, EU processing): only the extracted invoice text is sent, only to suggest values for fields the deterministic extraction could not find; every suggestion is verified, marked as an AI suggestion, and never applied automatically. - Uploaded files and generated results are deleted after download via the website, and in all cases at the latest 7 days after upload. API keys store only a SHA-256 hash of the key plus the label, plan and conversion counters needed for quota accounting — no invoice content is stored with a key. - Analytics on the website is cookieless and self-hosted (GoatCounter). ## Links - Convert (web): https://rechnung2xml.de/konvertieren - Free validator: https://rechnung2xml.de/validator - Free viewer: https://rechnung2xml.de/viewer - API documentation: https://rechnung2xml.de/api - Partner program for bookkeepers and tax advisors (free own-use key, client conversion pool, client discount code): https://rechnung2xml.de/partner - Privacy: https://rechnung2xml.de/datenschutz - Imprint: https://rechnung2xml.de/impressum - Contact: service@rechnung2xml.de