Skip to main content

Set up and test eInvoicing (Germany)

This page covers the prerequisites for eInvoicing in the German (DE) market, how to enable it in the fiskaltrust.Portal, and how to validate the flow against a sandbox before production. For scope, regulatory status, and the delivery flow, see the Overview.

What setup means in Germany

eInvoicing rides on calls you already make. Setup is about configuration — the output format and the fiskaltrust.Middleware's German locale. Delivery via /issue is optional. There is no new connection or credential.

Prerequisites​

RequirementDetail
fiskaltrust account + fiskaltrust.MiddlewareAn active account with a configured fiskaltrust.Middleware. See Portal registration.
CloudCashBoxeInvoicing is currently only available with a cloud-based fiskaltrust.Middleware (CloudCashBox), not with a local fiskaltrust.Middleware. For more information, see Prerequisites (shared).
Existing fiscalization integrationYour POS already fiscalizes in Germany via /sign.
fiskaltrust.Middleware country configurationThe fiskaltrust.Middleware's country configuration is set to the German locale.
PosSystem API (v2)eInvoicing features are exposed through the PosSystem API (v2). If you are on the v0 interface, plan your migration first.
Default output formatDecide the default: XRechnung for B2G and network-capable B2B buyers, ZUGFeRD for direct delivery.
Buyer reference (XRechnung)XRechnung requires the buyer reference (BT-10, rule BR-DE-15) on every invoice. Send it in CustomerReference. For public-sector buyers (B2G), this is the buyer's Leitweg-ID.
Buyer electronic address (XRechnung)XRechnung requires the buyer's electronic address (BT-49, rule PEPPOL-EN16931-R010) on every invoice, also for B2G. Send it in CustomerEndpointId. For an email address, use the scheme EM. See Buyer electronic address.

Table 1. Prerequisites for eInvoicing in Germany.

Buyer electronic address​

CustomerEndpointId is written as <scheme>:<id>. The scheme is written to BT-49-1, the identifier to BT-49. For more information, see Buyer data (cbCustomer) in eInvoicing.

For XRechnung, send the buyer's email address with the scheme EM, for example EM:rechnungseingang@beispiel.de. EM is a code of the CEF Electronic Address Scheme (EAS) code list, which EN 16931 requires for the scheme of an electronic address (rule BR-CL-25). The code list is published in the European Commission's Registry of supporting artefacts to implement EN16931. The fiskaltrust.Middleware writes EM:rechnungseingang@beispiel.de as:

<cbc:EndpointID schemeID="EM">rechnungseingang@beispiel.de</cbc:EndpointID>

The official XRechnung samples use EM for the seller and the buyer electronic address:

SourceSample
KoSIT XRechnung test suite, UBL01.06_minimal_test_ubl.xml (cbc:EndpointID schemeID="EM")
KoSIT XRechnung test suite, UN/CEFACT CII01.06_minimal_test_uncefact.xml (ram:URIID schemeID="EM")
EN 16931 validation artefactsEN16931-UBL-codes.sch, rule BR-CL-25, lists EM as an allowed scheme

Table 2. Official samples for the scheme EM.

Peppol does not accept EM

The Peppol BIS Billing 3.0 EAS code list does not contain EM. An invoice delivered via Peppol needs the identifier under which the buyer is registered in the Peppol network, for example 0088:<GLN>. For a sample, see the Peppol BIS Billing 3.0 base-example.xml.

Enable eInvoicing in the Portal​

eInvoicing is enabled by configuration: the output format (XRechnung / ZUGFeRD) and the fiskaltrust.Middleware's German locale. No new integration is required on the POS side.

Draft — Portal steps to be confirmed

The exact steps to enable eInvoicing in the fiskaltrust.Portal (output-format configuration, German locale) are being verified and will be documented here. Do not treat this section as final until the flow has been confirmed.

Sandbox validation​

Validate the end-to-end flow against a sandbox-scoped fiskaltrust.Middleware — using non-production x-cashbox-id and x-cashbox-accesstoken credentials — before enabling it on a production fiskaltrust.Middleware. Run one document through the sandbox end to end before the first live document.

  1. Provision a sandbox fiskaltrust.Middleware in the fiskaltrust.Portal — this yields the x-cashbox-id and x-cashbox-accesstoken used on every request. See Portal registration.
  2. Confirm your integration against the Integration checklist.
  3. Run one invoice through the full flow below: /sign → (optionally) /issue → poll for delivery status.
Validate against the XRechnung specification

Validate test documents against the XRechnung specification, not only EN 16931 — XRechnung adds 200+ national rules of its own. A document can be EN 16931-valid and still fail XRechnung validation.

End-to-end example​

Run it against the sandbox at https://possystem-api-sandbox.fiskaltrust.eu/v2. The API is request/response and idempotent — there is no status webhook; a retry reuses the same x-operation-id and returns the original result. Every request carries the standard headers:

x-cashbox-id: <sandbox fiskaltrust.Middleware ID>
x-cashbox-accesstoken: <sandbox access token>
x-possystem-id: <registered POS system ID>
x-operation-id: <fresh UUID per operation>

Step 1 — Sign (/sign) — produces the eInvoice

Call /sign as you do today, with the buyer's master data, using the B2B invoice receipt case. The response carries the fiscalized receipt and the EN 16931 document (XRechnung or ZUGFeRD, per your fiskaltrust.Middleware configuration).

// POST https://possystem-api-sandbox.fiskaltrust.eu/v2/sign
{
"ftReceiptCase": 35184372092930,
"cbReceiptReference": "DE-EINV-SANDBOX-0001",
"cbReceiptMoment": "2027-01-01T10:00:00Z",
"cbCustomer": {
"CustomerVATId": "DE123456789",
"CustomerName": "Beispiel GmbH",
"CustomerStreet": "Beispielstraße 1",
"CustomerZip": "10115",
"CustomerCity": "Berlin",
"CustomerCountry": "DE",
"CustomerEndpointId": "EM:rechnungseingang@beispiel.de"
},
"cbChargeItems": [
{ "Quantity": 1, "Description": "Consulting services", "Amount": 1190.00, "VATRate": 19, "ftChargeItemCase": 35184372088851 }
],
"cbPayItems": [
{ "Description": "Bank transfer", "Amount": 1190.00, "ftPayItemCase": 35184372088842 }
]
}

Try it: developer.fiskaltrust.eu → DE → sign → B2BInvoice. The output format (XRechnung / ZUGFeRD) comes from the fiskaltrust.Middleware configuration, not this payload — see Enable eInvoicing in the Portal. For B2G buyers, send the buyer's Leitweg-ID in cbCustomer.CustomerReference. For XRechnung, also send the buyer's electronic address in cbCustomer.CustomerEndpointId, for example EM:rechnungseingang@beispiel.de (see Buyer electronic address).

Step 2 — Issue (/issue) — optional, register for delivery

To make the receipt available for delivery, call /issue with the original /sign request and its response (ReceiptRequest + ReceiptResponse). The response returns the ftQueueID / ftQueueItemID used by the delivery and status calls.

// POST https://possystem-api-sandbox.fiskaltrust.eu/v2/issue
{
"ReceiptRequest": { "...": "the /sign request from Step 1" },
"ReceiptResponse": { "...": "the /sign response from Step 1" }
}

Try it: developer.fiskaltrust.eu → DE → issue.

Step 3 — Deliver to a channel — optional

Deliver the document with PUT /issue/{queueId}/{queueItemId}, choosing a delivery method: IssueUpdateSend (email/SMS), IssueUpdatePrint, IssueUpdateDownload, IssueUpdateUpload, or IssueUpdateLink. Peppol delivery uses one of the upload/send methods — confirm the exact one for Peppol with product.

Step 4 — Check delivery status

Applies when you registered the receipt via /issue in Step 2: the status call uses the ftQueueID / ftQueueItemID returned there. Check whether the document was delivered with GET /issue/{queueId}/{queueItemId}/delivered: it returns 200 when the document was delivered and 204 while it is still pending. To wait for the delivery instead of polling, call GET /BlockIssueRequest/{queueId}/{queueItemId}/WhileDelivered. There is no callback or webhook.

GET /issue/{queueId}/{queueItemId} without /delivered is not a status call: it returns the issued document itself.

See the POS System API reference for the full /issue request/response schemas.