VAT Classification (BT-151)

Every e-invoice line carries an EN16931 tax category code. The extension picks the correct code automatically from order data, so invoices stay compliant for cross-border sales, exempt transactions, and reverse-charge scenarios.

Supported Categories

Code Name When it applies
S Standard rate Any line with tax greater than 0
Z Zero rated Configured fallback for 0% lines in the same country
E Exempt Seller operates as Kleinunternehmer (§19 UStG)
AE Reverse charge §13b UStG — opt-in via customer or product attribute
K Intra-community supply EU B2B with 0% tax and a valid buyer VAT ID (§4 Nr. 1b UStG)
G Free export Destination outside the EU (§4 Nr. 1a UStG)
O Out of scope Multi-purpose voucher (§3 Abs. 15 UStG)

Classification Logic

For each invoice line the extension evaluates, in order:

  1. Kleinunternehmer flag is on → E
  2. Line is a multi-purpose voucherO (see Gift Cards)
  3. Line has tax greater than 0 → S
  4. Buyer country differs from seller country:
    • Buyer is in the EU list and has a VAT IDK
    • Buyer is outside the EU → G
  5. Otherwise → configured default (default Z)

The EU list is read from Magento's built-in general/country/eu_countries setting, so edits under Stores > Configuration > General > Countries Options apply everywhere automatically.

Configuration

Stores > Configuration > MageB2B > E-Invoice > VAT Classification

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 K or 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) BT-120 text for K
Exemption Reason: Export (G) Ausfuhrlieferung (§4 Nr. 1a UStG) BT-120 text for G
Exemption Reason: Exempt (E) Kleinunternehmer (§19 UStG) BT-120 text for E
Exemption Reason: Reverse Charge (AE) Steuerschuldnerschaft des Leistungsempfängers (§13b UStG) BT-120 text for AE
Exemption Reason: Out of Scope (O) Mehrzweck-Gutschein (§3 Abs. 15 UStG) BT-120 text for O

Set exemption reasons to your own wording if you prefer English or a different template.

Exemption Reason (BT-120)

When the category is not S or Z, the invoice carries a human-readable exemption reason at both line and document level. Empty reasons fall back to the defaults above. Receivers use this text to understand why tax was not charged.

Tax Totals

The document-level tax section groups lines by (category, rate). A single invoice can legitimately contain multiple categories, for example a standard-rated product plus a multi-purpose voucher:

Category Rate Base Tax
S 19.00 100.00 19.00
O 0.00 50.00 0.00

Out-of-scope lines contribute to the base total but never to the tax amount, per §3 Abs. 15 UStG.

Verification

Use bin/magento einvoice:verify-amounts --invoice-id=<id> to verify that the XML totals match Magento's calculation after classification.

Upgrading from 1.0.x

Before 1.1.0 every line was classified as S regardless of the actual tax treatment. Invoices in plain single-country 19% scenarios continue to render identically; cross-border, exempt, or voucher invoices now carry the correct code and reason.

Found an issue with this documentation? Let us know