I’ve recently completed some Magento work that required a slightly complex VAT solution to facilitate automated VAT relief for disabled people and charities that qualify to purchase certain products VAT free at the time of purchase.
There is a Magento module out there to purchase, which given the lack of information on Google relating to this topic I was really surprised about, but it seemed to require a declaration for each individual product and that wasn’t really suitable for the project I was working on, so here’s my solution.
The Problem
As I understood it via the brief we were given the scenario goes something like this:*
- There are both VAT Inclusive and VAT Exempt products in the store, the VAT Inclusive products must charge VAT to every customer type.
- Generic customers can buy both sets of products but must pay VAT as normal.
- Customers eligible for VAT exemption can purchase VAT Exempt products without the VAT but still be charged VAT on VAT Inclusive products.
*Caveat Incoming: I could not tell you if the scenario described is accurate in every instance – it’s the brief we were given from our client and would suggest you find out for yourself the VAT terms you’re bound to in whatever scenario you decide to implement this solution in.
The Solution: Part 1
The first step was in getting Magento set up just right. We’ve 3 different tools at our disposal with which to do this, Customer Groups, Customer Tax Classes and Product Tax Classes.
Tax Rules
We did the simple bits first:
- Set up two new Product Tax Classes – VAT Exempt and VAT Inclusive, this means that we can specify on each individual product if it is eligible to be purchased VAT free or not.
- We then set up two Customer Tax Classes with exactly the same names, we’ll use these a little later.
- For the last of the simple requirements we created two new Tax Rates, again VAT Inclusive at 20% and VAT Exempt at 0%.
Now we have everything in place we moved onto actually creating the Tax Rules. We have three different Tax Rules set up now, they are as follows:
- VAT: This is applicable to both Customer Tax Classes, the VAT Inclusive Product Tax Class and the VAT Inclusive Product Tax Rate.
- VAT Exempt: This is applicable to the VAT Exempt Customer Tax Class, the Vat Exempt Product Tax Class and the VAT Exempt Tax Rate.
- VAT Inclusive: This is applicable to the VAT Inclusive Customer Tax Class, the VAT Exempt Product Tax Class and the VAT Inclusive Tax Rate.
What we’ve essentially done is specify a default tax rule – VAT – and told Magento that it applies to both groups for VAT Inclusive products (and to apply the VAT Inclusive rate). This means that both groups will pay VAT on VAT Inclusive products as is intended.
Next we’ve specified via VAT Exempt that customers with the VAT Exempt class should not pay VAT on VAT Exempt products.
Finally, we’ve specified with VAT Inclusive that the VAT Inclusive Customer Tax Class should have the VAT Inclusive Tax Rate also applied to those products specified as VAT Exempt. This final rule is where the magic lies as it ensures that standard customers who should pay VAT are paying it on both sets of products.
Still with me? Good, onto the last change for this part.
Customer Groups
We set up two separate Customer Groups for our scenario, let’s call them Normal and VAT Exempt for arguments sake. Normal has the VAT Inclusive Tax Class assigned to it, and as expected VAT Exempt has the VAT Exempt Tax Class assigned. Job done.
By all accounts you could stop things here, by manually assigning each customer to the relevant group you can ensure that VAT is removed where applicable. This is only achievable after a customer has checked out or created an account, it’s a bit of a messy, manual affair and first time customers will get charged VAT. All in all it’s a bit of an administrative nightmare – so let’s automate things.
The Solution: Part 2
Again, our understanding of the brief given is that customers are actually responsible for their own tax relief, providing they declare to the merchant they are eligible and a few basic details are taken by the merchant for tax purposes, then there’s actually no formal checking on the part of the merchant to be done. See the previous caveat if there’s any misunderstanding of my description here.
In which case we’re allowing the customer to specify themselves if they’re a candidate for VAT relief, my first thought was to do this via a question on checkout, but then we’d have to make some module changes to ensure the customer groups were set as a result. However we instead stumbled on a cheap as chips module that allowed you to do just that – Customer Group At Registration.
For the tiny sum of $25 this little module will allow our customers to decide on checkout which Customer Group they belong to, what’s better is the module will allow you to specify which groups are available for selection – so we can still maintain different internal Customer Groups should we wish. So with a small amount of modification we’re able to insert a declaration on the customers part that if they select a VAT Exempt Customer Group they’re agreeing to the usual legal mumbo jumbo associated with it.
In Summary
What did we do? We created two Product and Customer Tax Groups, we specified three Tax Rules that applied the right Tax Rates where applicable and we then automated the whole process using a little module so customers can declare on checkout if they are eligible for VAT relief or not. I can be no briefer and no more pleased with my little solution. Correction – if you use it and it works for you then I’ll be more pleased than I already am. Enjoy!

