ZUGFeRD Format
ZUGFeRD (Zentraler User Guide des Forums elektronische Rechnung Deutschland) is the German standard for electronic invoicing, widely used in B2B transactions.
Overview
| Property | Value |
|---|---|
| Version | 2.3.x |
| Type | Hybrid (PDF/A-3 with embedded XML) |
| Region | Germany, Austria, Switzerland |
| Use Case | B2B invoicing |
How It Works
ZUGFeRD creates a hybrid document:
- Human-readable PDF invoice (PDF/A-3 compliant)
- Machine-readable XML embedded in the PDF
- 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:
| Profile | Description | Recommended For |
|---|---|---|
| MINIMUM | Basic header information only | Simple invoices |
| BASIC WL | Basic with line items | Standard B2B |
| COMFORT | Extended information (EN 16931) | Most B2B scenarios |
| EXTENDED | Full feature set | Maximum compatibility |
| XRECHNUNG | XRechnung 3.0 compatible | XRechnung-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:
- Set Default B2B Format: ZUGFeRD
- Set ZUGFeRD Profile: COMFORT (or as needed)
- 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:
| File | Path Example |
|---|---|
| XML | pub/media/einvoice/invoice-100000001-zugferd.xml |
| PDF/A-3 | pub/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
- Use COMFORT profile unless you need specific extended features
- Include IBAN/BIC for faster payment processing
- Test with recipients before going live
- 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.logandvar/log/exception.logfor errors
Validation Errors
- Verify all required company data is configured
- Check VAT ID format (must include country code)
- Ensure order has valid billing address
