An open API service indexing awesome lists of open source software.

https://github.com/gflohr/e-invoice-eu

πŸ‡ͺπŸ‡Ί πŸ’Ά Generate e-invoices (E-Rechnung in German) conforming to EN16931 (Factur-X/ZUGFeRD, UBL, CII, XRechnung aka X-Rechnung) from LibreOffice Calc/Excel data or JSON.
https://github.com/gflohr/e-invoice-eu

cii e-invoice e-rechnung en16931 factur-x nestjs nodejs pdfa ubl xrechnung zugferd

Last synced: 3 months ago
JSON representation

πŸ‡ͺπŸ‡Ί πŸ’Ά Generate e-invoices (E-Rechnung in German) conforming to EN16931 (Factur-X/ZUGFeRD, UBL, CII, XRechnung aka X-Rechnung) from LibreOffice Calc/Excel data or JSON.

Awesome Lists containing this project

README

          



[![licence](https://img.shields.io/badge/licence-WTFPL-blue)](http://www.wtfpl.net/)
[![price](https://img.shields.io/badge/price-FREE-green)](https://github.com/gflohr/e-invoice-eu/blob/main/LICENSE)
[![coverage](https://img.shields.io/coverallsCoverage/github/gflohr/e-invoice-eu?branch=main)](https://coveralls.io/github/gflohr/e-invoice-eu?branch=main)
[![downloads](https://img.shields.io/npm/dw/%40e-invoice-eu%2Fcore)](https://www.npmjs.com/package/@e-invoice-eu/core)
[![documentation](https://img.shields.io/badge/documentation-read-green)](https://gflohr.github.io/e-invoice-eu)
[![help](https://img.shields.io/badge/help-ask--a--question-green)](https://notebooklm.google.com/notebook/f5783dde-ebe6-4610-bac1-f181fdf45f94)
[![listed on](https://img.shields.io/badge/listed%20on-awesome--europe-ffcc00?logo=europeanunion&logoColor=ffcc00&labelColor=003399)](https://github.com/GeiserX/awesome-europe#readme)
[![stand with](https://img.shields.io/badge/stand%20with-UkraineπŸ‡ΊπŸ‡¦-ffc107)](https://www.standwithukraineeurope.com/en/)

# E-Invoice-EU

Free and open source tool chain for generating EN16931 conforming e-invoices
(Factur-X/ZUGFeRD, UBL, CII, XRechnung) from popular spreadsheet formats or
JSON with free and open source software.

- [Why?](#why)
- [How?](#how)
- [What?](#what)
- [Description](#description)
- [Documentation](#documentation)
- [Validation](#validation)
- [BUGS](#bugs)
- [PDF/A](#pdfa)
- [Reporting Bugs](#reporting-bugs)
- [Copyright](#copyright)
- [Disclaimer](#disclaimer)

## Why?

Electronic invoicing in the EU is mandatory, but most available solutions are
proprietary, commercial, closed, and costly. E-Invoice-EU takes a different approach:

- βœ… **100% free & open source** – no licence fees, no vendor lock-in
- βœ… **Standards-compliant** – EN16931, Factur-X, ZUGFeRD, UBL, CII, XRechnung
- βœ… **Flexible integration** – use the CLI tool, the REST API, or the TypeScript/JavaScript library
- βœ… **Modern ERP-friendly** – JSON-based input/output makes it trivial to integrate into any contemporary ERP infrastructure
- βœ… **Proven in production** – already used by organizations ranging from freelancers to multinational enterprises

Whether you need to automate a few invoices per month or integrate e-invoicing
into a large-scale workflow: E-Invoice-EU gives you a reliable foundation.

## How?

There are several ways to use the software:

- a [commandline tool `e-invoice-eu`](apps/cli/README.md)
- a [web service with a RESTful API](apps/server/README.md)
- a [JavaScript/TypeScript library](packages/core/README.md)

The JavaScript/TypeScript library works both on the commandline and in the
browser. The only limitation of the browser version is that it cannot generate
PDF versions of invoices from spreadsheet data because this requires invocation
of [LibreOffice](https://www.libreoffice.org/) which is not possible in the
browser. Instead, you have to provide a PDF version yourself, in case it is
needed.

The [E-Invoice-EU documentation](https://gflohr.github.io/e-invoice-eu/)
contains a [fully working demo of invoice generation right in your
browser](https://gflohr.github.io/e-invoice-eu/en/docs/other/browser-example/).

## What?

You can currently create e-invoices in these formats:

- `CII`: customization id `urn:cen.eu:en16931:2017`
- `Factur-X-Minimum` customization id `urn:factur-x.eu:1p0:minimum`
- `Factur-X-BasicWL` customization id `urn:factur-x.eu:1p0:basicwl`
- `Factur-X-Basic-WL` is an alias for `Factur-X-BasicWL`
- `Factur-X-Basic` customization id `'urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:basic'`
- `Factur-X-EN16931` customization id `urn:cen.eu:en16931:2017`
- `Factur-X-Comfort` is an alias for `Factur-X-EN16931`
- `Factur-X-Extended` customization id `urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended`
- `Factur-X-XRechung` customization id `urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0`
- `UBL`: customization customization id `urn:cen.eu:en16931:2017`
- `XRECHNUNG-CII`: customization id `urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0`
- `XRECHNUNG-UBL`: customization id `urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0`
- `ZUGFeRD-Minimum` is an alias for `Factur-X-Minimum`
- `ZUGFeRD-BasicWL` is an alias for `Factur-X-BasicWL`
- `ZUGFeRD-Basic-WL` is an alias for `Factur-X-BasicWL`
- `ZUGFeRD-Basic` is an alias for `Factur-X-Basic`
- `ZUGFeRD-EN16931` is an alias for `Factur-X-EN16931`
- `ZUGFeRD-Comfort` is an alias for `Factur-X-EN16931`
- `ZUGFeRD-Extended` is an alias for `Factur-X-Extended`
- `ZUGFeRD-XRechnung` is an alias for `Factur-X-XRechnung`

Case does not matter, when you specify a format.

## Description

This repository is an attempt to aid businesses, especially in France and
Germany but also in other parts of the European Union to create e-invoices
conforming with EN16931 with only free and open-source software.

## Documentation

See the [E-Invoice-EU online documentation](https://gflohr.github.io/e-invoice-eu/).

The blog post
[Creating E-Invoices with Free and Open Source
Software](https://www.guido-flohr.net/creating-electronic-invoices-with-free-and-open-source-software/)
or the German version [Elektronische Rechnungen mit freier und quelloffener Software erzeugen](https://www.guido-flohr.net/elektronische-rechnungen-mit-freier-und-quelloffener-software-erzeugen/)
also provides in-depth information using a gentler approach!

You can also use the documentation interactively by asking questions in
natural language. See https://gflohr.github.io/e-invoice-eu/en/docs/basics/ai-supported-documentation/
or go directly to https://notebooklm.google.com/notebook/f5783dde-ebe6-4610-bac1-f181fdf45f94.

## Validation

It is strongly recommended that you validate all incoming and outgoing e-invoices.
See [Validation](./contrib/validators) for details.

A new and very simple option is offered by the sister project to this one,
[e-invoice-eu-validator](https://github.com/gflohr/e-invoice-eu-validator).

## BUGS

### PDF/A

The Factur-X resp. ZUGFeRD standard requires PDF/A compliance for the PDF that
the invoice is wrapped in. Please search the internet if you do not know what
PDF/A means.

This library creates PDFs solely with [`pdf-lib`](https://github.com/cantoo-scribe/pdf-lib)
and does some pretty complicated transformations on the PDF to achieve PDF/A
compliance. This is not battle tested and may fail.

If you encounter a PDF that does not meet the PDF/A requirements, please
open an issue and attach an anonymized version of the PDF. What you can do
in the meantime:

- If you have [GhostScript](https://www.ghostscript.com/) installed, convert the PDF to PDF/A with this command: `gs -dVERBOSE -dPDFA=3 -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=OUTPUT_FILE.pdf PDFA_def.ps INPUT_FILE.pdf`
- Try to create the PDF again with [LibreOffice](https://www.libreoffice.org/).
- If the normal settings in LibreOffice do not work, enable PDF/A support (in the General section of the PDF options).
- If you want to automate the process, you can start LibreOffice in headless mode on the commandline: `libreoffice --headless "-env:UserInstallation=file:///tmp/LibreOffice_Conversion_${USER}" --convert-to 'pdf:writer_pdf_Export:{"SelectPdfVersion":{"type":"long","value":"3"}}' SOURCE_FILE.ods`

On Un\*x systems, `libreoffice` should be in your `$PATH`. On MacOS, you will
find it under `/Applications/LibreOffice.app/Contents/MacOS/soffice`. On
MS Windows, it is probably somewhere like `C:\\Program Files\\LibreOffice\\libreoffice.exe` (corrections are welcome).

## Reporting Bugs

Please report bugs at https://github.com/gflohr/e-invoice-eu/issues.

## Copyright

Copyright (C) 2024-2026 Guido Flohr , all
rights reserved.

This is free software available under the terms of the
[WTFPL](http://www.wtfpl.net/).

## Disclaimer

This free software has been written with the greatest possible care, but like
all software it may contain errors. Use at your own risk! There is no
warranty and no liability.