If your program issues or accepts invoices, you will want to support one or both common formats. Here are some notes on this area and some example files.
I am the founder of BillingEngine, which generates many of these files, so the examples are taken from there.
Definition of e-invoices
Simply emailing a PDF does not qualify. E-invoices conform to EN 16931 and so consist of machine-readable information. In reality there are only 2 variations:
- XRechnung: XML only. A German specification based on EN 16931, required by (most) government offices.
- ZUGFeRD: a human-readable PDF plus machine-readable information. Known as Factur-X in France. However, ZUGFeRD "MINIMUM" and "BASIC WL" are explicitly excluded from being e-invoices.
Both UBL and CII are valid representations of EN 16931. Both may be used for XRechnung, but only CII is applicable to ZUGFeRD. I have only shown CII below.
When is it required?
When invoicing other companies in Germany:
- from 1 January 2025 all companies must be able to accept them;
- until 31 December 2026 invoices can still be sent on paper or, if the recipient agrees, in other formats;
- until 31 December 2027 this also applies if revenue in the previous year was no more than 800,000 EUR;
- thereafter all companies must send e-invoices.
Various exclusions apply, such as for invoices of 250 EUR or less, or §19 UStG companies issuing invoices. I am of course not a tax advisor.
Contents
In CII, all information is under a top-level CrossIndustryInvoice element. You may want to start by identifying which profile applies:
<ram:GuidelineSpecifiedDocumentContextParameter>
<ram:ID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</ram:ID>
</ram:GuidelineSpecifiedDocumentContextParameter>
Many values are identified with a "BT" number in the specification. Some of the more useful:
| Value | Location | BT |
|---|---|---|
| Invoice ID | ExchangedDocument/ID | BT-1 |
| Type | ExchangedDocument/TypeCode | BT-3 |
| Buyer reference | ApplicableHeaderTradeAgreement/BuyerReference | BT-10 |
| Total tax | .../TaxTotalAmount | BT-110 |
| Gross total | .../GrandTotalAmount | BT-112 |
| Payable | .../DuePayableAmount | BT-115 |
Pitfalls
Buyer reference: required in XRechnung. Government offices will provide a routing ID (Leitweg-ID); otherwise some other appropriate information should be supplied when invoicing other businesses.
0% tax: as well as the obvious 0 percentage and calculated amount, you should specify the applicable category and an exemption reason:
<ram:ApplicableTradeTax>
<ram:CalculatedAmount>0.00</ram:CalculatedAmount>
<ram:TypeCode>VAT</ram:TypeCode>
<ram:ExemptionReason>Gemäß § 19 UStG wird keine Umsatzsteuer berechnet.</ram:ExemptionReason>
<ram:BasisAmount>380.00</ram:BasisAmount>
<ram:CategoryCode>E</ram:CategoryCode>
<ram:RateApplicablePercent>0</ram:RateApplicablePercent>
</ram:ApplicableTradeTax>
Reversing amounts: the relevant invoice should be left intact. Instead you create another invoice, specifying 381 as the type, with positive amounts and a reference to the original invoice.
Examples
I have created various example files, available here. All information relating to customers, companies, products, and so on, is invented. As well as "normal" invoices with 1 or 2 rates of tax and a discount, there is a 0% tax example as above, a cancellation, and one where the customer has no postal code and city.
Validation
You can run validation locally using KoSIT's program, with configuration to check for conformance to XRechnung. Online, we offer our e-invoice validator and our e-invoice viewer, which displays the contents of the XML.
Are there particular aspects you have found difficult to implement?
Top comments (0)