The invoice-compliance engine for software with EU-bound invoices
Generate and validate XRechnung, Factur-X and Peppol BIS — with errors that teach the regulation. When a document fails you get the rule ID, the business term, what the rule requires and the fix, instead of a schematron assertion number.
1. The library
@attestwire/en16931 is an open-source TypeScript
implementation of the EN 16931 semantic model and its national
restrictions. JSON in, conformant XML out — or an invoice in, a list of
teaching errors out. No network calls, no account, runs anywhere
JavaScript runs.
pre-release · v0.1.0 Not on npm yet. The shapes below are the shipped shapes.
import { validateInput } from "@attestwire/en16931";
const result = validateInput({
profile: "xrechnung-ubl",
invoiceNumber: "2026-000142",
issueDate: "2026-08-09",
currency: "EUR",
invoiceTypeCode: "380",
seller: {
name: "Acme GmbH",
vatId: "DE123456789",
address: {
line1: "Chausseestr. 1",
city: "Berlin",
postalCode: "10115",
countryCode: "DE",
},
electronicAddress: { schemeId: "0204", value: "04011000-1234512345-06" },
contact: {
name: "Buchhaltung",
phone: "+49 30 1234567",
email: "rechnungen@acme.example",
},
},
buyer: {
name: "Stadt Bonn",
vatId: "DE987654321",
address: {
line1: "Berliner Platz 2",
city: "Bonn",
postalCode: "53111",
countryCode: "DE",
},
electronicAddress: { schemeId: "0204", value: "04011000-1234512345-06" },
},
lines: [
{
id: "1",
description: "Consulting, August 2026",
quantity: 10,
unitCode: "HUR",
unitPrice: 150,
vatCategory: "S",
vatRate: 19,
},
],
payment: { meansCode: "58", iban: "DE02120300000000202051" },
paymentTerms: "30 days net",
});
result.valid; // false
result.errors[0]; // the object below{
"rule": "BR-DE-15",
"field": "BT-10",
"severity": "fatal",
"message": "XRechnung requires a buyer reference (BT-10). For German public-sector buyers this is the Leitweg-ID; business buyers may supply any reference, but the field must be present.",
"fix": "Ask your client for their Leitweg-ID (public sector) or an order/customer reference, and set buyerReference.",
"example": "\"buyerReference\": \"04011000-1234512345-06\"",
"xpath": "/ubl:Invoice/cbc:BuyerReference",
"docsUrl": "https://attestwire.com/rules/BR-DE-15"
}
Every field there is load-bearing. rule and
field are the identifiers your customer's tax adviser and
their portal's rejection notice will use. message states
the requirement, fix states the action, xpath
points at the element in the generated document, and
docsUrl resolves to a page on this site — the same URL
whether the error surfaced in your CI, in a log line, or inside an
agent's tool call.
58 rules are implemented and documented so far, across EN 16931 core, the German XRechnung CIUS and Peppol BIS 3. Browse the reference. Each page says where our check is stricter or looser than the published rule, because a validator you cannot calibrate is not much use.
2. The hosted API
The same engine behind an HTTP endpoint, for teams who would rather not run validation in their own stack: post an invoice, get the XML or the teaching errors back. Not open yet. Leave an address and we send one email when the beta opens — no drip sequence, no newsletter.
3. Free tools
Standalone utilities, no signup. They are plainly named because people arrive at them from a search, not from here.
- French E-Invoicing Checker live Look up any French company and check whether it is registered with an approved e-invoicing platform in the official DGFiP directory — every step explained in English.
-
EU VAT number status
building
A VIES lookup that records the consultation
number and the date, so you can evidence that a customer's VAT ID was
valid on the day you invoiced. It will live at
status.attestwire.com; it is not deployed, so this is deliberately not a link.
The dates that force this
Context, not urgency. Verify against the primary source before you plan a roadmap around any of them.
| Where | When | What changes |
|---|---|---|
| France | 1 September 2026 | Every French VAT-registered business must be able to receive e-invoices. No size test. Issuing phases in from the same date for large and mid-size firms, 2027 for the rest. |
| Germany | 2027 and 2028 | Receiving domestic B2B e-invoices has been mandatory since January 2025. Issuing starts 1 January 2027 above €800,000 prior-year turnover, 1 January 2028 for everyone else. |
| Poland | Live | KSeF has been mandatory since 1 February 2026 for taxpayers over PLN 200m and 1 April 2026 for the rest. It uses the national FA(3) schema, not EN 16931 — a separate mapping. |
| United Kingdom | 1 April 2029 | Announced at the Autumn Budget 2025: structured e-invoicing for VAT invoices, B2B and B2G, with technical detail due in the 2026 roadmap. |
What this is not
Attestwire does not transmit invoices. We do not operate a Peppol access point, a French PDP or a KSeF connection, and we do not intend to — that is a regulated, capital-intensive business with different economics. We produce and check the document; your access point moves it. The library's output is shaped to be handed straight to one.