Include your customer's VAT registration number

If your online store sells to business customers in the European Union or South Africa, including your customer's VAT registration number on all invoices you create is essential.

Sufio helps you capture VAT registration numbers from your customers and automatically include them on the invoices they receive.

Please note that VAT registration numbers go by different names across various countries. While in the UK and South Africa they are called VAT registration numbers, they're known as USt-IdNr. in Germany, n° TVA in France, P.IVA in Italy, NIF in Spain, CVR in Denmark, and RFC or RUC in countries of Latin America.

In this article, we will cover how to include the VAT registration number using:

Customer registration form

To capture VAT registration numbers on your Shopify store, you can add a new VAT registration number field to the customer registration form in your Shopify store.

This will allow your customers to enter their VAT registration numbers when creating their accounts on your online store.

Shopify Customer Registration page

Customer registration form with the VAT number field

Once a customer enters their VAT registration number, this will be stored in your Shopify admin as part of customer notes, and Sufio will automatically include them on the invoices the customer is sent.

Add the VAT registration number field to the customer registration form

To add the VAT registration number field to the customer registration form, you need to customize your Shopify store theme:

  1. In your Shopify admin, go to the Online Store → Themes page.
  2. Click the Actions button, then click Edit code.
  3. Select customers/register.liquid in the left sidebar. You might use the upper search bar for a faster search.
  4. Insert the following code snippet inside the <form>. A good place for the field is before the Email field.
<!-- Capture VAT registration numbers on the customer registration page. Used by Sufio (www.sufio.com/shopify). -->
<label for="vat_reg_no">VAT Registration Number</label>
<input id="vat_reg_no" type="text" name="customer[note][VAT Registration Number]" placeholder="VAT Registration Number" />

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.

When the customer enters their VAT registration number using this field, this will be saved as a cart attribute in your Shopify admin, and automatically included on your customers' invoices.

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 your Shopify store theme:

  1. In your Shopify admin, go to the Online Store → Themes page.
  2. Click the Actions button, then click Edit code.
  3. Select cart.liquid in the left sidebar. You might use the upper search bar for a faster search.
  4. Insert the code snippet inside the <form>. A good place for the field is just before the Check out button.
<!-- Capture VAT registration numbers on the cart page. Used by Sufio (www.sufio.com/shopify). -->
<div class="vat-reg-number">
  <label for="vat_reg_no">VAT Registration Number</label>
  <input type="text" id="vat_reg_no" name="attributes[VAT Registration Number]" value="{{ cart.attributes['VAT Registration Number'] }}">
</div>

Note

The code snippet may need to be added to a different file than cart.liquid, depending on the theme you use. Often, the file is named main-cart-footer.liquid.

If your store uses cart drawer (also called ajax cart), in most cases, the right file is ajax-cart-template.liquid file.

You can also use a version that supports EU VAT registration number validation. These numbers will be validated using the official VIES VAT number validation service.

Please note that this feature is only available for the EU VAT registration numbers and only on our Professional and higher plans.

<!-- Capture VAT numbers from customers, and validate them using VIES VAT number validation service on the cart page. Used by Sufio (www.sufio.com/shopify). -->
<div class="vat-reg-number">
  <label for="vat_reg_no">VAT Registration Number</label>
  <input type="text" id="vat_reg_no" name="attributes[VAT Registration Number]" value="{{ cart.attributes['VAT Registration Number'] }}">
  <input type="hidden" class="hidden" id="vat_no_valid" name="attributes[VAT Number Valid]" value="{{ cart.attributes['VAT Number Valid'] }}">
</div>
 
<script type="text/javascript">
    $('input#vat_reg_no').change(function() {
      var url = "/apps/sufio/vat-check/";
      var number = $(this).val();
      $('input#vat_no_valid').val("");
      $.ajax({
          type : "GET",
          dataType: "jsonp",
          url: url,
          data: { number: number },
          success: function(data) {
            var result = data.result;
            $('input#vat_no_valid').val(result);
            if (result) {
              // VAT Number is valid
            } else {
              // VAT Number is not valid
            }
          }
        });
  });
</script>

Need help?

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

Customer notes

In addition to capturing customer VAT numbers via your store, you can also manually enter them via the Shopify admin.

This might be a useful option if your sales team regularly creates orders on behalf of your customers or if you need to create an order for a new customer manually.

Customer notes

Add the VAT registration number as a customer note

To add the customer's VAT number as a customer note:

  1. In your Shopify admin, go to the Customers page.
  2. Select a customer, or click Add customer to create a new customer.
  3. Enter the VAT number into the Customer Note field, using a prefix VAT Registration Number or VAT Number: (e.g., VAT Registration Number: DE123456790).
  4. Click Save to save your changes.

You can add the VAT number before or after creating the order. Sufio will automatically sync it and update your invoices as soon as you make changes.