Guide
OSS library vs API for XRechnung
An honest comparison for product teams embedding e-invoices in Germany.
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 a library gives you
- Full control over the serialization code and dependencies
- No per-document vendor fee
- Ability to customize exotic edge cases in-process
What stays on your roadmap
- Running and interpreting the official KoSIT Schematron (the legal reference)
- Mapping cryptic BR-*/PEPPOL-* failures back to fields in your domain model
- Every XRechnung / ZUGFeRD / Peppol version bump (4.0 expected late 2026)
- Keeping UBL and CII syntaxes in sync for the same CIUS
What normbill is 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 never bill.
Try the free validator on any XML, or the playground without an account.
When to stay on a library
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 an API is 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, 25 documents/month.