The same engine as in the browser, as a stateless REST API, as a command line with a hot folder and as a Docker image for your own infrastructure. Documents are checked with the official validators and nothing is stored.
The API validates, creates and converts e-invoices (XRechnung and ZUGFeRD / Factur-X). Every request is self-contained: no account, no session, no storage.
Stateless and minimal
Invoice contents and file names are neither stored nor logged. A request can be repeated as often as you like.
Official validators
The verdict comes from the KoSIT validator with the XRechnung configuration and from Mustang with veraPDF for hybrid PDFs. The response names the versions used.
One engine everywhere
Browser, API, command line and hot folder call the same TypeScript core. What you see in the browser is what the API returns.
In your own house, too
One Docker image contains the application, the API and the validators and needs no internet access at runtime.
Base URL
https://distrinode.de/ebilling/api/v1
Authentication
None on the public instance. Optionally Authorization: Bearer when you run it yourself with a key list.
Formats
XML (UBL, CII, XRechnung), PDF (ZUGFeRD / Factur-X), JSON. Responses as JSON, XML, PDF or HTML.
Errors
Always application/problem+json per RFC 9457 with a stable code.
Validate an invoiceShell
curl-sS-X POST "https://distrinode.de/ebilling/api/v1/validate"\ -H "Content-Type: application/xml"\ --data-binary @rechnung.xml |jq'.valid, .counts'
Privacy in practice
The server keeps a document in memory only for the duration of the request. There are no analytics services and no requests to third parties. Note: a request to the public instance sends the document to our server. If that is not acceptable, run the image yourself or use the browser tools, which work locally.
Pick an operation and your language. The examples run against the public instance; when you host it yourself, only the base URL changes.
Sends an XML e-invoice and receives the validation report as JSON.
shellShell
curl-sS-X POST "https://distrinode.de/ebilling/api/v1/validate"\ -H "Content-Type: application/xml"\ --data-binary @rechnung.xml
HTTP 200 does not mean valid
A validation that ran always answers 200. Whether the invoice is valid is in the valid field. If you want an error status, set fail=true: the API then answers 422 for an invalid invoice.
Reading errors
For status 400 and above the body is a problem object. Branch on code, not on title or detail: those texts are meant for people.
On the public instance, requests that use the default user agent of Python urllib are rejected. curl, Node.js, requests, PHP, .NET and Java work.
03API reference
Every endpoint, fully described
Base URL, parameters, request and response formats, examples, error model and limits. The reference follows the API's OpenAPI document.
A validation that ran always returns 200 with a report. Status codes from 400 mean that the request itself could not be processed.
Raw or multipart
Send a single document directly as the body (application/xml, application/pdf) and structured data as application/json. /convert takes multipart/form-data only. Unknown JSON members, parameters and multipart parts are rejected so that typos cannot slip through. curl -d sends a form; use --data-binary and a Content-Type.
Representation by Accept
Reports come as JSON (default), HTML or PDF, chosen with Accept or format. Artifacts come as a JSON envelope with Base64 files or directly as XML or PDF.
Target format
Depending on the endpoint the target format is an object of syntax (cii or ubl) and profile: as target in the body for create, as options.xmlTarget for convert, and through to and profile for transform. Invalid combinations return unsupported_target.
Our own output is checked
create, convert and transform check their result with the same rules as validate. If there are errors, no file is returned (422). With allowInvalid=true you get the file and the report for debugging.
Correlation
Optionally send X-Request-Id. The API returns it and names it as trace_id in errors. It never contains content from your document.
POST
/validate
Limit: heavy
Validates an XML e-invoice or a hybrid PDF.
Detects the format automatically, applies the built-in rules and asks the official validators. The response is a ValidationReport with valid, checks, findings and the engine versions, as JSON or as a self-contained HTML page. XML that is not well-formed is a failed check, not an HTTP error. There is no PDF report in v1.
Parameters
Name
In
Description
level
query
Depth of validation: built-in rules only, official validators only, or both.builtin · official · both – default both
lang
query
Language of HTML and PDF reports. JSON always contains German and English.de · en – default de
format
query
Representation of the response, takes precedence over Accept: json or html for reports, json, xml or pdf for files, pdf or html for views.json · html
fail
query
Answer a negative verdict with 422 and the code invalid_document.default false
profile
query
The document must conform to this profile; a mismatch is reported as a finding, not as an HTTP error.minimum · basicwl · basic · en16931 · extended · xrechnung · peppol-bis-3
X-Request-Id
header
Your own identifier for correlation, up to 64 characters of letters, digits, dot, underscore and hyphen.
Request body
application/xmldocument directly as the body
text/xmldocument directly as the body
application/pdfdocument directly as the body
multipart/form-dataseveral parts or a form, files as parts
Responses
Status
Media type
Meaning
200
application/json · text/html
Processed successfully. For validations, read the report.
400
application/problem+json
Malformed request: syntax, unknown member or invalid parameter.
401
application/problem+json
Key missing or wrong (only when you run it yourself with a key list).
405
application/problem+json
HTTP method not allowed; the Allow header lists the permitted ones.
406
application/problem+json
No representation matches Accept or format.
413
application/problem+json
Request or document too large.
415
application/problem+json
The media type is not supported by the endpoint.
422
application/problem+json
Request understood but cannot be processed (see code).
429
application/problem+json
Too many requests, honour Retry-After.
500
application/problem+json
Internal error, quote the trace_id.
503
application/problem+json
Official validator unavailable or queue full.
504
application/problem+json
The validator or Ghostscript exceeded its time limit.
Example request
Shell
curl-sS-X POST "https://distrinode.de/ebilling/api/v1/validate"\ -H "Content-Type: application/xml"\ --data-binary @rechnung.xml
Example response (status 200)
JSON
{"valid":false,"format":{"container":"xml","syntax":"cii","documentType":"invoice","profile":"xrechnung","family":"xrechnung","legalEInvoiceDE":true},"checks":[{"id":"wellformed","status":"passed"},{"id":"xsd","status":"passed"},{"id":"en16931","status":"passed"},{"id":"cius","status":"failed"}],"findings":[{"ruleId":"BR-DE-15","severity":"error","message":{"de":"Für eine XRechnung ist Pflicht: „Leitweg-ID / Käuferreferenz“.","en":"Mandatory in an XRechnung: \"Buyer reference (Leitweg-ID)\"."},"terms":["BT-10"],"source":"xrechnung","engine":"kosit"}],"counts":{"fatal":0,"error":1,"warning":0,"info":2},"engines":{"kosit":"1.6.3","xrechnung-config":"3.0.2_2026-08-31"}}
POST
/convert
Limit: heavy
From PDF invoice to e-invoice: XRechnung XML and a ZUGFeRD PDF in one call.
Multipart with the original pdf and the confirmed data as invoice (or as xml). Without data the API reads the PDF itself and only continues if the confidence reaches minScore; otherwise it answers needs_review with the extraction result. The original PDF is upgraded to PDF/A-3 and the XML is embedded; with options.repair the server may use Ghostscript for that.
Parameters
Name
In
Description
verify
query
How the result is checked before it is returned.none · builtin · official – default official
allowInvalid
query
Return the result even with errors, together with the report (for debugging).default false
format
query
Representation of the response, takes precedence over Accept: json or html for reports, json, xml or pdf for files, pdf or html for views.json · xml · pdf
X-Request-Id
header
Your own identifier for correlation, up to 64 characters of letters, digits, dot, underscore and hyphen.
Request body
multipart/form-dataseveral parts or a form, files as parts
Creates an e-invoice from structured invoice data, optionally with a PDF.
The server computes amounts, the VAT breakdown and totals according to EN 16931. With options.pdf.mode a visual or a hybrid PDF is added. The computed invoice is returned in the JSON envelope so that you can see what was added.
Parameters
Name
In
Description
verify
query
How the result is checked before it is returned.none · builtin · official – default official
allowInvalid
query
Return the result even with errors, together with the report (for debugging).default false
lang
query
Language of HTML and PDF reports. JSON always contains German and English.de · en – default de
format
query
Representation of the response, takes precedence over Accept: json or html for reports, json, xml or pdf for files, pdf or html for views.json · xml · pdf
X-Request-Id
header
Your own identifier for correlation, up to 64 characters of letters, digits, dot, underscore and hyphen.
If the PDF already contains an embedded e-invoice, its XML is read. Otherwise the API analyses the layout and returns a draft with evidence boxes and a confidence from 0 to 1: a proposal for review, never a finished invoice. The web interface reads PDFs in the browser; this endpoint is meant for API clients, the CLI and the hot folder.
Parameters
Name
In
Description
lang
query
Language of HTML and PDF reports. JSON always contains German and English.de · en – default de
X-Request-Id
header
Your own identifier for correlation, up to 64 characters of letters, digits, dot, underscore and hyphen.
Request body
application/pdfdocument directly as the body
multipart/form-dataseveral parts or a form, files as parts
Responses
Status
Media type
Meaning
200
application/json
Processed successfully. For validations, read the report.
400
application/problem+json
Malformed request: syntax, unknown member or invalid parameter.
401
application/problem+json
Key missing or wrong (only when you run it yourself with a key list).
405
application/problem+json
HTTP method not allowed; the Allow header lists the permitted ones.
406
application/problem+json
No representation matches Accept or format.
413
application/problem+json
Request or document too large.
415
application/problem+json
The media type is not supported by the endpoint.
422
application/problem+json
Request understood but cannot be processed (see code).
429
application/problem+json
Too many requests, honour Retry-After.
500
application/problem+json
Internal error, quote the trace_id.
503
application/problem+json
Official validator unavailable or queue full.
504
application/problem+json
The validator or Ghostscript exceeded its time limit.
Example request
Shell
curl-sS-X POST "https://distrinode.de/ebilling/api/v1/extract"\ -H "Content-Type: application/pdf"\ --data-binary @rechnung.pdf |jq'.score, .draft.number'
POST
/transform
Limit: built-in
Converts an XML e-invoice: UBL ⇄ CII and profile change.
The result is checked like the output of the other endpoints. If the profile does not exist in the target syntax, the API falls back to EN 16931 and says so as a notice. Whatever the target syntax cannot carry is reported and never invented.
Parameters
Name
In
Description
to
query
Target syntax: ubl or cii. Default is the opposite syntax.ubl · cii
profile
query
Target profile of the conversion, for example xrechnung or en16931.minimum · basicwl · basic · en16931 · extended · xrechnung · peppol-bis-3
verify
query
How the result is checked before it is returned.none · builtin · official – default official
allowInvalid
query
Return the result even with errors, together with the report (for debugging).default false
format
query
Representation of the response, takes precedence over Accept: json or html for reports, json, xml or pdf for files, pdf or html for views.json · xml
X-Request-Id
header
Your own identifier for correlation, up to 64 characters of letters, digits, dot, underscore and hyphen.
Request body
application/xmldocument directly as the body
text/xmldocument directly as the body
multipart/form-dataseveral parts or a form, files as parts
Very cheap, without authentication and without a rate limit. With deep=true a self-test runs through the official validators (cached for 60 seconds); not meant for container probes.
Parameters
Name
In
Description
deep
query
Run a self-test through KoSIT and Mustang.default false
Responses
Status
Media type
Meaning
200
application/json
Processed successfully. For validations, read the report.
Every error is an application/problem+json object per RFC 9457, regardless of Accept. The detail text never repeats content from your document.
Members
type
title
status
detail
instance
code
trace_id
findings
counts
report
extraction
retryAfterSeconds
Clients must ignore unknown members. findings holds the same findings as a validation report; for request errors the rule id is EBL-REQ-….
Status
code
Meaning
400
invalid_request
Malformed JSON or multipart, unknown member, invalid parameter, missing part.
401
unauthorized
Key required or invalid (only when you run it yourself with a key list).
404
not_found
Unknown path.
405
method_not_allowed
HTTP method not allowed; the Allow header lists the permitted ones.
406
not_acceptable
No representation matches Accept or format; detail lists the available ones.
413
payload_too_large
Request or part above the limit.
415
unsupported_media_type
The declared Content-Type does not fit the endpoint.
422
unsupported_format
The document is neither XML nor PDF (or the wrong kind for the endpoint).
422
unreadable_pdf
PDF corrupt or encrypted.
422
unreadable_xml
XML unreadable or with a disallowed DOCTYPE declaration.
422
unsupported_target
That combination of syntax and profile does not exist, for example ubl:minimum.
422
invalid_document
Validation found errors. The report is in the report member.
422
needs_review
The extraction is not confident enough; extraction holds the result for review.
422
no_embedded_xml
The PDF contains no embedded e-invoice.
422
pdfa_repair_required
PDF/A problems block embedding; try again with repair=true.
429
rate_limited
Limit reached; Retry-After gives the wait time.
500
internal_error
Internal error. Quote the trace_id; a stack trace is never returned.
503
engine_unavailable
Official validator missing or queue full.
504
engine_timeout
Validator or Ghostscript timed out.
application/problem+jsonText
HTTP/1.1 422 Unprocessable ContentContent-Type: application/problem+jsonX-Request-Id: 8c1f0d0e-6b2a-4c53-9a77-1d1d4f0c7a10Cache-Control: no-store{ "type": "https://distrinode.de/ebilling/problems/invalid_document", "title": "The document does not pass validation", "status": 422, "detail": "1 error and 0 warnings. No file was produced; fix the data and retry, or pass allowInvalid=true.", "instance": "urn:uuid:8c1f0d0e-6b2a-4c53-9a77-1d1d4f0c7a10", "code": "invalid_document", "trace_id": "8c1f0d0e-6b2a-4c53-9a77-1d1d4f0c7a10", "counts": { "fatal": 0, "error": 1, "warning": 0, "info": 0 }, "findings": [ { "ruleId": "BR-DE-15", "severity": "error", "message": { "de": "Für eine XRechnung ist Pflicht: „Leitweg-ID / Käuferreferenz“.", "en": "Mandatory in an XRechnung: \"Buyer reference (Leitweg-ID)\"." }, "terms": ["BT-10"], "source": "xrechnung", "engine": "ebilling" } ]}
Limits and headers
The values apply to the public instance and are guidelines that we adjust. Every client has a budget of 60 tokens per minute; a built-in request costs 1 token, a heavy one (official validation, PDF work) costs 3. That makes 60 and 20 requests per minute respectively. When you host it yourself you set the budget; 0 switches the limit off.
Class
requests per minute and client
Endpoints
light
unlimited
health, openapi.json
built-in
60
validate?level=builtin, create, transform, render
heavy
20
validate, convert, extract
Limit
Value
Whole request
25 MB
XML part
20 MB
PDF in MB · pages
25 MB · 200
JSON body (excluding logo)
4 MB
Logo (PNG or JPEG)
1 MB
Time limit: built-in · official validation · hybrid and transform
10 s · 60 s · 90 s
Response headers
Ebilling-Valid
Ebilling-Findings
Ebilling-Official-Checked
Ebilling-Version
Ebilling-Engines
X-Request-Id
Retry-After
RateLimit-Policy
RateLimit
Retry-After (seconds, on 429 and 503) is binding. RateLimit and RateLimit-Policy follow an IETF draft that is not final and may change. Ebilling-Official-Checked: false means the official validators were not involved; read checks in that case.
Versioning: the URL carries the major version (/v1). Within v1 only additive changes are made: new optional members, endpoints and rule ids. Clients must tolerate unknown members and rule ids. The validators' rule sets are released on fixed dates; if you need reproducible results, read the Ebilling-Engines header as well.
04Playground
Try it without writing code
Validate the sample invoice or paste your own XML. The page calls the same endpoint as your client and shows the report and the raw response.
Sample: XRechnung 3.0 in CII format with synthetic data. You can edit the text, for example remove the Leitweg-ID, and run the validation again.
The text is sent to this server's API for validation and is not stored.
Equivalent curl call
Shell
curl-sS-X POST "https://distrinode.de/ebilling/api/v1/validate?level=both"\ -H "Content-Type: application/xml"\ --data-binary @rechnung.xml
The result appears here once you start the validation.
05CLI and hot folder
On the command line and in a folder
The ebilling command uses the same core as the browser and the API. It validates, creates and converts single files, or watches a folder into which your ERP or a scanner drops PDF invoices.
Commands
Call
Purpose
ebilling validate <file|dir|-> […]
Validates files or folders (XML and hybrid PDFs) and prints a summary per file or a JSON report.
Detects the input itself: a PDF without embedded XML becomes XRechnung and ZUGFeRD, an XML file is converted between UBL and CII with to, a hybrid PDF yields its XML.
Creates an e-invoice from a JSON file, optionally with a visual or hybrid PDF.
ebilling extract <file.pdf> […]
Reads the invoice data of a PDF as a JSON draft with evidence and confidence.
ebilling watch <root>
Watches a hot folder and processes every new file.
ebilling doctor
Shows versions, Java and Ghostscript availability and writable folders, and runs an offline self-test.
Results go to stdout, logs to stderr. With - as input the command reads stdin; with -o - it writes a single result to stdout. Existing files are never overwritten without --force.
Global options
Option
Environment variable
Meaning
--config <file>
EBILLING_CONFIG
JSON configuration file. Default: ebilling.config.json in the current folder, then in your user directory.
--company <file>
EBILLING_COMPANY
Company profile with your master data (see below).
--engine builtin|official|auto
EBILLING_ENGINE
builtin uses only the built-in rules, official requires the official validators, auto uses them when present.
--validators-dir <dir>
EBILLING_VALIDATORS_DIR
Folder with the Java runtime, KoSIT and Mustang.
--lang de|en
EBILLING_LANG
Language of messages (default: de).
--json
–
Machine-readable output, one JSON document per call (one line per file with watch).
-q, --quiet / -v, --verbose
EBILLING_LOG_LEVEL
Less or more log output.
--no-color
NO_COLOR
Turn colour output off.
Precedence: options over environment variables over the configuration file over defaults. Unknown keys in the configuration file are an error (exit code 2).
ExamplesShell
# Check one file, fail the build on errorsebilling validate rechnung.xml --fail-on error# Check a folder, one JSON report per fileebilling validate ./eingang --report-dir ./reports --format json# PDF invoice in, XRechnung XML + ZUGFeRD PDF outebilling convert rechnung.pdf --company ./company.json -o ./out --min-score0.9# UBL <-> CIIebilling convert cii.xml --to ubl -o ubl.xml# Structured data in, XRechnung and hybrid PDF outebilling create invoice.json --target cii:xrechnung --pdf hybrid --template classic -o ./out# Read the data of a PDF as JSONebilling extract rechnung.pdf -o rechnung.draft.json# Hot folderebilling watch /data/hot --company /config/company.json --templates-dir /config/templates
Exit codes
Code
Meaning
0
Success: all documents valid (warnings allowed, except with --fail-on warning).
1
At least one document is invalid; with convert and create no file was written because of the findings.
2
Wrong call or configuration: unknown option, invalid configuration, invalid target.
3
Human review needed: extraction was not confident enough, the draft was written but no e-invoice.
4
Input unusable: file missing, neither XML nor PDF, encrypted, too large or without embedded XML.
5
Java, KoSIT, Mustang or Ghostscript unavailable or too slow although --engine official was requested.
10
Internal error (a bug). Please report it.
With several inputs the highest code wins; with --json the code per file is part of the result. The watch command exits with 0 after SIGINT or SIGTERM; failures of single files end up in the error folder.
Hot folder
With ebilling watch you drop PDF invoices into one folder and pick up the e-invoices from another. Whatever is recognised with confidence moves to out; everything uncertain waits in review for a person.
Folder structureText
<root>/ in/ drop zone: *.pdf, *.xml, *.draft.json out/ finished results review/ needs a person: original PDF + draft + report error/ could not be processed: original + <stem>.error.json archive/ optional (--archive): originals after success .ebilling/ lock file, health file, state (no invoice data)
Only *.pdf, *.xml and *.draft.json are picked up. Dotfiles, ~$*, *.tmp, *.part and *.crdownload are ignored.
A file counts as finished when its size and modification time stay unchanged for the settle time (--settle) and it can be opened exclusively. On SMB and NFS shares --poll helps.
Results are first written as .partial and then renamed atomically. Your ERP can safely read any file without .partial. An input is never deleted before a result exists.
The stem is the file name without extension. On a name clash -1, -2 is appended. File names do not appear in the log, only a random work id.
What lands in which folder
Case
out/
review/
error/
PDF recognised with confidence, validated, company profile applied
<stem>.report.json (+ <stem>.<syntax>.xml with --convert-xml)
–
<stem>.error.json (unreadable)
Hybrid PDF dropped
<stem>.report.json
–
–
Unreadable, encrypted, too large, not a PDF or timed out
–
–
<stem>.pdf · <stem>.error.json
Review: open the draft.json file in the review folder, correct the values and put draft and PDF back into the in folder together. If the checksum of the draft does not match the PDF, the job ends up in error.
Options of watch
Option
Meaning
--in --out --review --error --archive
Rename the folders so that your ERP can attach to them.
--company <file>
Company profile with your master data.
--templates-dir <dir>
Folder with learned layout templates.
--target <syntax>:<profile>
Output format of the XML file, for example cii:xrechnung.
--hybrid-profile <profile>
Profile of the ZUGFeRD PDF (default: en16931).
--min-score <0..1>
From this confidence on, conversion is automatic. (default 0.9)
--settle <seconds>
Seconds to wait until a file counts as finished. (default 2)
--poll <ms>
Poll at an interval instead of using file system events (network drives).
--once
Process the backlog and exit.
--report json|html|both
Store reports as json, html or both. (default json)
--learn
Store a layout template after a review.
--delete-input
Delete the input after a successful result.
--repair
Allow server-side PDF/A repair.
--health-file <path>
File touched every 15 seconds while the loop is alive.
SIGTERM and SIGINT stop intake and the current file is finished. If the grace period runs out, it returns to the in folder.
Company profile (company.json)
Your master data serves as a hint for recognition and as defaults for the output. seller may be incomplete; defaults, output and render are optional.
The file is only read, never logged and never copied into reports. Keep it read-only, for example as a read-only volume. The values in the example are invented.
Layout templates
Each invoice layout gets a template with columns and labels but without invoice values, stored as templates/<layoutFingerprint>.json. The next PDF with the same layout uses it automatically. With --learn it is created after a review.
Structure of the report file
The hot folder stores a report with every result. It contains content from your invoice and therefore lives in your folders, not in the log.
One Docker image contains the web interface, the API and the official validators. It runs without a database, without a cache that survives restarts and without outbound connections.
Build and start
The image is built from the source code. While building it downloads the pinned versions of the validators and verifies their SHA-256 sums. Afterwards the application is available under /ebilling.
shellShell
# build once from the source tree (downloads the pinned validators, checks their SHA-256)docker build -f docker/Dockerfile -t dignum-ebilling .# run (open: http://localhost:3000/ebilling)docker run -d-p 127.0.0.1:3000:3000 --name ebilling dignum-ebilling
Hardened start with Docker
Like the compose file: read-only file system, temporary folders in memory, no extra privileges, limited resources.
The supplied file docker/compose.yml binds the port to localhost only. Put a reverse proxy with TLS in front.
docker/compose.ymlYAML
services:ebilling:build:context: ..dockerfile: docker/Dockerfileimage: dignum-ebilling:latestcontainer_name: dignum-ebillingrestart: unless-stoppedports: - "127.0.0.1:3000:3000"environment:# Requests per minute and client for the API (0 disables the limit, e.g. behind your own gateway)EBILLING_RATE_LIMIT_PER_MINUTE:"60"# Comma separated API keys. Empty = API usable without a keyEBILLING_API_KEYS:""# Maximum upload size in megabytesEBILLING_MAX_UPLOAD_MB:"25"read_only:truetmpfs: - /tmp:size=768m,mode=1777 - /app/apps/web/.next/cache:size=64m,uid=1000,gid=1000security_opt: - no-new-privileges:truecap_drop: - ALLpids_limit:512mem_limit: 3gcpus:3
Environment variables
Service and engines are configured through environment variables. The values in the Image group are set in the image and only need changing for custom paths.
Service
Variable
Default
Meaning
PORT
3000
Port of the web server inside the container.
HOSTNAME
0.0.0.0
Address the server binds to.
EBILLING_RATE_LIMIT_PER_MINUTE
60
Budget in tokens per minute and client. 0 switches the limit off, for example behind your own gateway.
EBILLING_API_KEYS
empty
Comma-separated API keys or SHA-256 digests with the prefix sha256:. Empty: the API can be used without a key; health and openapi.json always stay open.
EBILLING_MAX_UPLOAD_MB
25
Largest permitted request in megabytes.
EBILLING_RATE_LIMIT_HEAVY_COST
3
Tokens a heavy request costs (official validation, PDF work, extraction).
EBILLING_CORS_ORIGINS
*
Allowed origins for browser access: * for all, a comma-separated list, or empty for no CORS headers.
EBILLING_ACCESS_LOG
empty
Not set: no access log. With 1 the API writes one JSON line per request with time, route template, status, duration and id, never content.
Engines
Variable
Default
Meaning
EBILLING_API_CONCURRENCY
3
Simultaneous runs of the official validators; further requests wait up to 8 seconds, then 503 follows.
EBILLING_JAVA_OPTS
-Xmx768m -XX:+UseSerialGC
JVM options for KoSIT and Mustang. The heap is capped so that the container stays within its memory limit.
EBILLING_KOSIT_MODE
daemon
auto, daemon or cli: KoSIT as a long-running internal service or started anew per request.
EBILLING_KOSIT_CONCURRENCY
2
Parallel KoSIT validations.
EBILLING_MUSTANG_CONCURRENCY
1
Parallel Mustang runs for PDFs.
EBILLING_KOSIT_TIMEOUT_MS
60000
Time limit per KoSIT validation in milliseconds.
EBILLING_MUSTANG_TIMEOUT_MS
180000
Time limit per PDF in milliseconds.
EBILLING_KOSIT_IDLE_MS
300000
After this idle time the KoSIT service stops and frees memory.
EBILLING_TMP
/tmp/ebilling
Working folder for temporary files. It lives in the tmpfs and is emptied after every request.
Paths set in the image
Variable
Default
Meaning
EBILLING_JAVA
/opt/java/openjdk/bin/java
Java executable.
EBILLING_KOSIT_JAR
/opt/ebilling/kosit/validator.jar
KoSIT validator.
EBILLING_KOSIT_CONFIG
/opt/ebilling/kosit/config
Folder with the XRechnung configuration (scenarios.xml).
EBILLING_MUSTANG_JAR
/opt/ebilling/mustang/mustang-cli.jar
Mustang CLI.
EBILLING_GS
/usr/bin/gs
Ghostscript for PDF/A repair.
EBILLING_GS_ICC
/usr/share/color/icc/ghostscript/srgb.icc
sRGB colour profile for the PDF/A output.
Health check
The endpoint /ebilling/api/v1/health answers cheaply and without authentication. The image checks it itself every 30 seconds; orchestrators can use the same path for readiness.
Rule sets, fonts and colour profiles are part of the image. At runtime there are no CDN requests, no font services, no update checks and no telemetry. XML processing does not resolve external entities or schemas.
Block outbound traffic
Only the build downloads the validators from the official GitHub releases. After that you can place the container in a network without internet access.
Updating the validators
The versions are pinned in the Dockerfile and compared against a checksum file during the build. The XRechnung configuration is released twice a year; an update is a new build.
# 1. set the new version in docker/Dockerfile and docker/toolchain.json# 2. replace the matching checksum in docker/toolchain.sha256 (the build stops if it does not match)# 3. rebuild and restartdocker compose -f docker/compose.yml up -d--build# 4. confirm the engine versionscurl-fsS http://127.0.0.1:3000/ebilling/api/v1/health
If a checksum does not match, the build stops. Enter the sums of the new files in docker/toolchain.sha256 and update the versions in docker/toolchain.json. Pin your production to an image tag.
Resources
The reference system of the public instance runs with these limits. They are experience values, not measured minimums; the Java processes are the largest item.
Memory
3 GB
CPU cores
3
tmpfs for /tmp
768 MB
Java heap
768 MB
KoSIT in parallel
2
Mustang in parallel
1
Reverse proxy
Put a proxy with TLS in front of the image. It must let uploads of up to 26 MB through and allow long requests. Log neither the body nor the query string. The image is built for the path /ebilling; to serve it under another path, rewrite it in the proxy.
nginxText
location /ebilling/ { proxy_pass http://127.0.0.1:3000; client_max_body_size 26m; # API limit is 25 MB proxy_read_timeout 200s; # slowest engine: 180 s proxy_set_header Host $host; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto $scheme;}# access log: use a log_format without $request_body and without $args / $request_uri
07Architecture
One core, three ways in
The browser computes locally, the API bundles the official validators, and your systems use both paths with the same result.
Browser engine
Creating, extracting and the built-in validation rules run in the browser. A document only goes to the server if you want the official validation.
REST API
The API is a pure function of the request: it processes in memory, answers and forgets. It knows neither accounts nor sessions.
Official validators
KoSIT and Mustang are the yardstick: whatever we produce has to pass there. They run in the same container as internal services and cannot be reached from outside.
CLI and hot folder
The same functions without a network as soon as the validators are available locally.
08Versions
What is checked today
All versions come from one source and are pinned in the Docker image. State of the information: November 27, 2026.
Component
Version
Role
XRechnung
3.0.22026-08-31
German standard (CIUS) for e-invoices to public administration; the row shows the date of the validator configuration.
KoSIT Validator
1.6.3
Official validator for XML: schema, EN 16931 and XRechnung.
Mustang CLI + veraPDF
2.26.0
Validation of hybrid PDFs with veraPDF (PDF/A-3) and embedded XML.
EN 16931 (CEN)
1.3.x1.3.17
European standard EN 16931, CEN validation artefacts in the release shown.
Java (Temurin JRE)
21
Runtime of the validators, shipped in the image.
API v1
1.0.0
Version of the API contract, independent of the application version.
Responses name the versions involved in the engines member and in the Ebilling-Engines header. The rule sets change on fixed dates; rule ids and the number of rules can change without the API version changing.
Changes
November 27, 2026
Validation toolchain pinned
KoSIT validator 1.6.3, Mustang 2.26.0 with veraPDF and Java 21 are pinned in the Docker image and secured by SHA-256.
November 27, 2026
API v1, contract 1.0.0
Endpoints validate, convert, create, extract, transform, render, health and openapi.json with a uniform error model per RFC 9457.
August 31, 2026
XRechnung 3.0.2
Release of the validator configuration for XRechnung 3.0.2, which this application uses.
Within v1 only additive changes are made. A future major version runs alongside v1 for at least twelve months; deprecations are announced through the Deprecation and Sunset headers.