Guide
OSS library vs API for XRechnung
An honest comparison for product teams embedding e-invoicing in Germany.
Updated on
Open-source libraries like horstoeko/zugferd and Mustangproject are excellent if you want to own XML generation. They are not the competitor that looks like “another SaaS invoice tool” — they are the real alternative to an API like normbill.
What does the library do well — and what stays with you?
| Concern | OSS library (horstoeko, Mustangproject) | normbill API |
|---|---|---|
| XML generation | You own the serializer, its dependencies and exotic edge cases | One POST request — XRechnung (UBL/CII), ZUGFeRD / Factur-X |
| Authoritative KoSIT validation | You run and interpret the official Schematron yourself | Runs on every XRechnung generate; the legal reference has the final word |
| Error mapping | Raw BR-* / PEPPOL-* messages against XML XPaths | 422 report naming the path in your JSON with a plain-language fix |
| Format version bumps (XRechnung 4.0 expected late 2026) | Your roadmap: every XRechnung / ZUGFeRD / Peppol release | Handled server-side, UBL and CII kept in sync |
| Cost model | No per-document fee; compliance engineering time in-house | Per-document plans; failed generates never billed |
What is normbill for?
You POST invoice JSON. You get compliant XRechnung (UBL or CII) or ZUGFeRD / Factur-X, validated before it reaches you. When a rule fails, the 422 report names the path in your request — e.g. invoice.buyer_reference — with a plain-language fix. Validation is free within fair use; failed generates are never billed.
Try the free validator on any XML, or the playground without an account.
When is a library the right call?
You have (or want) an in-house compliance engineer, you already run KoSIT in CI, and your invoice shapes are stable. Then a library can be the right call.
When is an API cheaper?
You are a SaaS embedding invoices for tenants, you do not want Schematron on the critical path, or you need the same report shape for generate and validate. That is the normbill use case — free key, 50 documents/month.