ZUGFeRD Format

ZUGFeRD (Zentraler User Guide des Forums elektronische Rechnung Deutschland) is the German standard for electronic invoicing, widely used in B2B transactions.

Overview

PropertyValue
Version2.3.x
TypeHybrid (PDF/A-3 with embedded XML)
RegionGermany, Austria, Switzerland
Use CaseB2B invoicing

How It Works

ZUGFeRD creates a hybrid document:

  1. Human-readable PDF invoice (PDF/A-3 compliant)
  2. Machine-readable XML embedded in the PDF
  3. Both formats in a single file

Recipients can:

  • View and print the PDF as normal
  • Extract the XML for automated processing

Profiles

ZUGFeRD supports different conformance levels:

ProfileDescriptionRecommended For
MINIMUMBasic header information onlySimple invoices
BASIC WLBasic with line itemsStandard B2B
COMFORTExtended information (EN 16931)Most B2B scenarios
EXTENDEDFull feature setMaximum compatibility
XRECHNUNGXRechnung 3.0 compatibleXRechnung-compatible output

Choosing a Profile

  • COMFORT is recommended for most B2B scenarios
  • Use EXTENDED for maximum ERP compatibility
  • Use XRECHNUNG profile if you want XRechnung-compatible output in a hybrid document

Configuration

Enable ZUGFeRD

Stores >Configuration > MageB2B > E-Invoice:

  1. Set Default B2B Format: ZUGFeRD
  2. Set ZUGFeRD Profile: COMFORT (or as needed)
  3. Set Document Type Code: 380 (Commercial Invoice)

Required Company Data

Ensure these fields are configured:

  • VAT ID (required)
  • Company Name (from Magento store info)
  • Address (from Magento store info)
  • Bank IBAN (recommended)
  • Bank BIC (recommended)

Generated Files

When a ZUGFeRD invoice is generated:

FilePath Example
XMLpub/media/einvoice/invoice-100000001-zugferd.xml
PDF/A-3pub/media/einvoice/invoice-100000001-zugferd.pdf

The PDF contains the embedded XML (hybrid), and the XML is also stored as a separate file for download/API use (depending on your storage strategy).

Validation

ZUGFeRD documents are validated against:

  • Cross-Industry Invoice (CII) schemas
  • Profile-specific requirements
  • PDF/A-3 compliance (when generating PDF)

Compatibility

ZUGFeRD 2.3.x is compatible with:

  • Factur-X 1.07.x (French equivalent)
  • EN16931 (EU semantic standard)
  • Most German ERP systems (SAP, DATEV, etc.)

Best Practices

  1. Use COMFORT profile unless you need specific extended features
  2. Include IBAN/BIC for faster payment processing
  3. Test with recipients before going live
  4. Verify file storage and email attachment settings match your process

Troubleshooting

PDF Not Generated

  • Check that Magento's standard PDF generation works
  • Verify the horstoeko/zugferd library is installed
  • Check var/log/system.log and var/log/exception.log for errors

Validation Errors

  • Verify all required company data is configured
  • Check VAT ID format (must include country code)
  • Ensure order has valid billing address

Found an issue with this documentation? Let us know