Configuration Guide
Configure the extension at Stores > Configuration > MageB2B > E-Invoice.
Screenshot placeholder: resources/kb/e-invoice/_screenshots/admin-config-einvoice.png
General Settings
| Setting | Default | Notes |
|---|---|---|
| Enable E-Invoicing | No | Master switch per store view |
| Default B2B Format | ZUGFeRD | Used as the default invoice format |
Invoice Settings
| Setting | Default | Notes |
|---|---|---|
| Generation Mode | Immediate | disabled, immediate, queued, cron_hourly, cron_daily |
| Generation Trigger | On Invoice Creation | invoice_create, invoice_pay, manual_only |
| Document Type Code | 380 | UN/CEFACT invoice document type |
| Block Invoice on E-Invoice Error | No | If enabled, invoice creation is blocked on generation failures |
| Attach E-Invoice to Invoice Email | No | Attaches XML/PDF to the invoice email |
| Attachment Strategy | auto | auto, xml_only, pdf_only, both |
| Daily Cron Batch Size | 100 | Only relevant for cron_daily |
| Invoice Filename Pattern | invoice-{invoice_increment_id}-{format}.{type} |
See “Filename Variables” |
Credit Memo Settings
Credit memo generation is disabled by default and must be enabled per store view.
| Setting | Default | Notes |
|---|---|---|
| Enable Credit Memo E-Invoicing | No | Required to show actions on credit memo view |
| Generation Mode | Immediate | Same options as invoices |
| Generation Trigger | On Credit Memo Creation | creditmemo_create, manual_only |
| Document Type Code | 381 | UN/CEFACT credit memo type |
| Block Credit Memo on E-Invoice Error | No | If enabled, credit memo creation is blocked on generation failures |
| Attach E-Invoice to Credit Memo Email | No | Attaches XML/PDF to the credit memo email |
| Attachment Strategy | auto | auto, xml_only, pdf_only, both |
| Daily Cron Batch Size | 100 | Only relevant for cron_daily |
| Credit Memo Filename Pattern | creditmemo-{creditmemo_increment_id}-{format}.{type} |
See “Filename Variables” |
Note: Credit memos support ZUGFeRD and XRechnung formats.
Document Storage
| Setting | Default | Notes |
|---|---|---|
| Storage Strategy | Permanent Storage | permanent or on_demand |
| File Storage Path | einvoice |
Relative to pub/media/ |
Storage locations (default settings):
- Invoices:
pub/media/einvoice/ - Credit memos:
pub/media/einvoice/creditmemo/
Filename Variables
Use these variables in filename patterns:
| Variable | Invoice | Credit Memo |
|---|---|---|
{invoice_increment_id} |
✓ | - |
{creditmemo_increment_id} |
- | ✓ |
{order_increment_id} |
✓ | ✓ |
{format} |
✓ | ✓ |
{type} |
✓ (xml/pdf) |
✓ (xml/pdf) |
{date} |
✓ (YYYY-MM-DD) |
✓ (YYYY-MM-DD) |
Company Information
These values are used for all formats (invoices and credit memos):
| Field | Notes |
|---|---|
| VAT ID | Required |
| Tax Number | Required for German formats |
| Company Registration Number | HRB/HRA |
| SIRET Number | Required for Factur-X (France) |
| Bank IBAN / Bank BIC/SWIFT | Used in payment instructions |
| Default Payment Terms (Days) | Optional |
| Seller Contact (Name/Phone/Email) | Required for XRechnung (BR-DE-2) |
| Seller Trading Name (BT-28) | Optional alternative business name |
| Seller GLN | Global Location Number (ISO 6523 scheme 0088) |
| Seller DUNS Number | Dun & Bradstreet identifier (scheme 0060) |
| Seller Leitweg-ID | Only when the seller itself is a public entity (scheme 0204) |
See Seller Identity for details.
Tax Representative
Non-EU sellers with EU VAT obligations can declare a fiscal representative (BG-11 / BT-63). Off by default.
| Setting | Notes |
|---|---|
| Enable Tax Representative | Master switch |
| Representative Name | Legal entity name |
| Representative VAT ID | Mandatory when enabled |
| Street / Postcode / City / Country | Representative's address |
VAT Classification
Controls the EN16931 BT-151 category (S / Z / E / AE / K / G / O) emitted per invoice line.
| Setting | Default | Notes |
|---|---|---|
| Kleinunternehmer (§19 UStG) | No | When enabled, every line is classified as E regardless of tax |
| Default Category for 0% Lines | Z | Used when a 0% line does not match intra-community (K) or export (G) rules |
| Treat Magento Giftcards as Multi-Purpose Voucher | Yes | Adobe Commerce giftcard products → O |
| Voucher Override Product Attribute | (empty) | Product attribute code whose value multi_purpose / single_purpose overrides detection |
| Exemption Reason: Intra-Community (K) | Innergemeinschaftliche Lieferung (§4 Nr. 1b UStG) | Override text for BT-120 |
| Exemption Reason: Export (G) | Ausfuhrlieferung (§4 Nr. 1a UStG) | Override text for BT-120 |
| Exemption Reason: Exempt (E) | Kleinunternehmer (§19 UStG) | Override text for BT-120 |
| Exemption Reason: Reverse Charge (AE) | Steuerschuldnerschaft des Leistungsempfängers (§13b UStG) | Override text for BT-120 |
| Exemption Reason: Out of Scope (O) | Mehrzweck-Gutschein (§3 Abs. 15 UStG) | Override text for BT-120 |
See VAT Classification for the full decision tree.
The intra-community / export rules rely on Magento's built-in EU country list under Stores > Configuration > General > Countries Options.
Payment Terms Mapping
Use this section to map payment-method-specific terms and payment means codes.
| Setting | Notes |
|---|---|
| Default Payment Terms Template | Supports {due_days}, {due_date}, {invoice_date}, {payment_method} |
| Default Payment Means Code | Example: 58 (SEPA transfer), 59 (SEPA direct debit) |
| Default Payment Means Code (No IBAN) | Fallback when no IBAN is configured (example: 1) |
| Payment Method Mapping | Override terms and means code per payment method |
Accounting
Use this section to provide line-level accounting references (BT-133).
| Setting | Notes |
|---|---|
| Accounting Source Type | none, order_item_field, product_attribute, customer_attribute |
| Order Item Field | Selectable when source type is order_item_field |
| Product Attribute | Selectable when source type is product_attribute |
| Customer Attribute | Selectable when source type is customer_attribute |
Validation & Error Handling
| Setting | Default | Notes |
|---|---|---|
| Validation Level | Standard | minimal, standard, strict |
| Strict XSD Validation | No | Enables strict schema validation |
| Enable Error Notifications | No | Sends emails on failures |
| Error Notification Email | (empty) | Required when notifications are enabled |
| Error Notification Threshold | 3 | Consecutive failures before sending |
| Retry Failed Generations | Yes | Retries failures via cron job |
| Max Retry Attempts | 3 | Per invoice/credit memo |
REST API Settings
| Setting | Default | Notes |
|---|---|---|
| Include E-Invoice in Invoice API | No | Adds einvoice_xml and einvoice_pdf to GET /V1/invoices/{id} |
| Include E-Invoice in Credit Memo API | No | Adds einvoice_xml and einvoice_pdf to GET /V1/creditmemos/{id} |
See: REST API
ZUGFeRD / Factur-X Configuration
| Setting | Notes |
|---|---|
| ZUGFeRD Profile | Applies to invoices and credit memos |
PEPPOL BIS Billing 3.0
Settings for UBL-based PEPPOL delivery. Applied when Default B2B Format is PEPPOL BIS.
| Setting | Notes |
|---|---|
| Seller Endpoint Scheme (EAS) | 70+ PEPPOL codes (9930 DE VAT, 0088 GLN, 9914 AT VAT, 0204 Leitweg-ID, …) |
| Seller Endpoint ID | Identifier matching the selected scheme |
| CustomizationID override | Leave empty for PEPPOL BIS Billing 3.0 default |
| ProfileID override | Leave empty for billing:01:1.0 default |
XRechnung Configuration
| Setting | Default | Notes |
|---|---|---|
| XRechnung Version | 3.0 | 2.2, 2.3, 3.0 |
Configuration Testing
Use the built-in buttons:
- Test Configuration
- Test XSD Schemas
- Test Company Data