What changes on January 1, 2027
The obligation itself is set out in the German VAT Act (Umsatzsteuergesetz, UStG). For a supply to another business, the invoice must be issued as an electronic invoice if both the supplier and the recipient are established in Germany (Section 14(2) UStG). Electronic does not mean “by email”: an electronic invoice is issued, transmitted and received in a structured electronic format and allows electronic processing (Section 14(1) UStG). Under this definition, a PDF attached to an email is an “other invoice”.
So that the switch does not hinge on a single day, the law contains a transition rule in stages. For transactions in 2025 and 2026, invoices may still be sent on paper or, with the recipient’s consent, in another electronic format until December 31, 2026 (Section 27(38) UStG). For transactions in 2027, this relief applies only if the issuer’s total revenue in the preceding calendar year did not exceed €800,000 (Section 27(38) UStG). Regardless of this threshold, electronic data interchange (EDI) in another format remains permitted until the end of 2027 if the recipient consents (Section 27(38) UStG).
| Transaction carried out | Sent by | Paper or other format | Legal basis |
|---|---|---|---|
| 2025 and 2026 | Dec 31, 2026 | for all businesses, other electronic formats only with consent | Section 27(38) item 1 UStG |
| 2027 | Dec 31, 2027 | only with prior-year total revenue of at most €800,000 | Section 27(38) item 2 UStG |
| 2027 | Dec 31, 2027 | EDI with the recipient’s consent, regardless of revenue | Section 27(38) item 3 UStG |
| from 2028 | no transition stage | no longer covered by Section 27(38) UStG | Section 14(2) UStG |
Anyone with total revenue above €800,000 in 2026 therefore issues invoices to domestic business customers for supplies from January 1, 2027 as e-invoices, unless they bill via EDI. Exceptions include invoices with a total amount of up to €250 and travel tickets, which may still be sent as other invoices (BMF). Invoices to private customers are not affected, because the law ties the e-invoice to supplies to other businesses (Section 14(2) UStG). What matters for this post is the operational consequence: for many, dispatch moves from manual work into a job.
The first stage names two dates: the transaction before January 1, 2027, and transmission by December 31, 2026 (Section 27(38) UStG). A December invoice that only goes out in January falls outside this stage; how to classify it is for your tax advisor. For the technology, this means: the first run in January is not a good moment for the first trial.
From printed invoices to a nightly job
How widespread e-invoicing already is for outgoing invoices is shown by a representative survey in which Bitkom Research questioned 1,103 companies with 20 or more employees in Germany between mid-April and early June 2024 (Bitkom). About half (55 percent) were already using e-invoices for outgoing invoices at that time, 30 percent often and 25 percent only occasionally (Bitkom). Practically all surveyed companies, 99 percent, sent invoices by email, for example as a PDF (Bitkom), and 59 percent still used postal mail (Bitkom).
For businesses that send a PDF from their merchandise management system or print on paper today, the process changes. A typical chain has four steps: the ERP system exports the billable transactions, a converter turns them into the structured invoice, a validation checks it against the format, and a dispatch step transmits it by email, portal or API. This chain often runs at night so that the invoices are with the customer in the morning.
Each of these steps can fail without anyone noticing. Accounting sees no error in the morning, because it does not watch the run but only expects its result. The statutory deadline is rarely the bottleneck, since for supplies to other businesses the law requires the invoice within six months of the supply (Section 14(2) UStG). A silent failure shows up elsewhere: in incoming payments, which start as many days later as the run stood still unnoticed.
Four ways an invoice run fails silently
An invoice run rarely fails loudly. Four patterns can be distinguished, and each needs its own signal.
The server was rebooted, the schedule was overwritten by an update, a credential has expired. Only an expectation that waits for a sign of life from the outside catches this case.
The export ends cleanly with exit code 0 and finds no transactions, for example because a date filter still points to the old year after the year-end or a new number range is missing. Technically everything is green, functionally every invoice is missing.
Some or all files fail the format check. A file with format errors does not meet the requirements of the structured format and counts as an “other invoice” (BMF). If dispatch continues anyway, files go out that are not e-invoices.
The invoices are generated, but the dispatch step fails at the mail server, at an expired portal login or at a blocked API. Anyone who only monitors the first step sees a healthy run here.
A fifth case is quieter: the run takes much longer than usual, for example because the database is stuck on a lock or volume jumps at the start of the year. There is a signal for this too, more on that below.
The principle: the run reports in by itself
A heartbeat turns the usual monitoring around. Instead of polling an address from the outside, XICTRAQ® waits for a message from the job. If it does not arrive by the due time plus grace window, an alert follows. The basics and integration in shell, Python or Kubernetes are covered in the post on heartbeat monitoring for cron jobs. How expect_output and a minimum count detect an empty export is explained in detail in the post on monitoring product feed exports. This post is about what is different for the invoice run.
The message is a simple request to a unique address at the end of the script. Metrics can be appended to the ping URL: items for the processed records, exit_code, duration_ms, a short note via output, and status=ok or status=fail (XICTRAQ® documentation). For the invoice run, items is the most important of these, because it carries the number of generated invoices. If you switch on expect_output for the heartbeat, XICTRAQ® treats a ping with items=0 as an empty run and alerts, even if the exit code was 0 (XICTRAQ® documentation). All parameters are listed in the heartbeat documentation.
XICTRAQ® does not see the invoices. It checks neither XRechnung nor ZUGFeRD, reads no XML file and knows no recipients. It evaluates only what the job reports: whether it checked in, when, how long it ran, how many invoices it names and whether it reports an error.
Two heartbeats: generation and dispatch kept apart
A single ping at the end of the whole chain only says that it finished at some point. For the invoice run, splitting it into two heartbeats pays off. The first reports after generation and validation how many valid invoices are ready. The second reports after dispatch how many went out. If dispatch fails, the second ping is missing or reports an error while the first stays green. Two heartbeats are already included in the Free plan (XICTRAQ® documentation).
The two steps are often separated in time as well. Generation runs at night when the ERP is quiet, dispatch early in the morning so that the invoices arrive during business hours. In between there is a window in which someone can step in before faulty files leave the building.
The following script shows the first part. It reports the start so that XICTRAQ® calculates the runtime itself, calls export and generation, has each file validated and reports the result. The commands for export and validation are placeholders for your ERP and the validation tool you use.
#!/usr/bin/env bash
# Generates tonight's e-invoices, validates them and reports the result.
# Usage: invoice-run.sh <heartbeat-slug>
set -uo pipefail
HB="https://api.xictraq.com/api/heartbeat/$1"
OUT="/srv/invoices/$(date +%F)"
mkdir -p "$OUT/rejected"
# Report the start: XICTRAQ® derives the runtime from it.
curl -fsS -m 10 --retry 3 "$HB/start" >/dev/null || true
# Placeholder: export from the ERP and generation of the XML files.
/opt/erp/bin/export-invoices --until today --target "$OUT"
RC=$?
# Validate each file; invalid files do not go to dispatch.
OK=0; BAD=0
for f in "$OUT"/*.xml; do
[ -e "$f" ] || break
if /opt/validator/validate "$f" >"$f.report.txt" 2>&1; then
OK=$((OK+1))
else
BAD=$((BAD+1)); mv "$f" "$f.report.txt" "$OUT/rejected/"
fi
done
if [ "$RC" -ne 0 ] || [ "$BAD" -gt 0 ]; then
curl -fsS -m 10 --retry 3 -G "$HB/ping" \
--data-urlencode "status=fail" --data-urlencode "exit_code=$RC" \
--data-urlencode "items=$OK" \
--data-urlencode "output=Export rc=$RC, $BAD invoices failed validation" >/dev/null
exit 1
fi
# Report the number of valid invoices, even if it is 0.
curl -fsS -m 10 --retry 3 "$HB/ping?exit_code=0&items=$OK" >/dev/null
Three points carry the script. It counts the files actually written, not the ERP database; only then does it show when the export finds transactions but writes no file. It moves invalid files to a separate folder so that the dispatch step does not touch them. And it reports validation errors actively with status=fail and a short note instead of skipping the ping; the report per file stays in place for the morning review.
Report validation errors actively
According to the letter of the Federal Ministry of Finance (BMF) dated October 15, 2025, whether a file meets the format requirements can be checked with a suitable validation application (BMF). The result is more than a technical detail: under the same letter, a file that fails the requirements of the structured format because of format errors is not an e-invoice but an “other invoice” (BMF). A run that generates and sends such files ends successfully from a technical point of view and still misses its purpose.
That is why the validation error belongs in the heartbeat, as an active failure report. A ping with status=fail sets the monitor to “failed” and triggers a critical alert immediately, without waiting for the grace window. The /fail endpoint offers the same route: it sets the status to “failed” and triggers an alert directly, without waiting for the grace window (XICTRAQ® documentation). The note from output appears in the alert as the reason, for example “Export rc=0, 3 invoices failed validation”. The alert itself thus shows whether a single master record is stuck or the whole run.
Whether a single error stops the entire dispatch is a business decision. For monitoring, it is enough that the job reports its state and dispatch only touches files that passed validation.
A passed validation checks format and business rules, not every mandatory detail. Content errors can exist even if the validation found no error, for example a wrong tax rate (BMF). A heartbeat does not change that: it reports what the job checks, and nothing more.
Schedule: start time, weekdays, time zone
With expect_output switched on, every ping with items=0 triggers an alert. For the invoice run, that is right on a Tuesday and wrong on a Sunday when nothing was delivered. A schedule that expects a run every day reports an empty run every weekend this way, and after the third weekend nobody reads that warning anymore. The solution lies in the schedule itself: the heartbeat expects a message on weekdays only.
XICTRAQ® accepts a full cron expression with its own time zone for this; cron expressions are validated on the server, and a time zone that is set must be a valid zone of the Internet Assigned Numbers Authority (IANA) (XICTRAQ® documentation). Under POSIX, the day-of-week field accepts the values 0 to 6, with 0 standing for Sunday (POSIX). The expression 0 2 1-5 with the zone Europe/Berlin therefore means Monday to Friday at 02:00 local time. The Monday run carries the weekend’s transactions; its count is higher, and that is not an error. The order heartbeat works in a similar way with schedules for day, night and weekend.
Which time goes into the schedule decides about false alarms. The heartbeat calculates the next due time from the last ping and the cron expression. If the ping arrives before the time entered, the due time of that same morning stays open, and after the grace window an alert follows for a run that finished long ago. That is why the start time of the run goes into the schedule, and the grace window covers the runtime. It can be set between 0 and 3600 seconds, so to one hour at most (XICTRAQ® documentation). If the run takes longer than an hour, the earliest usual end time goes into the schedule, and the grace window covers the span up to the latest.
| Setting | Heartbeat “Invoice run” | Heartbeat “Invoice dispatch” |
|---|---|---|
| Schedule (cron, Europe/Berlin) | 0 2 1-5 (start time) | 30 7 1-5 (start time) |
| Grace window | 45 minutes | 30 minutes |
| Output expected (expect_output) | on | on |
| Reported count (items) | valid invoices after validation | invoices actually handed over |
| Report failures actively | status=fail on export or validation errors | status=fail if fewer were sent than were ready |
| Static runtime threshold | well above the usual runtime | well above the usual runtime |
The time 02:00 has one more quirk. When summer time begins, the clock moves forward from 2 a.m. to 3 a.m., and when it ends, the hour from 2 a.m. to 3 a.m. occurs twice (German Summer Time Ordinance). Both happen on Sundays, the last Sunday in March and the last Sunday in October (German Summer Time Ordinance). A weekday schedule avoids these nights automatically; anyone who runs invoices in this hour every day should first read the post on daylight saving time in monitoring.
Public holidays, year-end and company shutdowns
A weekday schedule knows no public holidays. If a holiday falls on a weekday, the heartbeat still expects a message, and the job reports either items=0 or nothing at all. Both trigger an alert. Around the 2026/27 year-end, this affects two Fridays nationwide, December 25 and January 1; regional holidays are added depending on the federal state. The simplest approach is to pause the heartbeat before such days, because paused monitors do not trigger alerts (XICTRAQ® documentation). After resuming, the deadline starts over, so a resumed monitor is not overdue right away.
Company shutdowns between Christmas and New Year are trickier. If a monitor stays “missed” for more than seven days, a cleanup routine automatically sets it to “paused” and resolves the open heartbeat alerts (XICTRAQ® documentation). That keeps the alert list clean, but it has a consequence: anyone coming back after two weeks of vacation finds a paused monitor instead of a red one. An alert triggered on December 23 therefore has to reach someone who reacts within those seven days.
That is what escalation is for. With an escalation policy, available from the Business plan, further stages follow with a delay as long as nobody acknowledges the alert, each with its own delay, its own channels and its own recipient (XICTRAQ® documentation). How on-call duty stays sustainable over the holidays is described in the post on building an on-call rotation. You set up channels and stages under alerting and notifications.
The run on the first working day of 2027 carries the transactions of several days off, often annual invoices as well, and for many it is the first under the new obligation. A filter that expects the old year or a number range that still has to be created shows up exactly here as a run with items=0. Anyone who is reachable that morning and expects the alert usually loses only hours.
Runtime: when a run takes too long
With a call to /start at the beginning and the ping at the end, XICTRAQ® calculates the runtime itself. A static threshold applies to it, set at 60 seconds unless you enter your own value (XICTRAQ® documentation); why almost every nightly run then counts as slow is shown in the post on the feed export. For the invoice run, the threshold should follow not the average but the longest usual run: on Mondays it carries the weekend, and on the first working day in January often annual invoices as well. The threshold is based on that run, plus a buffer.
Adaptive detection learns the normal runtime per hour of the week, using the mean plus three standard deviations over a sliding window (XICTRAQ® documentation). An invoice run on five weekdays gives it only one value per week for each hour of the week, too few for a reliable baseline. For this run, the static threshold is the right tool.
Dispatch: what lies between ping and inbox
The second heartbeat reports dispatch. It makes sense for the dispatch job not only to report its own count but to compare it with the invoices that were ready. XICTRAQ® does not compare the counts of two heartbeats with each other. The job can do that itself, though, and report status=fail with a note such as “39 of 41 invoices sent” when there is a mismatch. Then the alert shows not only that something is missing but how much.
#!/usr/bin/env bash
# Sends the validated invoices and reports the result.
# Usage: invoice-dispatch.sh <heartbeat-slug>
set -uo pipefail
HB="https://api.xictraq.com/api/heartbeat/$1"
DIR="/srv/invoices/$(date +%F)"
# Report the start so that dispatch gets a runtime as well.
curl -fsS -m 10 --retry 3 "$HB/start" >/dev/null || true
READY=$(find "$DIR" -maxdepth 1 -name '*.xml' | wc -l)
SENT=0
for f in "$DIR"/*.xml; do
[ -e "$f" ] || break
# Placeholder for the delivery route: email, portal or API.
/opt/erp/bin/send-invoice "$f" && SENT=$((SENT+1))
done
if [ "$SENT" -ne "$READY" ]; then
curl -fsS -m 10 --retry 3 -G "$HB/ping" \
--data-urlencode "status=fail" --data-urlencode "items=$SENT" \
--data-urlencode "output=$SENT of $READY invoices sent" >/dev/null
exit 1
fi
curl -fsS -m 10 --retry 3 "$HB/ping?exit_code=0&items=$SENT" >/dev/null
A ping with exit_code=0 only means here that your own mail server, the portal or the API accepted the invoices. Whether an email lands in the customer’s inbox is decided afterwards. You can review SPF, DKIM and DMARC for your own domain with the free mail check, and the post on email deliverability in 2026 explains the rules of the large mailbox providers. Because recipients verify the sender via DNS, it is also worth looking at the nameserver redundancy of your own domain.
What the heartbeat does not see
Two heartbeats answer whether the invoice run and dispatch ran, how many invoices they report and whether they report an error. Four gaps remain:
- Format and content. Whether a file is valid is decided by the validation in the job; whether tax rate and description of the supply are correct is not fully decided by it either.
- Receipt by the recipient. The dispatch ping proves the handover to the mail server, portal or API. Whether the customer accepts or rejects the invoice, the sender learns from bounces and replies, not from the heartbeat.
- Completeness compared with the ERP. items is the number the job reports. If individual transactions are already missing in the export, for example because they were booked incorrectly, the heartbeat sees a smaller but plausible number.
- Gradual deviations. A minimum count via min_items is a fixed value per heartbeat. For invoice runs with strongly fluctuating volume, it only works as a rough lower bound; it does not detect a drop compared with the previous day.
As with backup runs, the same applies here: the heartbeat proves the run, not every result in detail. For the result, accounting still needs to look at open items and bounces, ideally on a fixed rhythm, such as every Monday.
Checklist before January 1, 2027
- Record for every automated step who looks after it and where it runs: export, generation, validation, dispatch.
- Create two heartbeats, one for generation and validation, one for dispatch.
- Schedule as a cron expression with the zone Europe/Berlin, weekdays only, using the start time of the run.
- Set the grace window to the longest usual runtime plus a buffer, one hour at most.
- Switch on expect_output and report validation errors with status=fail and a short note.
- Enter a static runtime threshold well above the usual runtime.
- Plan public holidays and shutdowns: pause the heartbeat beforehand, resume it afterwards, assign on-call duty.
- Test the alert chain once with a real alert before the first run in January.
A green test button shows that a channel is reachable, not that someone reads it at 02:45 on the first working day. The post on testing the alert chain shows how a drill with a real alert works. A deliberate ping with items=0 also shows what the warning looks like in your own inbox.
Watch the invoice run before the cut-off date
For many companies, e-invoicing changes operations more than accounting: a task becomes a job, and a job needs someone who notices when it stops. Two heartbeats, a schedule that takes weekdays and holidays into account, and a failure report that names the validation error are usually enough for this. It can be set up in the weeks before the year-end, while the old route still works. XICTRAQ® heartbeats are included from the Free plan; scope per plan and escalation are listed on the pricing page.
This post is based on: German VAT Act (UStG), Section 14(1) and (2) and Section 27(38), version on gesetze-im-internet.de, retrieved in November 2026; Federal Ministry of Finance, letter dated October 15, 2025 “Einführung der obligatorischen elektronischen Rechnung bei Umsätzen zwischen inländischen Unternehmern ab dem 1. Januar 2025; Anpassung des Umsatzsteuer-Anwendungserlasses”, paras. 6a, 22 and 35a; Bitkom, press release “Weniger als die Hälfte deutscher Unternehmen empfängt E-Rechnungen” dated December 3, 2024, survey of 1,103 companies with 20 or more employees; German Summer Time Ordinance (Sommerzeitverordnung), Section 2; The Open Group Base Specifications Issue 8 (POSIX.1-2024), crontab; XICTRAQ® documentation “Heartbeats & API monitoring”. The values in the image and scripts are example values. This post is not tax advice.