Skip to main content

ZUGFeRD & Factur-X in docs101

What is ZUGFeRD/Factur-X?

ZUGFeRD (Zentraler User Guide des Forums elektronische Rechnung Deutschland) and Factur-X are hybrid invoice formats that combine a human-readable PDF with machine-readable XML data embedded inside the same file. This enables:

  • Automatic invoice processing by accounting software without manual data entry
  • Compliance with the European standard EN 16931
  • Seamless cross-border invoice exchange across the EU
  • Reliable validation of invoice data by any party in the chain

docs101 automatically generates invoices in ZUGFeRD/Factur-X format when both the company and the customer address are in a supported country. For other country combinations, invoices are generated as standard PDFs. See below for details on when each format applies.

info

ZUGFeRD and Factur-X are technically the same standard — ZUGFeRD is the German name, Factur-X is the French/international name. docs101 produces invoices that are valid under both designations.

When ZUGFeRD/Factur-X Format Is Used

docs101 determines the invoice format based on the countries of your company and the customer address on the invoice:

Company CountryCustomer Address CountryFormat
Germany (DE)Germany (DE)ZUGFeRD/Factur-X
France (FR)France (FR)ZUGFeRD/Factur-X
All other combinationsAnyPDF only

This detection runs automatically when you select or change the customer address on an invoice. You can also override the format manually using the format badge on the invoice detail page while the invoice is in Draft status.

Format Badge

The invoice format is displayed as a badge next to the status on the invoice detail page. Click it in Draft status to switch between PDF and ZUGFeRD.

For PDF-only invoices, docs101 generates a standard PDF without embedded XML. No KOSiT validation is performed, and the XML download is not available for these invoices.

How docs101 Generates ZUGFeRD Invoices

Every ZUGFeRD/Factur-X invoice you create in docs101 goes through a three-step process:

1. PDF Generation

Your invoice is rendered as a professional, printable PDF/A-3 document with all visual elements — logo, formatting, line items, totals, and payment details.

2. XML Generation and Embedding

docs101 converts your invoice data into a ZUGFeRD/Factur-X XML file via an external API. The XML conforms to the EN 16931 standard and is embedded directly inside the PDF. The embedded XML contains:

  • Invoice metadata — Invoice number, issue date, due date, currency
  • Seller information — Company name, address, VAT number, tax identification number
  • Buyer information — Customer name, address, VAT number
  • Line items — Descriptions, quantities, unit prices, net amounts, VAT rates and amounts
  • VAT breakdowns — Totals grouped by VAT category (standard, reduced, zero-rated, exempt, reverse charge, intra-community, export)
  • Financial totals — Net total, tax total, gross total, payable amount
  • Payment terms — Due date, early payment discount, payment conditions text
  • Bank details — IBAN, BIC, account holder (when configured as default)
  • References — Purchase order number, contract number, or other identifiers

3. KOSiT Validation

After generating the XML, docs101 validates it using the KOSiT validator (Koordinierungsstelle fuer IT-Standards). This is the official German validation tool for EN 16931 e-invoices. The validator checks:

  • XML schema conformance
  • Schematron business rule compliance
  • Correct use of code lists and identifiers
  • EN 16931 mandatory field presence

If validation fails, docs101 reports the specific errors so they can be resolved before the invoice is finalized.

tip

KOSiT validation happens automatically during invoice generation. You do not need to trigger it manually.

What Gets Embedded in the XML

The full set of data embedded in each invoice XML:

Data CategoryFields
Invoice MetadataInvoice number, issue date, due date, currency, document type
SellerName, address, VAT ID, tax identification number
BuyerName, address, VAT ID
Line ItemsDescription, quantity, unit price, net amount, VAT rate, VAT amount
TotalsLine total, tax total by category, grand total, payable amount
PaymentDue date, payment terms text, early payment discount
Bank DetailsIBAN, BIC, account holder, bank name
ReferencesPurchase order number, contract number, project reference

This structured data can be extracted by your tax advisor, accounting software, or regulatory authorities without any manual re-entry.

How Validation Works

docs101 provides multiple layers of validation:

Automatic Validation During Generation

When you create an invoice, docs101 validates the generated XML against EN 16931 via KOSiT. If there are issues — missing required fields, invalid VAT rates, structural errors — you see an error message with details before the invoice is saved.

PDF Validation Tool

docs101 offers a free, public PDF validation tool at POST /api/validate-invoice. Anyone can upload a ZUGFeRD/Factur-X PDF and receive a detailed validation report covering:

  • Whether embedded XML was found
  • KOSiT validation results (pass/fail with errors and warnings)
  • PDF/A-3 XMP metadata compliance
  • Extracted invoice facts (amounts, dates, VAT details)

Learn more in the PDF Validation Tool guide.

External Validators

You can also download your invoices and verify them with any third-party ZUGFeRD/Factur-X validator. The embedded XML is standard-compliant and will be recognized by any tool that supports EN 16931.

Best Practices

  • Keep VAT configuration up to date — docs101 uses your company VAT settings to categorize line items. Review EU Compliance to ensure your rates are correct.

  • Include complete customer information — EN 16931 requires complete address and tax ID information for both parties. Incomplete customer data may prevent invoice generation.

  • Use consistent numbering — Configure your numbering scheme in Administration to ensure invoices are sequential and compliant.

  • Set a default bank account — When configured, bank details are embedded in the XML, enabling direct payments and fulfilling B2B invoicing requirements.

  • Verify with the PDF Validation Tool — After generating an invoice, you can upload it to the PDF Validation Tool to confirm full compliance.

Technical Details

For a deeper explanation of the ZUGFeRD/Factur-X standard, see Concepts: ZUGFeRD Explained.


Next: Learn about EU Compliance requirements for your specific country and setup.