Factur-X & ZUGFeRD 2.3 E-Invoice Validation Engine
Pure-compute edge engine that extracts the embedded UN/CEFACT CII XML from Factur-X and ZUGFeRD PDF/A-3 hybrids, detects the Factur-X profile, and applies the exact EN 16931 business rules in a single deterministic call.
⚡ Live Pure-Compute Playground
Test deterministic edge parsing with sub-2ms execution across 330+ Cloudflare V8 edge locations. Zero persistent storage, zero cold-starts, pure function $f(x)=y$.
{
"status": "Click RUN VALIDATION to execute on the Cloudflare edge..."
}
Key Capabilities & Performance Architecture
- ✓ PDF/A-3 attachment extraction: reads factur-x.xml and zugferd-invoice.xml from hybrid invoice PDFs
- ✓ UN/CEFACT CII validation for Factur-X 1.0.x, ZUGFeRD 2.x and XRechnung documents
- ✓ EN 16931 business rules BR-01 through BR-65 with exact rule IDs, paths, and severities
- ✓ Profile detection and profile-scoped required fields: MINIMUM, BASIC WL, BASIC, EN 16931, EXTENDED, XRechnung
- ✓ Structured invoice extraction: parties, VAT breakdown, monetary totals, and line items as JSON
- ✓ Batch validation endpoint for up to 25 documents per request with per-document results
- ✓ Deterministic sub-5ms execution on Cloudflare Workers edge isolates with zero data storage
- ✓ Standard JSON envelope with latency, version, and rule-level diagnostics
E-Invoicing & B2B Tax Mandates (4 Specifications)
Explore full structural breakdowns, checksum logic, and field schemas for every supported format.
Factur-X PDF/A-3 Attachment Extraction & Validation API
Extract the embedded UN/CEFACT CII XML from Factur-X and ZUGFeRD PDF/A-3 hybrid invoices and return the validated invoice model as JSON.
View Specification →ZUGFeRD 2.3 CII E-Invoice Validator & Parser
Validate and parse German ZUGFeRD 2.x / Factur-X CII invoices with profile-scoped EN 16931 business rules.
View Specification →XRechnung CII Validator API (EN 16931)
Validate XRechnung CII documents against the full EN 16931 business-rule set and return exact rule IDs with JSON paths.
View Specification →Factur-X Profile Detection (BT-24) & EN 16931 Rule Scoping
Detect the Factur-X profile from the specification identifier (BT-24) and run the profile-scoped EN 16931 business rules.
View Specification →API Endpoints & Request Signatures
| Method | Path | Description |
|---|---|---|
POST | /api/v1/validate | Validate a Factur-X/ZUGFeRD PDF/A-3 or CII XML invoice against EN 16931 rules |
POST | /api/v1/parse | Extract the structured invoice model with the full validation report |
POST | /api/v1/validate/batch | Validate up to 25 CII XML invoices per request with per-document results |
GET | /api/v1/profiles | List the supported Factur-X and ZUGFeRD profiles with their specification identifiers |
GET | /health | Service health check |
Sample Response JSON Payload
All endpoints deliver strongly-typed envelopes with deterministic parsing and performance metrics.
{
"success": true,
"data": {
"valid": true,
"container": "XML",
"attachment": null,
"syntax": "CII",
"profile": "EN16931",
"profileId": "urn:factur-x.eu:1p0:en16931",
"summary": {
"status": "COMPLIANT",
"fatalCount": 0,
"warningCount": 0
},
"violations": []
},
"meta": {
"latency_ms": 2.1,
"version": "1.0.0"
}
}
Multi-Language Integration Code
Copy and paste ready-to-run snippets with your direct API credentials. Get a free API key → (no credit card required):
curl --request POST \
--url "https://api.stanzaapi.com/factur-x-validator/api/v1/validate" \
--header "Content-Type: application/json" \
--header "x-api-key: YOUR_API_KEY" \
--data '{
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><rsm:CrossIndustryInvoice xmlns:rsm=\"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100\">...</rsm:CrossIndustryInvoice>"
}'
const response = await fetch("https://api.stanzaapi.com/factur-x-validator/api/v1/validate", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": process.env.API_KEY || "YOUR_API_KEY"
},
body: JSON.stringify({
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><rsm:CrossIndustryInvoice xmlns:rsm=\"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100\">...</rsm:CrossIndustryInvoice>"
})
});
const data = await response.json();
console.log(data);
import requests
import json
url = "https://api.stanzaapi.com/factur-x-validator/api/v1/validate"
headers = {
"Content-Type": "application/json",
"x-api-key": "YOUR_API_KEY"
}
payload = {
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><rsm:CrossIndustryInvoice xmlns:rsm=\"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100\">...</rsm:CrossIndustryInvoice>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
package main
import (
"bytes"
"fmt"
"io"
"net/http"
"os"
)
func main() {
url := "https://api.stanzaapi.com/factur-x-validator/api/v1/validate"
payload := []byte(`{"xml":"<?xml version=\"1.0\" encoding=\"UTF-8\"?><rsm:CrossIndustryInvoice xmlns:rsm=\"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100\">...</rsm:CrossIndustryInvoice>"}`)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(payload))
req.Header.Add("Content-Type", "application/json")
req.Header.Add("x-api-key", os.Getenv("API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
Frequently Asked Questions
Factur-X is the French-German hybrid e-invoice standard: a PDF/A-3 file with an embedded UN/CEFACT CrossIndustryInvoice XML attachment named factur-x.xml. ZUGFeRD 2.x is the German name for the same EN 16931 model; the API accepts both naming conventions and profiles.
Both work. Send the PDF/A-3 file (application/pdf or pdf_base64) and the API extracts the embedded XML, or send the CII XML directly as raw XML or a JSON xml field. Batch validation accepts XML documents.
MINIMUM, BASIC WL, BASIC, EN 16931 (COMFORT), EXTENDED and XRechnung are detected from the specification identifier (BT-24). EN 16931, EXTENDED and XRechnung documents run the full EN 16931 business-rule set; reduced profiles are checked against their profile-mandatory fields.
The API returns HTTP 200 with valid: false, a NON_COMPLIANT summary, and an array of violations carrying the exact rule ID (for example BR-CO-10 or FX-PROFILE-BASIC_WL-09), the failing path, the severity, and a description.
It supports the German B2B e-invoicing mandate (receiving since January 2025, issuing phased through 2027-2028), the French B2B e-invoicing and e-reporting mandate effective for large companies in September 2026, and XRechnung requirements for German public-sector invoicing.
Complementary Enterprise APIs
Seamlessly orchestrate data pipelines across adjacent financial, regulatory, and supply-chain protocols:
Peppol BIS Billing 3.0 →
Validate UBL 2.1 and CII e-invoices against EN 16931 and Peppol BIS Billing 3.0 rules.
ISO 20022 Financial Messaging →
Bridge validated e-invoice totals into ISO 20022 credit transfer instructions and reconciliation.
European VIES VAT Validator →
Check supplier and customer VAT identifiers before accepting a hybrid e-invoice.