đ¨ In this article, youâll find all important details regarding e-invoices (XRechnung) and ZUGFeRD! đ¨
As soon as an order is in production, it can be invoiced. Regardless of the current status of the product, you always start the billing process from the billing area.
Within Accounting/Billing, you can search directly for orders, products, or keywords and create the post-calculation right away.
Invoices can be marked as paid either manually in the user interface or automatically via the API.
For example, your accounting system can pass payment information directly to Keyline and update invoices automatically.
For more details, please refer to our Knowledgebase article on the API.
Invoices are sent to the general email address by default.
If an additional contact person is specified, the invoice will be sent directly to that contact, with a copy sent to the general email address.
You can manage these email addresses under âOrganizations.â
Via Accounting / Outgoing Invoices, you will find not only all invoiced documents, but you can also perform a CSV export for your accounting.
Keyline always exports all currently filtered records.
This means you can apply filtersâfor example by time period or by customerâand export exactly the selected data.
If you need a completely custom date range, you can also manually adjust it directly in the URL at the top.
You can create invoices in Keyline at any time, even without an associated order.
Simply go to Accounting / Outgoing Invoices and create a new invoice or credit note.
All data, parameters, and invoice line itemsâincluding descriptions and booking categoriesâcan be entered manually.
All invoices generated in Keyline comply with the XRechnung and ZUGFeRD standards.
You can download the XML file directly via the user interface, as well as the PDF, which already includes the embedded XML.
To enable XML generation, certain information must be configured in the admin area, such as VAT ID, managing director, and other required company details.
You can also retrieve the XML via the API:
ttps://app.keyline-mis.com/api/v2/accounting/customer_invoices/{invoice_ID}Header:
Accept application/xml
The complete recipient address is part of the XML. Make sure that the correct billing address is stored.
In addition, only one reference per product and per order is supported. Keyline includes the first reference in the XML.
Remove Girocode from Invoices
By default, the girocode is automatically displayed on invoices.
If you do not want the girocode to appear, you can easily remove it in the corresponding document template:
đ Open the invoice document template and delete the following code block.
{% if invoice.has_bank_account? %}
<table>
<tr>
<td colspan="2"><hr></td>
</tr>
<tr>
<td colspan="2"><strong>GiroCode</strong> - Zahlen via Banking-App</td>
</tr>
<tr>
<td rowspan="2">
{{ invoice | girocode_tag: 4 }}
</td>
<td>
<strong>Konto / Zahlbar an</strong><br>
{{ invoice.business_unit_name }}
<br>
{{ invoice.bank_name }}
<br>
{{ invoice.iban }}
<br><br>
<strong>Referenz</strong><br>
{{ invoice.number }}
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
<table>
<tr>
<td>
<strong>Betrag:</strong>
{{ invoice.gross_total }}
<br>
<strong>Währung:</strong>
{{ invoice.currency }}
</td>
</tr>
</table>
</td>
<td></td>
</tr>
</table>
{% endif %}After saving, the girocode will no longer be displayed on newly generated invoices.
đ¨ Special notes for e-invoices / ZUGFeRD:
For each organization, you can store the electronic invoice address.
This field is also referred to as BT-10 or routing ID (Leitweg-ID).
You can add references on the order level, which will then be automatically included in the XML.
These references can also optionally be entered directly on the invoice.
BuyerReference is populated based on the following priority:
If a routing ID (electronic invoice address on the organization) is available â this is used
If not, the first entry from custom_references is used
If neither is available, the customer number is used
BT-13 â Purchase Order Reference
Definition:
This field contains the purchase order number provided by the buyer.
Usage:
It is used to clearly assign the invoice to a prior order or purchase.
In the XML, it appears under IssuerAssignedID.
Mandatory:
If the customer provides a purchase order number, it must be included in the e-invoice under BT-13.
BT-19 â Buyer Accounting Reference
Definition:
This field specifies how the invoice should be recorded in the buyerâs accounting system.
Usage:
It allows the buyer to internally assign the invoice correctly, for example to a cost center or project.
In the XML, it appears under ReceivableSpecifiedTradeAccountingAccount.
Mandatory:
BT-19 is optional and only used if the buyer provides specific accounting information.
â Valid Examples
key = "BT13" # no hyphen, number 13
key = "BT-13" # with hyphen
key = "bt13" # lowercase (case-insensitive)
key = "Bt-13" # mixed case
key = "BT19" # no hyphen, number 19
key = "bt-19" # lowercase with hyphen
key = "Bt19" # mixed case, no hyphen
key = "BT-19" # standard format
â Invalid Examples
key = "BT-20" # 20 is not allowed
key = "BT1319" # invalid combination
key = "XBT-13" # must start exactly with BT
key = "13BT" # wrong order
key = "BT-13abc" # must end exactly after the number
key = " BT-13" # leading space
key = "BT--13" # double hyphen
XML Validation
We validate our XML files using several publicly available portals provided by federal and regional authorities.
As the entire system is still evolving, multiple versions and profiles of the XML are currently in circulation.
We always use the latest available version and strive to keep it up to date.
The currently used profile version can be found in the XML under:
<GuidelineSpecifiedDocumentContextParameter>
Validation Portals
You can validate your XML files using the following tools:
Here you will find a detailed description of the individual fields:
Field | Description |
Invoice Number | Sequential invoice number according to Keyline |
Invoice Date | Date of the invoice |
Creditor/Debtor | D = Debtor / K = Creditor (not used in Keyline) |
Order Number | Related order number |
Booking Text | Product description |
Booking Category | Name of tax-related revenue account |
Booking Account | Number of tax-related revenue account |
Account | Customer account number |
Amount | Total invoice amount (gross) |
Currency | Currency of the invoice amount |
VAT | Tax rate |
VAT Amount | Amount of VAT included |
VAT Currency | Currency of the VAT amount |
VAT ID | VAT identification number of recipient |
Cash Discount Due Date | Calculated from invoice date + discount days |
Net Due Date | Calculated from invoice date + net days |
Recipient | Name of invoice recipient |
Address | Full recipient address details |
Contact Person | Recipient contact person |
Cash Discount % | Discount percentage |
Cash Discount Days | Days for discount eligibility |
Payment Terms | Payment conditions text |
Invoice Type | Automatically âCustomerInvoiceâ |
Service Date | Date of service |
Address Checksum | Internal validation value |



