Germany's B2B e-invoicing mandate: issuing required from Jan 2027

Pass the e-invoice mandate.
In TypeScript.

Open-source validation and generation for XRechnung / EN 16931 — plus a hosted platform that keeps you current as the rules change. Built to match the official KoSIT validator, with cryptic rule violations turned into plain-language fixes.

npm install @stampbench/core
validate.ts
import { validateUblXml } from '@stampbench/core';

const result = validateUblXml(xml);
// {
//   valid: false,
//   violations: [{
//     ruleId: "BR-DE-15",
//     severity: "error",
//     message: "Missing buyer reference (BT-10).
//       For German public-sector buyers this
//       is the Leitweg-ID…"
//   }]
// }

The official validator says [BR-DE-15]. Now what?

Millions of European businesses are being forced onto structured e-invoices, and the tooling assumes you enjoy reading Schematron. The reference stack is Java, the error messages cite clauses instead of fields, and one wrong VAT rounding rejects the whole document. Stampbench is the layer that makes it just work.

Validation that explains itself

EN 16931 core rules, the full VAT category families (BR-S/E/AE/Z/G/O), and the German XRechnung profile (BR-DE). Every violation carries the rule id, the business term, and a message written for developers — with optional AI-written fix suggestions.

Totals computed by construction

Send lines with quantities, prices and VAT categories. Stampbench derives BT-106 through BT-115 and the VAT breakdown so the BR-CO arithmetic rules pass every time — the part hand-rolled generators always get wrong.

Open source where it counts

The full rule engine is MIT-licensed — validate and generate locally, unlimited, forever. The hosted platform sells what code alone can’t promise: always-current rules without dependency upgrades, volume, and compliance posture.

Know what breaks before it breaks

Rule sets change on a published schedule — and the artefacts land before they become binding. Point Stampbench at your invoices, diff them against the next rule set, and get a ranked list of what to fix. Nobody else lets you test the future; they just switch the rules on you.

Built for the mandate wave

Germany requires all companies to receive e-invoices since 2025 and to issue them from 2027. France and others follow. Ship compliance now, before your customers ask.

Reads what Germany actually sends

Both syntaxes, auto-detected: UBL and CII — the ZUGFeRD/Factur-X XML that most German e-invoices arrive as. POST XML, get structured violations back in milliseconds. Anonymous trial calls need no signup.

One endpoint to generate

POST clean JSON, get compliant XRechnung UBL back. Factur-X PDF generation (embedded XML), Peppol BIS and FatturaPA are next on the roadmap.

Two calls, full compliance

No SDK lock-in, no XML expertise required. Anonymous trial calls work straight from your terminal.

POST /api/v1/validate
curl -s https://stampbench.com/api/v1/validate \
  -H "Content-Type: application/xml" \
  --data-binary @invoice.xml

{
  "valid": false,
  "errorCount": 2,
  "violations": [
    { "ruleId": "BR-DE-15", "severity": "error",
      "message": "Missing buyer reference (BT-10)…" },
    { "ruleId": "BR-CO-15", "severity": "error",
      "message": "Total with VAT (BT-112) should be
                  1130.50 but is 1140.50." }
  ]
}
POST /api/v1/generate
curl -s https://stampbench.com/api/v1/generate \
  -H "Content-Type: application/json" \
  -d '{ "invoice": {
        "number": "RE-2026-0043",
        "seller": { … }, "buyer": { … },
        "lines": [{ "quantity": 12,
          "price": { "netPrice": 120 },
          "vat": { "categoryCode": "S", "rate": 19 }}]
      }}'

{ "xml": "<?xml version=\"1.0\" …",
  "validation": { "valid": true } }

Don't take our word for it

A compliance tool is only worth using if it is right. Here is what we actually test — with the numbers, and the three documents we currently flag, published openly.

57
Automated tests passing
Library, CLI and API
86
Official test documents run
45 UBL + 41 CII, 0 crashes
56
Validation rules active
EN 16931 + VAT families + BR-DE
25
Review findings triaged
Adversarially verified
See the full test evidence →Security practices →MIT-licensed engine — run it locally, verify every number yourself.

Be compliant before your competitors are.

Free plan with 100 API calls a month. Unlimited local validation with the open-source library, forever.

Get it on npm