Stampbench for UK businesses

Default ruleseten16931@2017·EN 16931 core·40 rules

Stampbench does not implement a UK-specific ruleset, and we will not pretend otherwise. What it gives a UK business today is the European semantic standard — EN 16931 — plus the format-agnostic tooling around it: reading both invoice XML syntaxes, repairing what is arithmetically wrong, generating documents whose totals cannot be wrong, and the CLI, API and CI integration.

Start here

If a customer, a public body or their portal asks you for an EN 16931-compliant e-invoice, this is the ruleset that checks it — before they reject it.

What works here today

Available now, no account needed to try any of it.

Invoice validation

40 EN 16931 core rules, including the full BR-S/E/AE/Z/G/O VAT category families. Every violation carries the rule id, the business term and the line it failed on.

Reads both XML syntaxes

UBL 2.1 and UN/CEFACT CII (the syntax ZUGFeRD and Factur-X carry), auto-detected from the document.

Deterministic repair

Totals and VAT amounts that disagree with the figures they are computed from have exactly one right answer, so Stampbench corrects them in your file. Anything it cannot derive is handed back to a person.

Invoice creation from JSON

Send lines with quantities, prices and VAT categories; Stampbench computes the totals and the VAT breakdown, then emits UBL 2.1.

CLI, hosted API and CI

The same engine as an npm library, a CLI, a hosted REST API and a GitHub Action that annotates the failing line in a pull request.

Available in a specific case

Implemented, but it only applies in the situation described.

German XRechnung profile

A further 16 BR-DE rules on top of the European core — the Leitweg-ID, buyer reference and contact requirements German public buyers enforce.

Available when you invoice a German buyer — switch the market to Germany and the same document is checked against 56 rules instead of 40.

Not implemented

Listed so you can rule Stampbench out quickly if this is what you needed.

A domestic ruleset for this country

A national customisation of EN 16931 (a CIUS) with its own rules, on top of the European core.

There is no UK ruleset in the engine. If a UK customisation of EN 16931 is published, the ruleset registry is the extension point it would be added to — but nothing is implemented today.

Deciding which tax rate to charge

Stampbench checks that the tax figures in a document are internally consistent and correctly declared. It does not decide which rate applies to a transaction.

Sending invoices over a network

Transmission through Peppol or a national exchange. Stampbench validates and produces documents; delivering them is someone else’s job today.

On the command line

The same engine, as an npm package. The header line names the ruleset that ran, so a result is never ambiguous about what it was measured against.

$ npx stampbench validate invoice.xml --profile en16931

invoice.xml  syntax: UBL | profile: en16931 | ruleset: 2026-08.2
  ERROR  BR-CO-17  VAT breakdown S @ 7%: tax amount should be
         22.04 (314.86 × 7%) but is 99.99. (line 78)
INVALID — 1 error, 0 warnings (40 rules run)

Other markets

Compare every market side by side, gaps included.