Tax-free orders for valid VAT number
Sometimes, store owners of EU based shops need to provide tax-free purchases for the customers with valid VAT number. There are number of Magento 2 modules that provide this functionality with separate config. But did you know that you can achieve this feature for guest and registered customers without a single third-party module?
We assume that you already configured taxes for EU countries.
If not - please create:
- At least one “Tax Rate” at the Stores > Tax Zones and Rates page.
- At lease one “Tax Rule” at the Stores > Tax Rules page.
Configuring zero tax orders
- Create “Tax free” customer tax class:
- Open any of existing “Tax Rules” at the Stores > Tax Rules page
-
Expand “Additional Settings” fieldset and add “Tax free” tax class using the button below “Customer Tax Class” field.
-
Uncheck newly created tax class in the “Customer Tax Class” field
- Save the rule
- Create “Valid VAT” and “Invalid VAT” customer groups:
- Navigate to Customers > Customer Groups page and press “Add New Customer Group” button
-
Create “Valid VAT” group using “Tax free” class:
- This step is optional. Create “Invalid VAT” group. Use your regular Tax Class for this group.
- Configure “Automatic Assignment to Customer Group”
- Navigate to Stores > Configuration > Customers > Customer Configuration > Create New Account Options
-
Enable “Enable Automatic Assignment to Customer Group” option, and assign proper values for “Group for Valid VAT ID” and “Group for Invalid VAT ID” options:
You may select any other group except “Valid VAT” as a group for the customers with invalid VAT number.
-
That’s all! You can now test checkout page.
P.S. There is a bug in Magento which doesn’t allow to use this feature: when client enters a valid VAT and then clears VAT field - tax will not appear again.
You need to apply the patch that fixes this bug.