Capture VAT numbers on the Cart page

With Sufio, you can also add a VAT registration number field to the cart page so that your customers can enter their VAT registration numbers just before checkout.

Customers who do not have an account on your Shopify store or who are not logged in will also need to enter their email address.

Shopify cart page VAT number

Example of a cart page with the VAT registration number field

In this article, we will cover

VAT registration numbers in your Shopify admin

When the customer enters their VAT registration number using this field, their VAT registration number will be saved as a cart attribute in your Shopify admin.

Sufio will then validate the VAT registration number and set the customer as tax-exempt when applicable. Lastly, the VAT registration number will be automatically included on your customer's invoice.

Add the VAT exemptions initialization script

To add the VAT registration field to your Shopify store, first place an initialization script into your Shopify theme source code. The script will let you collect VAT numbers from your customers.

To place the initialization script into your Shopify theme source code:

  1. In your Shopify admin, go to the Online StoreThemes page.
  2. Click on the Actions button, then click on Edit code.
  3. Select Layouttheme.liquid in the left sidebar. You might use the upper search bar for a faster search.
  4. Copy and paste the following code snippet inside the <body> field. A good place for the snippet is at the end of the file, just before the ending </body> tag.
<script async src="https://cdn.sufio.com/infoweb/scripts/vat.js" id="sufio-vat-script"></script>
<script>
    document.getElementById("sufio-vat-script").onload = function() {
        SufioVAT.init({
            customerEmail: {{ customer.email | json }},
            customerMetafields: {{ customer.metafields.sufio | json }},
            cartAttributes: {{ cart.attributes | json }}
        });
    };
</script>
  1. Click on Save to apply the changes. Continue with the steps below to display the VAT registration form on the cart page.

Note

Insert the intialization script into the theme.liquid file only once. If you want to add the VAT registration field to other pages of your Shopify store, make sure you only edit one intialization script instead of adding duplicates.

Add the VAT registration number field to the cart page

To add the VAT registration number field to the cart page you need to customize the initialization script.

  1. Navigate to the intialization script you inserted inside the <body> field. Just before the ending </script> tag, copy and paste the following code:
SufioVAT.onCart();
  1. The resulting code should look like this:
<script async src="https://cdn.sufio.com/infoweb/scripts/vat.js" id="sufio-vat-script"></script>
<script>
    document.getElementById("sufio-vat-script").onload = function() {
        SufioVAT.init({
            customerEmail: {{ customer.email | json }},
            customerMetafields: {{ customer.metafields.sufio | json }},
            cartAttributes: {{ cart.attributes | json }}
        });
        SufioVAT.onCart();
    };
</script>
  1. Click on Save to apply the changes. The VAT registration form will appear on the Cart page.

Note

If you want to add the VAT registration number field to other places, like the Customer registration page or the Customer accounts page, add the code snippets one after another (their order is not relevant) inside the same script.

Customize the form design and placement

You can later edit the field design to match the design of your Shopify store theme.

You can also choose the placement of the VAT registration field on the Customer registration page.

Customize the form labels

Sufio gives you the option to either change the form labels or copy or translate them to your store language.

If you use multi-lingual Shopify store, you can translate the labels so that the VAT registration field changes to the selected language of your store.

Tip

You can modify the label part of the code snippet by replacing the VAT Registration Number text with anything else you'd like. Please contact our support team if you need to make the label multilingual. We'll be happy to help!

Need help?

Do you need help with customizing your Shopify store theme? Please contact our experienced support team. We'll be happy to assist!

View VAT Exemptions

When your business customer enters a VAT registration number using the newly added VAT registration number field, a VAT exemption request will be listed on the View VAT Exemptions page in your Sufio account.

EU VAT Exemptions page in Sufio

An overview of VAT Exemption requests from the EU business customers

On this page, you can access all successful and unsuccessful exemption requests made on your Shopify store. The provided filtering options make it possible for you to quickly review and troubleshoot the VAT exemption requests when needed.

To access the View VAT Exemptions page:

  1. In your Sufio account, go to the Settings → Taxes page.
  2. Click on View VAT Exemptions.