XRechnung & ZUGFeRD Invoice Validator API
Pricing
from $4.00 / 1,000 invoice validated
XRechnung & ZUGFeRD Invoice Validator API
Validate XRechnung 3.0.x XML and ZUGFeRD 2.5 or Factur-X 1.09 XML/PDF with pinned rules and structured findings. Batch e-invoice validation and E-Rechnung Prüfung for accounts payable automation, Steuerberater workflows, ERP and einvoice pipelines via API, n8n, Make, or MCP agents.
Pricing
from $4.00 / 1,000 invoice validated
Rating
0.0
(0)
Developer
Kamer Ozkan
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
0
Monthly active users
8 days ago
Last modified
Categories
Features
Share
Validate XRechnung XML and ZUGFeRD or Factur-X XML/PDF invoices through one API. Every evaluated invoice receives a deterministic technical assessment, structured findings, SHA-256 evidence, and the exact pinned rule versions.
Technical validation only.
ACCEPTEDmeans every required validation layer accepted the submitted invoice. It does not establish legal or tax validity, authenticity, successful delivery, visible PDF versus XML equality, or recipient acceptance.
What is validated
| Input | Required checks |
|---|---|
| XRechnung XML | KoSIT Validator 1.6.0 with XRechnung configuration v2026-01-31 |
| ZUGFeRD or Factur-X CII XML | Exact profile allowlist, ZUGFeRD 2.5 XSD, and profile Schematron |
| ZUGFeRD or Factur-X PDF | PDF/A-3 with veraPDF, safe embedded XML extraction, XMP and attachment consistency, then the complete CII XML checks |
The hybrid PDF result is accepted only when all required layers pass. PDF/A compliance alone is never treated as a valid invoice.
Supported ZUGFeRD and Factur-X profiles:
MINIMUMBASIC_WLBASICEN16931EXTENDED
Legacy ZUGFeRD 2.0 guideline identifiers are recognized as their matching profiles and validated against the same pinned rule set; this recognition is an explicit allowlist entry, not a fuzzy match.
XRechnung CII remains on the pinned KoSIT path. Unsupported or lookalike guideline identifiers are not silently mapped to a profile.
Quick start
The default input validates an official XRechnung sample:
{"documents": [{"documentId": "xrechnung-sample","fileName": "01.01a-INVOICE_ubl.xml","url": "https://raw.githubusercontent.com/itplr-kosit/xrechnung-testsuite/v2026-01-31/src/test/business-cases/standard/01.01a-INVOICE_ubl.xml"}],"resultDetail": "FINDINGS","maxFindingsPerDocument": 100,"storeXmlReport": false,"storeHtmlReport": false,"storePdfaReport": false,"storeExtractedInvoiceXml": false}
Send a hybrid invoice as an HTTPS URL or base64:
{"documents": [{"documentId": "supplier-invoice-1042","fileName": "supplier-invoice-1042.pdf","url": "https://example.com/signed/invoice-1042.pdf"}],"resultDetail": "FINDINGS"}
Each documents item must contain exactly one source field: url, xml, or base64. Console file upload and customer key-value store records are also supported.
The input and output schemas are agent-readable and work with the Apify API, MCP clients, Make, n8n, webhooks, and standard SDKs.
Output
One dataset item is returned for every submitted entry. A technically rejected invoice is a successful validation, not a processing failure.
The two records below are verbatim field subsets from live Apify run R9gep9fAWMbrVA96h on build 0.0.9, executed on 2026-07-29. Omitted fields were not reconstructed.
This Actor is also exposed to AI agents through Apify's MCP server (mcp.apify.com): an agent can discover it by search and run it with the same pay-per-event billing, with no separate integration.
Input settings
| Field | Type | Default | What it controls |
|---|---|---|---|
invoiceFiles | File array | [] | Direct upload of XRechnung XML, ZUGFeRD / Factur-X CII XML, or hybrid PDF/A-3 files (up to 100 XML / 20 PDF per run). |
documents | JSON array | Official XRechnung sample | List of objects, each with optional documentId and fileName plus exactly one source: url (HTTPS), xml, or base64. |
sourceKeyValueStoreId | Key-value store ID | Unset | Optional Apify key-value store containing XML or PDF invoice records. |
keyValueStoreKeys | String array | [] | Record keys to read from sourceKeyValueStoreId (up to 100). |
resultDetail | Select | "FINDINGS" | FINDINGS returns rule IDs, severities, messages, and XPath/location details; SUMMARY returns status and severity counts only. |
maxFindingsPerDocument | Integer (1 to 500) | 100 | Caps the returned findings array per invoice without changing counts. |
storeXmlReport | Boolean | false | Saves the raw KoSIT or normalized ZUGFeRD XML report to the run key-value store. |
storeHtmlReport | Boolean | false | Saves a human-readable HTML report to the run key-value store. |
storePdfaReport | Boolean | false | Saves the sanitized veraPDF PDF/A report XML for hybrid PDFs. |
storeExtractedInvoiceXml | Boolean | false | Saves the embedded invoice XML extracted from hybrid PDFs. |
Pricing
invoice-validated:$0.004for each invoice that produces anACCEPTEDorREJECTEDresultapify-actor-start:$0.00005per GB of Actor memory, charged automatically when a run starts, with a minimum of one event
Worked example at default 2 GB memory: validating 1,000 invoices in one run costs 1,000 x $0.004 = $4.00 plus $0.0001 actor start = $4.0001 total ($0.0041 for a single-invoice test run). NOT_EVALUATED processing failures do not trigger the invoice-validated event.
Result semantics
| Processing | Conformance | Meaning | Charged validation event |
|---|---|---|---|
SUCCEEDED | ACCEPTED | Every required pinned technical layer passed | Yes |
SUCCEEDED | REJECTED | The invoice was evaluated and one or more required rules failed | Yes |
FAILED | NOT_EVALUATED | Source, format, engine, timeout, report, or budget failure prevented a decision | No |
When pay-per-event pricing is active, only evaluated rows use the invoice-validated event. Processing failures are not charged.
Optional reports
All optional records are off by default:
storeXmlReport: KoSIT report or normalized ZUGFeRD XSD and Schematron reportstoreHtmlReport: human-readable validation reportstorePdfaReport: sanitized veraPDF XML report for hybrid PDFsstoreExtractedInvoiceXml: complete XML extracted from a hybrid PDF
Returned report keys appear in the row's reports object. Raw reports and extracted XML can contain invoice data and follow the retention settings of the customer's Apify account.
Security and limits
- Validation runs locally inside the Actor container.
- No invoice is sent to a third-party validation API.
- Raw invoice content is not copied to the output dataset or logs.
- HTTPS downloads block private, local, reserved, and cloud metadata targets.
- DTDs, entities, and external XML resources are blocked.
- PDF parsing runs in an isolated process with CPU, memory, file, and descriptor limits.
- XML Schema validation runs in a separate isolated process.
- Java validation stages have timeouts and bounded reports.
- Each XML is limited to 5 MiB.
- Each PDF is limited to 20 MiB and 100 pages.
- Each PDF can expose at most 16 unique embedded file specifications.
- A run can evaluate up to 100 XML invoices, up to 20 PDF invoices, and 100 MiB total input.
- Finding fields and the total returned findings payload are bounded.
Validation findings can quote an offending invoice value. Treat results and optional reports as sensitive invoice data.
Pinned stack
| Component | Version |
|---|---|
| KoSIT Validator | 1.6.0 |
| XRechnung configuration | v2026-01-31 |
| XRechnung | 3.0.2 |
| CEN Schematron | 1.3.15 |
| ZUGFeRD rules | 2.5 |
| Factur-X rules | 1.09 |
| Mustangproject rule bundle and Saxon runtime | 2.24.0 |
| veraPDF | 1.30.2 |
Docker builds verify downloaded engines against fixed SHA-256 checksums. ZUGFeRD decisions come from the release-pinned profile XSD and Schematron assets directly, avoiding unrelated wrapper heuristics.
Release gates
The release suite covers:
- Official XRechnung accepted and rejected UBL/CII fixtures
- All 51 current FeRD ZUGFeRD 2.5 example PDF/XML pairs
- BASIC, EN16931, and EXTENDED official examples
- MINIMUM and BASIC_WL compatibility fixtures
- PDF/A failure, XML Schema failure, Schematron failure, malformed XMP, ambiguous attachments, and digest consistency negatives
Official FeRD fixtures are downloaded only for release testing and are not redistributed in the production image.
Current scope
This Actor does not verify:
- Whether visible PDF text equals the embedded XML
- Digital signatures or issuer authenticity
- Peppol delivery or recipient portal acceptance
- Tax treatment, legal validity, fraud, duplicates, or payment approval
- ZUGFeRD 1.x, generic CIUS, or EXTENDED-CTC-FR
Common processing error codes
DOCUMENT_LIMIT_EXCEEDEDPDF_RUN_LIMIT_REACHEDSOURCE_FETCH_FAILEDSOURCE_HTTP_ERRORSOURCE_TOO_LARGEUNSUPPORTED_MEDIA_TYPEPDF_MAGIC_INVALIDPDF_ENCRYPTEDXML_MALFORMEDDOCTYPE_FORBIDDENNO_SCENARIO_MATCHVALIDATION_TIMEOUTREPORT_PARSE_FAILEDREPORT_TOO_LARGEVALIDATOR_EXECUTION_FAILEDBUDGET_LIMIT_REACHEDRUN_TIME_BUDGET_REACHED
Rule failures remain in findings and produce REJECTED; they are not converted into processing errors.
Official references
- KoSIT Validator
- XRechnung validator configuration
- XRechnung test suite
- ZUGFeRD 2.5 and Factur-X 1.09
- veraPDF validation documentation
- THIRD_PARTY_NOTICES.md
Complete live example records (accepted, rejected, and unevaluated) ship with the GitHub sample repositories of this family.
Integrations and API
Run the validator from ERP jobs, CI pipelines, or accounting backends via the Apify API:
curl -X POST "https://api.apify.com/v2/acts/kamerozkan~xrechnung-xml-batch-validator-api/run-sync-get-dataset-items?token=$APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"documents": [{"documentId": "xrechnung-sample","fileName": "01.01a-INVOICE_ubl.xml","url": "https://raw.githubusercontent.com/itplr-kosit/xrechnung-testsuite/v2026-01-31/src/test/business-cases/standard/01.01a-INVOICE_ubl.xml"}],"resultDetail": "FINDINGS"}'
Use with n8n & Make
- Trigger the Run an Actor step in n8n or Make whenever a supplier invoice PDF or XML arrives by email or S3/Drive.
- Pass
{ "documents": [{ "documentId": "...", "fileName": "...", "url": "..." }], "resultDetail": "FINDINGS" }, then routeconformanceStatus == "ACCEPTED"to your ERP import andREJECTEDback to the supplier withfindings.
Use with AI Agents (Apify MCP)
- Connect your agent to
https://mcp.apify.comand selectkamerozkan/xrechnung-xml-batch-validator-api. - The schema prefill runs in ~8 seconds with structured JSON findings (
conformanceStatus,counts,findings,versions), ready for automated AP triage.
FAQ
Does a REJECTED invoice fail the Apify run?
No. A rule rejection (conformanceStatus: "REJECTED") is a completed validation with processingStatus: "SUCCEEDED" and is billed normally as one invoice-validated event.
Are invoices sent to external validation servers?
No. KoSIT Validator 1.6.0, Mustangproject 2.24.0, and veraPDF 1.30.2 execute locally inside the Actor container with pinned rulesets.
Can I validate both XRechnung XML and ZUGFeRD/Factur-X PDFs in the same batch?
Yes. Each entry in documents or invoiceFiles is routed automatically by media type and guideline identifier, up to 100 XML and 20 PDF documents per run.
Why does a PDF/A-compliant file still return REJECTED?
Hybrid PDFs must pass veraPDF PDF/A-3 checks, safe embedded XML extraction, XMP/attachment consistency, and the full ZUGFeRD 2.5 / Factur-X 1.09 XML Schema and Schematron validation.
E-invoice validator family
Same engine, same output contract, one validator per market: Peppol BIS Billing | Poland KSeF FA(3) | France E-Invoice | Italy FatturaPA Parsing: ZUGFeRD & Factur-X PDF to JSON parser
Support and feedback
- Found a bug or missing a field? Open an issue on the Issues tab of this Actor. We reply within 48 hours and ship most fixes within a few days.
- Have an idea for a feature? Issues are the fastest way to get it built.
- If the Actor saves you time, a short review on this page helps other users find it.