---
title: Factur-X & ZUGFeRD 2.3 API | EN 16931 PDF/A-3 E-Invoice Validator & CII Parser
description: Validate Factur-X, ZUGFeRD 2.3, XRechnung and EN 16931 e-invoices from PDF/A-3 or UN/CEFACT CII XML. Extract embedded factur-x.xml attachments, run EN 16931 business rules (BR-01..BR-65), detect MINIMUM, BASIC WL, BASIC, EN 16931, EXTENDED and XRechnung profiles, and return structured JSON in a single API call for the French September 2026 and German B2B e-invoicing mandates.
canonical: https://stanzaapi.com/tools/factur-x-validator/
---

[Home](/)/[API Directory](/tools/)/Factur-X & ZUGFeRD 2.3 E-Invoice Validation Engine

 <5ms Edge Latency99.9% SLA AvailableVerified: Sep 2026V8 Pure ComputeElectronic Invoicing & Tax Compliance

# 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.

[Get Free API Key →](/login)[⚡ Live Playground](#live-playground)[Plans & Pricing](/pricing)

 Interactive Edge Workbench

## ⚡ 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$.

32KB Demo Cap60 req/min Burst<2ms V8 ComputeZero Data Retention

input.xml0 B

 Reset

1

<?xml version="1.0" encoding="UTF-8"?><rsm:CrossIndustryInvoice xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"><rsm:ExchangedDocumentContext><ram:GuidelineSpecifiedDocumentContextParameter><ram:ID>urn:factur-x.eu:1p0:en16931</ram:ID></ram:GuidelineSpecifiedDocumentContextParameter></rsm:ExchangedDocumentContext><rsm:ExchangedDocument><ram:ID>FX-2026-0001</ram:ID><ram:TypeCode>380</ram:TypeCode><ram:IssueDateTime><udt:DateTimeString format="102">2026-09-15</udt:DateTimeString></ram:IssueDateTime></rsm:ExchangedDocument><rsm:SupplyChainTradeTransaction><ram:IncludedSupplyChainTradeLineItem><ram:AssociatedDocumentLineDocument><ram:LineID>1</ram:LineID></ram:AssociatedDocumentLineDocument><ram:SpecifiedTradeProduct><ram:Name>Consulting services</ram:Name></ram:SpecifiedTradeProduct><ram:SpecifiedLineTradeAgreement><ram:NetPriceProductTradePrice><ram:ChargeAmount>100.00</ram:ChargeAmount></ram:NetPriceProductTradePrice></ram:SpecifiedLineTradeAgreement><ram:SpecifiedLineTradeDelivery><ram:BilledQuantity unitCode="C62">2</ram:BilledQuantity></ram:SpecifiedLineTradeDelivery><ram:SpecifiedLineTradeSettlement><ram:ApplicableTradeTax><ram:TypeCode>VAT</ram:TypeCode><ram:CategoryCode>S</ram:CategoryCode><ram:RateApplicablePercent>19.00</ram:RateApplicablePercent></ram:ApplicableTradeTax><ram:SpecifiedTradeSettlementLineMonetarySummation><ram:LineTotalAmount>200.00</ram:LineTotalAmount></ram:SpecifiedTradeSettlementLineMonetarySummation></ram:SpecifiedLineTradeSettlement></ram:IncludedSupplyChainTradeLineItem><ram:ApplicableHeaderTradeAgreement><ram:SellerTradeParty><ram:Name>Stanza GmbH</ram:Name><ram:PostalTradeAddress><ram:CountryID>DE</ram:CountryID></ram:PostalTradeAddress><ram:SpecifiedTaxRegistration><ram:ID schemeID="FC">DE123456789</ram:ID></ram:SpecifiedTaxRegistration></ram:SellerTradeParty><ram:BuyerTradeParty><ram:Name>Acme SAS</ram:Name><ram:PostalTradeAddress><ram:CountryID>FR</ram:CountryID></ram:PostalTradeAddress></ram:BuyerTradeParty></ram:ApplicableHeaderTradeAgreement><ram:ApplicableHeaderTradeDelivery/><ram:ApplicableHeaderTradeSettlement><ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode><ram:ApplicableTradeTax><ram:CalculatedAmount>38.00</ram:CalculatedAmount><ram:TypeCode>VAT</ram:TypeCode><ram:BasisAmount>200.00</ram:BasisAmount><ram:CategoryCode>S</ram:CategoryCode><ram:RateApplicablePercent>19.00</ram:RateApplicablePercent></ram:ApplicableTradeTax><ram:SpecifiedTradeSettlementHeaderMonetarySummation><ram:LineTotalAmount>200.00</ram:LineTotalAmount><ram:TaxBasisTotalAmount>200.00</ram:TaxBasisTotalAmount><ram:TaxTotalAmount currencyID="EUR">38.00</ram:TaxTotalAmount><ram:GrandTotalAmount>238.00</ram:GrandTotalAmount><ram:DuePayableAmount>238.00</ram:DuePayableAmount></ram:SpecifiedTradeSettlementHeaderMonetarySummation></ram:ApplicableHeaderTradeSettlement></rsm:SupplyChainTradeTransaction></rsm:CrossIndustryInvoice>

 RUN VALIDATION (<5ms) [ CHECKSUM: AWAITING RUN ]

output.jsondemo-ready

Status: Ready Copy

```
{
  "status": "Click RUN VALIDATION to execute on the Cloudflare edge..."
}
```

Sandbox Quota: Free Tier (50 reqs/mo) • Production keys from $29/mo[Get Free Sandbox Key →](/login?email=)

Need 512KB+ Payloads, High-Throughput & 99.9% Production SLA?

Direct API keys include pooled monthly quotas, zero cold-starts, and HIPAA BAA eligibility on the Mega tier.

[Get Production API Key →](/pricing)

## 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 →](/tools/factur-x-validator/standards/pdf-a-3-factur-x-extraction)[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 →](/tools/factur-x-validator/standards/zugferd-2-3)[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 →](/tools/factur-x-validator/standards/xrechnung-cii)[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 →](/tools/factur-x-validator/profiles/en16931-profile-detection)

## 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.

HTTP 200 Response PayloadCopy

```
{
  "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 →](/login) (no credit card required):

cURLCopy

```
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>"
}'
```

Node.js (Fetch)Copy

```
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);
```

Python (Requests)Copy

```
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())
```

GoCopy

```
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

What is Factur-X and how does it relate to ZUGFeRD 2.x?

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.

Do I have to send the PDF or can I send the XML?

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.

Which profiles are supported?

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.

What happens when an invoice fails validation?

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.

Which mandates does this API cover?

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.](/tools/peppol-validator/)[ISO 20022 Financial Messaging → — Bridge validated e-invoice totals into ISO 20022 credit transfer instructions and reconciliation.](/tools/iso20022-parser/)[European VIES VAT Validator → — Check supplier and customer VAT identifiers before accepting a hybrid e-invoice.](/tools/vat-validator/)
