Hello,
I am currently using Shopify Plus and working on a store where I want to implement a feature that excludes VAT from the total checkout price when a customer provides a valid VAT number.
The desired behavior is as follows:
-
If a customer provides a valid VAT number from another European country, VAT should be excluded from the total price (deferred / reverse-charged VAT).
-
If the VAT number belongs to the Netherlands (NL), VAT should not be deferred, and tax should continue to be applied as normal.
To achieve this, I am customizing the checkout experience by rendering a VAT input field where customers can enter their VAT number. The VAT number is validated using an external VAT validation API, and based on the VAT country, I determine whether VAT should be exempted or applied.
So far, I have built a custom Shopify app that successfully:
-
Renders the VAT input field on the checkout page
-
Validates the VAT number using external APIs
-
Correctly determines the VAT country
This part is working correctly.
However, I am currently stuck on adjusting the checkout total. Even after successful VAT validation for non-NL European VAT numbers, the tax amount is still included in the total and displayed below the price (for example: “including €12.56 in taxes”). I am unable to find a way to reduce or remove this tax amount from the checkout total.
Could you please advise if there is any Shopify API, Shopify Function, or recommended approach that allows modifying or exempting the tax amount during checkout after VAT validation, while also supporting country-specific rules (such as not deferring VAT for NL)?
Any guidance on how to correctly implement VAT tax exemption in this scenario would be greatly appreciated.
Thank you for your time and support.