XRechnung Invoice Generator
Pricing
from $10.00 / 1,000 invoice generateds
XRechnung Invoice Generator
Generate XRechnung 3.0.2 UBL or CII from strict JSON and validate it with the pinned KoSIT rules before delivery.
Pricing
from $10.00 / 1,000 invoice generateds
Rating
0.0
(0)
Developer
Kamer Ozkan
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
7 days ago
Last modified
Categories
Share
XRechnung invoice generator: strict JSON in, a generated and technically validated XRechnung 3.0.2 e-invoice XML out, in UBL or UN/CEFACT CII syntax.
The Actor calculates totals with decimal arithmetic, generates the target invoice, runs an independent pinned validation stack (the official KoSIT validator with the XRechnung configuration), stores only accepted artifacts, and returns a SHA-256 evidence record. A rejected artifact is not delivered and not charged.
Who it is for
- Billing, ERP and accounting developers who must send XRechnung to German public-sector buyers (Bund, Laender, Kommunen) and do not want to build and maintain the EN 16931 mapping and the KoSIT checks themselves.
- SaaS tools that serve German B2B customers under the e-invoicing obligation (receiving since 2025, sending phased in from 2027) and want a pay-per-invoice XRechnung generator behind an API.
- Teams that upload invoices to a portal such as ZRE or OZG-RE, or send them over Peppol, and want every XML to pass the KoSIT rules before it leaves their system.
Input
Use invoice for one document or invoices for a batch of up to 100. Amounts and
quantities must be JSON strings such as "19.00", not floating-point numbers.
The input schema exposes the complete production v1 canonical model and the strict
product extension (extensions.xrechnung). Unknown fields are rejected instead of being
silently ignored.
buyer_reference, seller contact details, and seller/buyer electronic endpoint identifiers
are required by the XRechnung path. For public-sector buyers the buyer_reference is usually
the Leitweg-ID the buyer gave you.
Input example (the Actor's prefilled example, shortened):
{"invoice": {"invoice_number": "INV-2026-0001","issue_date": "2026-07-29","due_date": "2026-08-28","currency": "EUR","invoice_type_code": "380","buyer_reference": "BUYER-REF-1001","seller": {"name": "Example Supplier GmbH", "vat_id": "DE123456789","endpoint_id": "4000001123452", "endpoint_scheme": "0088","email": "billing@example-supplier.test", "contact_name": "Billing Team", "phone": "+49 30 1234567","address": {"line1": "Musterstrasse 10", "city": "Berlin", "postal_code": "10115", "country_code": "DE"}},"buyer": {"name": "Example Buyer GmbH", "vat_id": "DE987654321","endpoint_id": "4000001987658", "endpoint_scheme": "0088","address": {"line1": "Einkaufsweg 20", "city": "Hamburg", "postal_code": "20095", "country_code": "DE"}},"lines": [{"id": "1", "description": "Consulting services", "quantity": "2", "unit_code": "HUR","unit_price": "500.00", "tax_rate": "19", "tax_category": "S"}],"payment": {"means_code": "30", "reference": "INV-2026-0001", "iban": "DE89370400440532013000"},"extensions": {"xrechnung": {"syntax": "ubl"}}}}
Set "syntax": "cii" to get UN/CEFACT CII instead of UBL.
Production v1 capabilities
- Select UBL Invoice or UN/CEFACT CII syntax in the same product.
- Generate invoices, credit notes, and corrected invoices supported by the adapter.
- Map EN 16931 parties, delivery, references, periods, attachments, allowances, charges, payment data, tax groups, and monetary totals.
- Run the release-pinned KoSIT XRechnung validator and return its findings.
Output
Each dataset row contains the technical assessment, artifact key, evidence key, hash, byte count, generator version, standard version, pinned ruleset, and bounded findings. The artifact and evidence JSON are private key-value store records.
| Field | Meaning |
|---|---|
invoiceNumber | Your invoice number |
conformanceStatus | ACCEPTED, or the reason it was not |
artifactDelivered | true when the XML was stored and charged |
artifactKey | Key of the XRechnung XML in the run's key-value store |
evidenceKey | Key of the evidence JSON |
evidence.artifactSha256 | SHA-256 of the XML |
evidence.ruleArtifactSha256 | SHA-256 of the pinned KoSIT validator and XRechnung configuration |
evidence.validation | Engine, scenario, profile, counts and findings |
Output example (real row from run PdjARTQM1IfdEwphY with the example input, shortened):
{"inputIndex": 0,"invoiceNumber": "INV-2026-0001","processingStatus": "SUCCEEDED","conformanceStatus": "ACCEPTED","artifactDelivered": true,"artifactKey": "ARTIFACT-0001-INV-2026-0001.xml","evidenceKey": "EVIDENCE-0001.json","evidence": {"standard": "XRechnung","artifactSha256": "89cdfd839c5ab93d31f2966004b71ad02698fb91e44862fae18ca773fb9fa3c6","artifactBytes": 4939,"versions": {"generator": "1.0.0", "standard": "3.0.2", "ruleset": "KoSIT XRechnung validator configuration 2026-01-31"},"validation": {"status": "ACCEPTED","engine": "KoSIT validator 1.6.0","scenario": "EN16931 XRechnung (UBL Invoice)","profile": "XRECHNUNG_3.0.2","counts": {"fatal": 0, "error": 0, "warning": 0, "information": 0},"findings": []},"transmitted": false},"error": null}
The same input with "syntax": "cii" (run b3a8asHuHgDULkmDT) returns scenario
EN16931 XRechnung (CII), also ACCEPTED.
How much does it cost?
You pay $0.01 per generated invoice that passed validation and was delivered, plus the Apify
Actor start event of $0.00005 (counted per GB of run memory as Apify defines it, a fraction of a
cent per run). Invoices that end in NEEDS_INPUT or fail generation or validation are not charged.
Worked example: one batch run with 100 invoices costs 100 x $0.01 = $1.00 plus the start event. A single invoice in its own run costs $0.01 plus the start event. Batching up to 100 invoices per run keeps the start fee negligible.
How to generate an XRechnung invoice
- Open the Actor and click Try for free. The example input is a complete XRechnung invoice between two German companies.
- Replace seller, buyer, lines and payment with your data. Keep amounts and quantities as strings,
put the buyer's Leitweg-ID (or your agreed reference) into
buyer_reference, and fill in the seller contact (name, phone, email). - Choose
ublorciiinextensions.xrechnung.syntax. For a credit note use invoice type code381. - Click Start. Each dataset row shows
ACCEPTEDor the findings; the XML artifact and the evidence JSON are in the run's key-value store under the keys given in the row. - Upload or send the XML through your own channel (portal, Peppol Access Point, email). This Actor does not transmit it.
Integrations and API
Call it from your billing system with the Apify API or the apify-client package and download
the XML from the key-value store:
from apify_client import ApifyClientclient = ApifyClient("<YOUR_APIFY_TOKEN>")run = client.actor("kamerozkan/xrechnung-invoice-generator").call(run_input={"invoices": [invoice_1, invoice_2]})store = client.key_value_store(run["defaultKeyValueStoreId"])for row in client.dataset(run["defaultDatasetId"]).iterate_items():if row["artifactDelivered"]:xml = store.get_record(row["artifactKey"])["value"]
curl -X POST "https://api.apify.com/v2/acts/kamerozkan~xrechnung-invoice-generator/runs?token=<YOUR_APIFY_TOKEN>" \-H "Content-Type: application/json" -d @invoice.json
It also works from Make, n8n, Zapier or any HTTP client, and a webhook on ACTOR.RUN.SUCCEEDED
can push the finished XML to your portal upload, Access Point integration or document storage.
FAQ
Which XRechnung version and rules are used? XRechnung 3.0.2, checked with the KoSIT validator 1.6.0 and the XRechnung validator configuration of 2026-01-31. Both files are pinned by SHA-256 and the hashes are in each evidence record.
UBL or CII, which one should I pick? Both are valid XRechnung syntaxes. Use the one your buyer or portal asks for; if nobody asks, UBL is the common choice for Peppol and CII for ZUGFeRD-style toolchains.
Does it send the invoice to the authority or over Peppol? No. It generates and technically checks the XML; you upload or send it yourself.
Why must amounts be strings? To keep exact decimal arithmetic. Floating-point numbers are rejected so totals and VAT never drift by a cent.
What happens if my input is incomplete? The row reports NEEDS_INPUT with the missing or
invalid fields, and nothing is charged for that invoice.
Can I only validate or read an existing XRechnung? Use the separate XRechnung XML batch validator or the XRechnung to JSON parser Actors from the same author.
Is my invoice data public? No. Artifacts and evidence are stored in your run's private key-value store, and the dataset row holds only hashes, keys and findings.
Something is not working? Open an issue on the Issues tab with your run link.
Operational boundary
This Actor generates and validates the document. It does not submit to Peppol,
KSeF, SdI, or a French platform. It does not authenticate to an authority, create
a qualified signature, perform legal archival, assign an official network
identifier, or guarantee recipient or tax-authority acceptance. ACCEPTED means
the generated artifact passed the documented pinned offline technical gate.