SummandValidate XRechnung, ZUGFeRD and Factur-X e-invoices against EN 16931 in pure TypeScript: in Node, the browser and at the edge, without Java.
pnpm add @sweberdev/summandGermany requires businesses to receive e-invoices since 1 January 2025, and to send them from 2027. Checking an XRechnung or ZUGFeRD invoice has so far meant the KoSIT validator: Java, Saxon and a server. Summand runs the same official XML Schemas and rule sets in pure TypeScript, so you can check invoices in your Node backend, in a serverless function, in the browser before upload, or in CI.
Summand ships its own XPath 2.0 and Schematron engine and the official EN 16931 rules from CEN (UBL and CII) and the XRechnung rules from KoSIT, including the severity changes KoSIT applies for the standard, extension and CVD profiles. It passes all 1'142 CEN rule tests and every invoice of the KoSIT test suite. It reads the XML embedded in ZUGFeRD and Factur-X PDFs, recognises the profile, checks Leitweg-IDs and reports every finding with rule, message, XPath and line. Summand checks invoices technically; it is not tax advice.
Example
A short exampleCopy it into your project.
app/api/invoices/route.ts
import { validateInvoice } from "@sweberdev/summand"
export async function POST(req: Request) {
const bytes = new Uint8Array(await req.arrayBuffer()) // XML or ZUGFeRD PDF
const result = validateInvoice(bytes)
if (!result.valid) {
return Response.json({ errors: result.errors }, { status: 422 })
}
return Response.json({ profile: result.profile?.label, invoice: result.summary })
}Features
What you getFree under MIT, with Pro on top.
Free, MIT
- Validates XRechnung, ZUGFeRD, Factur-X and Peppol BIS with the official rule sets
- Passes all 1'142 CEN rule tests and the KoSIT test suite
- Every finding with rule ID, XPath and line number
- English and German messages, Leitweg-ID check
- Pure TypeScript for Node, browsers and workers, plus a CLI
Pro
- Everything in Free
- Reads any invoice into one typed object and shows it as readable HTML
- Batch and inbox-folder validation, export to DATEV, Lexoffice and sevDesk
- Writes XRechnung and ZUGFeRD invoices as PDF/A-3
- Validation service as a Docker image with a REST API
- Workbench: register, check, approve and archive invoices with named users
All features in detail
Free, MIT
- Official rule sets: CEN EN 16931 1.3.16 for UBL and CII, KoSIT XRechnung 2.6.0 for XRechnung 3.0, with KoSIT's severity changes for standard, extension and CVD
- Passes all 1'142 CEN rule tests and every invoice of the KoSIT test suite
- UBL Invoice, UBL Credit Note and UN/CEFACT CII, detected automatically
- XML Schema check (OASIS UBL 2.1, UN/CEFACT CII D16B) before the rules, like the KoSIT validator: wrong order, missing or unknown elements, bad dates and amounts
- ZUGFeRD 2.x and Factur-X PDFs: reads the embedded XML and compares the profile in the PDF metadata with the XML
- Profiles recognised: XRechnung, Peppol BIS, EN 16931, Factur-X MINIMUM, BASIC WL, BASIC and EXTENDED
- Leitweg-ID check with ISO 7064 check digits
- Every finding with rule ID, message, XPath and line number; an invoice summary with number, parties and totals
- Messages in English or German for every rule, from code (lang: "de") or the CLI (--lang de)
- Pure TypeScript with its own XPath 2.0 and Schematron engine: Node, browsers, workers and edge runtimes, no Java
- Rule set versions at hand: ruleSetInfo() and `summand rules` list what is bundled, `summand rules --check` tells you whether CEN or KoSIT published something newer
- Choose rule sets and versions with one option: ruleSets: ["en16931", "xrechnung@2.5.0"]
- validateMany for folders and batches with a worker pool; a real gain on large invoices, not on many small ones
- Fast on big invoices: 1,000 lines in about half a second, 5,000 lines in a few seconds
- summand CLI: validate, extract the XML from a PDF, check a Leitweg-ID, list and check rule sets
Pro
- Read any invoice into one typed object with all EN 16931 business terms, from UBL or CII, XML or PDF
- Show invoices as readable, printable HTML in German or English, with the validation report
- Validate whole folders: JSON, CSV, JUnit and HTML reports, duplicate detection and a hash-chained audit log
- Watch an inbox folder: every new invoice is checked once it is fully written and sorted into valid, invalid and duplicate
- Export valid purchase invoices as a DATEV booking batch (EXTF 700, SKR03 or SKR04) for your tax advisor
- Export valid purchase invoices as voucher payloads for the Lexoffice and sevDesk APIs, plus an overview CSV (you post them yourself; no credentials stored)
- Fetch invoices straight from a mailbox over IMAP or Microsoft 365 and drop the XML and PDF attachments into the inbox folder
- Write a real A4 PDF of every invoice, PDF/A-3b with the original XML attached, so XRechnung and ZUGFeRD CII invoices stay valid ZUGFeRD files
- Write e-invoices from a typed invoice object: XRechnung and EN 16931 as UBL or CII, always checked with Summand, with exact VAT and total calculation and ZUGFeRD PDFs
- Write all ZUGFeRD / Factur-X profiles (MINIMUM to EXTENDED), credit notes, partial and final invoices and Skonto, with a clear statement of what the validator could check
- Approval workflow and a tamper-evident archive for received invoices (beta; not reviewed by a tax advisor)
- Validation service as a Docker image with a REST API (validate, batch, rule sets, health, OpenAPI, optional API key), so PHP, Java, .NET and Python stacks can use the validator
- Webhooks (signed, with retries) and mail notifications for approvals and deadlines (beta, tested against local test servers)
- Send e-invoices by SMTP after they were validated (beta, tested against a local test server; no Peppol)
- Evidence bundle from the archive: original, validation result, workflow events and a manifest with SHA-256 that a third party can verify (beta; not reviewed by a tax advisor)
- Check incoming invoices against purchase orders and goods receipts: quantities, prices, VAT and totals within tolerances you set, partial invoices tracked, every difference with a stable code in German or English
- Workbench in the validation service: named users register received invoices in the browser, check and approve them with the four-eyes rule, and export them with an evidence bundle (roles reviewer, approver, admin; German and English; the approval workflow is stable from 3.0)
| Feature | Free | Pro |
|---|---|---|
| EN 16931 and XRechnung validation, UBL and CII | Included | Included |
| ZUGFeRD and Factur-X PDFs, Leitweg-ID check, CLI | Included | Included |
| Typed invoice object with all business terms | Summary only | Included |
| Readable HTML view with validation report | Not included | Included |
| Batch validation, duplicates, audit log | Not included | Included |
| Workbench: four-eyes approval and archive in the browser | Not included | Included |
| Licence | MIT | Per person |
| Support | GitHub issues | Agency and Lifetime |
Pro
Pro packagesAdd-ons on top of the core.
@weber-development/summand-readReads XRechnung, ZUGFeRD and Factur-X (UBL or CII, XML or PDF) into one typed Invoice object: parties, lines, VAT breakdown, allowances and charges, payment details, references and attachments.
@weber-development/summand-viewRenders an invoice as readable, printable HTML in German or English, or as an A4 PDF/A-3b with the validation report and the original XML attached. What your users look at before they approve an invoice.
@weber-development/summand-inboxValidates folders of invoices from the command line or your code, watches an inbox folder, or fetches invoices straight from a mailbox (IMAP or Microsoft 365), and sorts each new invoice into valid, invalid and duplicate: JSON, CSV, JUnit and HTML reports, duplicate detection across runs, an audit log with a SHA-256 per file and a DATEV booking batch export, and a PDF for every valid invoice, and converts invoices between UBL and CII, and matches invoices against purchase orders.
@weber-development/summand-writeWrites an Invoice object as XRechnung or EN 16931 e-invoice in UBL 2.1 or CII D16B and checks the result with Summand before it returns, so you never send out an invalid invoice by accident. Can calculate line amounts, the VAT breakdown and totals with exact decimal arithmetic, and produce a ZUGFeRD / Factur-X PDF.
@weber-development/summand-matchChecks an invoice against the purchase order it belongs to, and against a goods receipt for a three-way match. Pairs the lines in an explainable way, compares quantity, unit, price, VAT and totals within tolerances you set, tracks what is still open on partial invoices and reports every difference with a stable code, in German or English. Orders load from JSON or CSV.
@weber-development/summand-serverThe Summand validator as an HTTP service for PHP, Java, .NET, Python and every other stack: POST /v1/validate, batch, rule sets, health checks and an OpenAPI file, as a Docker image or a Node.js process. Since 3.0 it also runs the workbench: a browser page and API where named users (reviewer, approver, admin) register received invoices, check and approve them with the four-eyes rule, and export them with an evidence bundle. The workbench is off unless you configure it.
Pricing
PricingPrices are in CHF.
Freelancer
For one person working on client projects.
CHF 190
per year
2 months free
- 1 person
- No support entitlement
Agency
RecommendedFor teams of up to ten named people, one price.
CHF 590
per year
2 months free
- Up to 10 people
- Support included
Lifetime
Pay once for up to ten people and keep updates and repository access.
CHF 1’990
one-time
- Up to 10 people
- Support included
11 people or more: get in touch
- Pay yearly and get two months free: CHF 190 instead of CHF 228 for Freelancer, CHF 590 instead of CHF 708 for Agency.
- After cancelling, every version you already received keeps working. Only updates and repository access end.
- No licence key, no phone-home. The Pro packages never contact a server to check your licence.
- Agency and Lifetime cover up to ten named people for one price: you choose the number of seats at checkout and assign them in Polar. Your clients and their websites need no licence of their own.
- Checkout, invoices and VAT are handled by Polar as merchant of record.
FAQ
QuestionsShort answers.
Does Summand replace the KoSIT validator?
Yes, for what the KoSIT validator checks: since 0.3.0 Summand first checks the official XML Schema (UBL 2.1 or CII D16B), then runs the same official Schematron files, and it passes the KoSIT test suite. Its schema check gives the same valid or invalid verdict as the Xerces engine KoSIT uses on more than 4,000 test documents. What it does not produce is KoSIT's HTML report format.
Which formats does Summand accept?
XRechnung 3.0 in UBL and CII, ZUGFeRD 2.x and Factur-X as PDF or XML, Peppol BIS and plain EN 16931 invoices. ZUGFeRD 1.0 predates EN 16931 and is reported as unsupported. Factur-X MINIMUM and BASIC WL are recognised but are not full invoices under EN 16931, which Summand says in the result.
Does an invoice that passes meet the German VAT rules?
Not automatically. Summand checks the technical rules of EN 16931 and XRechnung. Whether an invoice is correct for VAT purposes, for example the tax rate or an exemption, is a question for your accounting or tax adviser.
Does Summand send invoices anywhere?
No. It runs where you call it: on your server, in your function or in the browser. Nothing is uploaded, and the Pro packages do not contact a licence server either.
Why are the rule sets under other licences?
Summand's code is MIT. The bundled rules are the official artefacts: EN 16931 from CEN under the EUPL 1.2 and XRechnung from KoSIT under the Apache License 2.0. Both allow this use; the notices ship with the package.
Articles
ArticlesGuides and release notes.
2026-10-06
Validating XRechnung and ZUGFeRD without Java: how the KoSIT validator works, and how to do it in TypeScriptE-invoices must be valid before you send or book them. What the official validator actually does in two steps, why a schema check alone is not enough, and how to run both steps in Node.js, in CI and in the browser.