E-invoice API: create, validate, convert

XRechnung, ZUGFeRD and Factur-X from one HTTP call each, for shops, ERPs, automation workflows and AI agents that cannot run a Java or Node library.

CreatePlain JSON in (seller, buyer, lines, VAT rate, IBAN), XRechnung XML or a ZUGFeRD / Factur-X PDF out. Line totals, VAT breakdown and totals are computed and checked first.
ValidateEvery broken business rule with its number (BR-DE-15, BR-CO-15), the figures from your file and the fix. 103 rules.
Convert to JSONAn incoming e-invoice (XML, or the PDF with the XML inside) as JSON: parties, lines, VAT, totals, bank account. Exact values, no AI.

Validate an e-invoice now

Up to 5 MB. Read in memory for this one request and not stored.

Create an XRechnung from JSON

curl -X POST "https://agent-data-tools.revmesh2074.workers.dev/einvoice/create" \
  -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" \
  -d '{
 "format": "xrechnung",
 "invoice": {
  "number": "RE-2026-0042",
  "issueDate": "2026-11-14",
  "dueDate": "2026-12-14",
  "buyerReference": "04011000-12345-06",
  "seller": {
   "name": "Muster Software GmbH",
   "vatId": "DE123456789",
   "street": "Hauptstrasse 1",
   "postCode": "10115",
   "city": "Berlin",
   "country": "DE",
   "contactName": "Erika Muster",
   "phone": "+49 30 1234567",
   "email": "rechnung@muster-software.example"
  },
  "buyer": {
   "name": "Kunde AG",
   "street": "Marktplatz 5",
   "postCode": "20095",
   "city": "Hamburg",
   "country": "DE",
   "email": "einkauf@kunde.example"
  },
  "lines": [
   {
    "name": "Beratung",
    "quantity": 8,
    "unit": "HUR",
    "unitPrice": 120,
    "vatRate": 19
   },
   {
    "name": "Softwarelizenz",
    "quantity": 1,
    "unitPrice": 49.9,
    "vatRate": 19
   }
  ],
  "payment": {
   "iban": "DE02120300000000202051",
   "terms": "Zahlbar innerhalb von 30 Tagen"
  }
 }
}'

format: xrechnung (CII), xrechnung-ubl, zugferd-pdf (a readable PDF/A-3 invoice with the XML inside, returned as pdfBase64), zugferd (the factur-x.xml alone) or ubl. Data that breaks a rule is refused with the rule numbers and is not charged.

Validate or convert a file

curl -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/xml" \
  --data-binary @invoice.xml "https://agent-data-tools.revmesh2074.workers.dev/einvoice/validate"

curl -H "Authorization: Bearer $API_KEY" \
  "https://agent-data-tools.revmesh2074.workers.dev/einvoice/to-json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fitplr-kosit%2Fxrechnung-testsuite%2Fmaster%2Fsrc%2Ftest%2Fbusiness-cases%2Fstandard%2F01.01a-INVOICE_uncefact.xml"

Read paper and PDF invoices too

An invoice that is only a PDF or a scan has no XML to convert. Invoice data extraction reads its fields as JSON, and those fields can be passed to Create as they are.

Pricing

Each call counts as one ordinary call of your key. Keys and monthly plans: pricing. A failed or refused call is never charged.

What it does not do

Questions

Which formats does it handle?

XRechnung 3.0 in both syntaxes (UN/CEFACT CII and UBL), the XML of ZUGFeRD 2.x and Factur-X in the EN 16931 profile, and other EN 16931 UBL or CII invoices such as Peppol BIS Billing 3.0. A ZUGFeRD or Factur-X PDF can be sent as it is: the embedded XML is read.

Does it create the ZUGFeRD PDF?

Yes, with format zugferd-pdf: a readable A4 invoice with the factur-x.xml embedded, built to PDF/A-3b with embedded fonts. The layout is plain and fixed (no logo, no custom design), and the file has not been certified by a PDF/A validator. It does not attach XML to a PDF you made yourself.

Is this the official validator?

No. It runs a subset of the EN 16931 and XRechnung 3.0 business rules, listed on the rules page, and explains each failure. A file that passes here can still fail the official KoSIT validator, which also checks the XML schema and every code list.

When do German companies have to issue e-invoices?

As the law stands on 14 November 2026: companies with more than EUR 800,000 turnover in the previous year from 1 January 2027, all companies from 1 January 2028, for invoices between businesses in Germany. Receiving e-invoices has been mandatory since 1 January 2025. A postponement has been proposed; check the current state with your tax adviser.

Are my invoices stored?

No. A file is read in memory for the one request and is not stored or logged.