Not charging VAT to businesses within the EU
If you do not want customers who are businesses from certain EU countries to pay VAT if they supply a valid VAT number you can use a feature associated with the VAT features app.
The ShopWired platform is connected to a third party API that checks the validity of a VAT number that is entered by the user. You can place code on your website to remove VAT from the order if the number is valid. This will remove VAT from all of the products in the order (including the delivery charge).
In the following example the delivery country of France has been selected and a ‘Do you have a VAT number?’ field is displayed on the form. Once the ‘Validate’ button is clicked the inputted number will be checked against the API and if valid VAT will be removed from the order:
To achieve this functionality install the VAT features app by selecting INSTALL THIS APP. You will also need to make coding changes to your theme’s files. The instructions below describe the coding changes that need to be made, but if you prefer you can request that we make these changes for you for a one off fee. Please contact us for a quote.
from the menu. Find and select the ‘VAT features’ app and select• Installation
• Configuring the app
Installation
First, you'll need to add a VAT number field, similar to the example above, to the checkout/basket page of your website. You'll probably only want this field to appear if a customer selects an appropriate delivery zone. This can be achieved by identifying the ID of the country selected by the user as their delivery zone.
Here is a list of EU countries and their ID:
Austria 14
Belgium 21
Bulgaria 33
Croatia 53
Cyprus 55
Czech Republic 56
Denmark 57
Estonia 67
Finland 72
France 73
Germany 81
Greece 84
Hungary 97
Ireland 103
Italy 105
Latvia 117
Lithuania 123
Luxembourg 124
Malta 132
Netherlands 150
Poland 170
Portugal 171
Romania 175
Slovakia 189
Slovenia 190
Spain 195
Sweden 203
The VAT number entered can be validated against the API through a post request to /checkout/basket/set-vat-number. The post request expects a vat_number field.
The endpoint will return a JSON response with a single property of valid which will return as either true or false , e.g.
{ "valid": true }
VAT will automatically be removed from the order if the VAT number was validated and the VAT number country prefix, e.g. 'FR' for France, matches against the list of qualifying countries that you've entered on the app settings within your account (described below).
You'll probably want to record the VAT number supplied by the customer onto the details about the order. The VAT number entered is available on the checkout/address page in a twig variable checkout.vat_number so this can be referenced and placed in the order comments, e.g.
<input type="hidden" name="comments" value="VAT Number: {{ checkout.vat_number }}">
You may already have a comments field on your checkout page. If you do you'll need to adjust the existing comments field and the one above so that you can have both fields operating at the same time. You can find out more about this here.
Configuring the app
On the VAT features app page in your account, you'll need to do two things.
Firstly, tick the tick box labelled Remove VAT For Valid VAT Numbers.
Secondly, you'll need to enter the VAT number country prefixes, separating them with a comma, for the countries that you want to be eligible for VAT to be removed from the order:
Here are all of the country codes you can enter for EU countries:
AT, BE, BG, HR, CY, CZ, DK, EE, FI, FR, DE, EL,
HU, IE, IT, LV, LT, LU, MT, NL, PL, PT, RO, SK, SI, ES, SE
Select save changes when you're done.