Minimalist stand-alone XRechnung generator
When it comes to open-source and stand-alone applications capable of creating XML electronic invoices, there are not many options to chose from. XFakturist strives to be one of them, focussing on simple invoices with a small number of invoice items. While XFakturist is a minimalist tool to issue electronic invoices, it features the embedding of invoice attachments, like PDF documents, in the XML data. As a command-line application with incomplete documentation, XFakturist will likely only appeal to the technically savvy computer user.
XFakturist is free software that aims at creating electronic invoices that comply with the XRechnung standard. XRechnung is a German XML-based data format and semantic model (see the XRechnung FAQ). The XFakturist software is stand-alone, running locally on your own computer: it does not depend on a network connection, API or similar third-party remote service. By not sending your invoice data to somewhere in the internet, XFakturist safeguards data privacy.
Currently, XFakturist is a simple but functional tool, mostly written in Python, and must be used from the command line. It does not include a graphical user interface. The software comprises a set of commands that can be executed, for example, in the macOS Terminal.
XFakturist comes without any warranty. You may use it at your own risk. In particular, users assume full responsibility for the correctness of invoice data and monetary amounts contained in the final XML file. Furthermore, creating an XML file with XFakturist does not automatically guarantee compliance with the XRechnung standard, as this also depends on the invoice data that you are feeding into the XML creation process.
Users may want to check compliance with third-party software, for example, by employing the stand-alone and open-source validation and visualisation software published by the German governments' Coordination Office for IT Standards (KoSIT). XFakturist offers a simple installation method for these KoSIT tools as well as a basic command-line interface to use them.
Until year 2024, freelancers and small businesses were accustomed to send invoices electronically to clients or customers, in the form of human readable PDF documents. Tamper-proof and safely stored, and, if all legally required information was provided, such documents were sufficient for invoice recipients to claim input tax deduction. These PDF documents were easily created, using simple and freely available tools, and, were quickly sent by email.
Between 2025 and 2027, the German legal VAT framework will be adjusted, step-by-step, to gradually enforce mandatory electronic invoicing: after 2027, all German domestic business-to-business invoicing will have to be done by electronic (XML) data exchange. There are not many exceptions to this general rule.
While traditional PDF invoices are easily issued with common tools, creating XML data that meet the legal requirements for electronic invoicing is anything but simple.
In late 2024, a wide range of commercial software solutions existed to generate XML electronic invoices. But many of them were too complex or expensive for the simple needs of small businesses. As an alternative, some free-of-charge web applications were available for the purpose at hand, sometimes requiring registration. At the same time, open-source and stand-alone software for electronic invoicing was rare. This observation motivated the creation of XFakturist.
After a complete installation, three separate XFakturist terminal commands are available:
-
xr-compile invoice.xlsx
reads invoice data from a suitably structured XLSX workbook
invoice.xlsx
. A template for such a workbook is filetemplate.xlsx
, found in the XFakturist top level directory. Copy and rename it to insert your own invoice data. Python scriptxr-compile
is designed to create XML fileinvoice.xml
and compilation log-fileinvoice.log
. -
xr-validate invoice.xml
runs the KoSIT validator software for XML electronic invoices and creates two validation reports,
invoice_validation_report.xml
andinvoice_validation_report.html
. -
xr-convert invoice.xml
runs the KoSIT visualisation software for XML electronic invoices and creates two documents that show invoice data in a human readable format. In the example given here, these documents would have the file names
invoice_converted_de.html
andinvoice_converted_de.pdf
. Field names in these documents are in German. To obtain English language field designations, adden
as a second command-line parameter:xr-convert invoice.xml en
XFakturist also allows for reading invoice data from a JSON file, as an alternative to the spreadsheet data import. Providing invoice data in JSON format better suits automated electronic invoice creation.
xr-compile invoice.json
reads invoice data from file invoice.json
, and, creates files invoice.xml
and invoice.log
.
A template for an invoice data JSON file is template.json
, found in the XFakturist top level directory. Field designations in template files template.json
and template.xlsx
are identical.
Note, that electronic invoice generation with xr-compile
does not guarantee that the created XML file complies with the XRechnung standard. A condition for such compliance is that all mandatory invoice data are provided in a JSON file. Which data are strictly mandatory is indicated for each data field in spreadsheet file template.xlsx
.
Currently, only macOS and Linux systems are supported. MS Windows might also work if the Windows Subsystem for Linux or the Git bash are available.
Python (version 3.10 or later) must be installed on your system, for example, a current Anaconda distribution. Among the required Python packages, we highlight the following ones, which might require upgrading your Python installation:
json5
openpyxl
xmltodict
XML electronic invoice creation with command xr-compile
only requires a Python installation on your computer, and, fairly standard as well as the above listed Python packages. Download and unpack the XFakturist ZIP-file or clone the XFakturist Github repository. Make sure that Python script xr-compile
is in your search path.
To run the KoSIT validation and visualisation software, a recent version of a Java runtime environment is required, for example Eclipse Temurin JRE.
XFakturist offers the shell scripts xr-validate
and xr-convert
to run the KoSIT software. Make sure that these scripts are in your search path.
KoSIT software is not included in XFakturist. It must be downloaded and installed separately. To simplify this installation process, XFakturist provides shell script get-kosit-xr
. Run this script from the top-level XFakturist directory. It downloads and unpacks three different KoSIT software packages as well as two software dependencies, Saxonica Saxon Home Edition and Apache Formatting Objects Processor.
Four of these five packages are licensed by their respective vendors under the Apache License, Version 2.0. Software firm Saxonica also distributes its Saxon Home Edition as open source software.
After running installation script get-kosit-xr
, XFakturist shell scripts, xr-validate
and xr-convert
, should be functional.
This section represents our own interpretation of publicly available information. Be aware that it is neither legal nor tax advice.
As of 1 January 2025, the German VAT Act (Umsatzsteuergesetz) includes a definition of an electronic invoice: an invoice that is issued, transmitted and received in an electronic and structured data format. Such a format must facilitate automatic and electronic processing of invoice data. Compliance of an invoice with European Union Directive 2014/55/EU, which implicitly endorses the European standard EN 16931, will perhaps be the most common approach to satisfy the basic legal requirements of the German VAT Act. Note that the XRechnung standard builds on and extends European standard EN 16931.
In an official announcement of 15 October 2024, the Federal Ministry of Finance offered advice regarding the introduction of mandatory electronic invoicing of domestic business-to-business transactions, which started in Germany in 2025. The announcement states that, for VAT purposes, compliance with the XRechnung standard will classify respective XML data as an electronic invoice in accordance with the law.
For that reason, XFakturist was designed to generate electronic invoices that employ the XRechnung standard.
XFakturist is subject to open-source software license AGPL-3.0-only, unless you have received this program directly from the author, Dr Tim Brunne (Munich), pursuant to the terms of a commercial license agreement with the author.