Skip to main content

How to add VAT ID Validation Field

How to add a Tax / VAT ID field to a Clay registration form and review the VIES validation result on the customer record.

S
Written by Shubham Nandeshwar

The Tax / VAT ID field is a built-in form element you can add to any Clay registration form to collect and verify a customer's tax identification number. When a customer submits the form, Clay runs the VAT number through the official EU VIES (VAT Information Exchange System) service in the background. The verified status, company name, and company address are then attached to the customer record so your team can decide whether to approve the account, mark them tax-exempt, or follow up for clarification.

Use this field whenever you sell to B2B customers in the EU and need to confirm a buyer's tax registration before granting wholesale pricing or tax-exempt status.

Prerequisites

  • You have access to the Clay B2B Wholesale app in your Shopify admin.

  • You have at least one registration form, or you are creating a new one from a template.

  • Your customers will be submitting VAT numbers from one of the 27 EU member states (Austria, Belgium, Bulgaria, Croatia, Cyprus, Czechia, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Latvia, Lithuania, Luxembourg, Malta, Netherlands, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden). Numbers from outside the EU pass format checks but cannot be verified against VIES.

Step 1: Open the Forms section

In the Clay B2B Wholesale app, go to Forms. You will see a list of all your registration forms with their status (Active or Draft) and creation date.

Click Create form to start a new form, or open an existing form to add the VAT field to it.

Step 2: Pick a form template

If you are starting fresh, Clay offers three templates to seed your form. For a flow that collects VAT IDs, Template #2 ("basic customer and company details") is the most natural starting point because it already includes company name, website, country and address fields that pair well with a VAT ID.

Click Select on the template you want. You can rename and customise the form afterwards.

Step 3: Open the form editor

The form editor opens with the template's default elements already laid out under Page 1. The left pane lists the fields currently on the page, and the right pane shows a live preview of what the customer will see.

At the bottom of the field list you'll see an Add element button. Click it to reveal the catalogue of field types you can add.

Step 4: Add the Tax / VAT ID element

The element catalogue groups available fields by category: Contact, Address, Text, Select, and Miscellaneous. The Tax/VAT ID option lives at the bottom of the Miscellaneous group.

Click Tax/VAT ID. A new "Tax id" field is appended to the bottom of your page and to the live preview on the right.

Step 5: Configure validation options

Click the new Tax id entry in the field list to open its settings panel. The right pane switches from the preview to the field editor. The most important section is Validation, where you control how Clay handles VAT numbers submitted on this form.

There are two validation settings you'll typically configure:

  • Validate after submit (enabled by default) — When a customer submits the form, Clay queues a background check against the EU VIES service. The result (Valid / Invalid / Format invalid / Country not supported) is saved to the customer record. Validation never blocks the form submission — the customer always gets a confirmation, and you can review the verification status when reviewing their application.

  • Auto-set customer as tax exempt on valid — When VIES confirms the VAT ID is valid, Clay automatically marks the customer as tax exempt in Shopify. Enable this if your standard policy is to remove VAT for any buyer with a confirmed EU VAT registration. If you prefer to decide tax-exempt status manually after reviewing the application, leave this unchecked.

You can also rename the field label (the customer-facing text), set a placeholder, mark the field as required, and adjust its width — all from the same panel.

Behind the scenes: After a customer submits the form, Clay first runs a format check using country-specific VAT rules. If the format looks valid and the country is in the EU, Clay then calls the official VIES service to confirm the number is registered. VIES is operated by the European Commission and is occasionally slow or temporarily unavailable; when that happens, the customer's status is recorded as Unverified and Clay automatically retries in the background until the service responds.

When you're happy with the field configuration, click Save in the top bar, then Mark as active to publish the form to your storefront.

Step 6: Review the validation result on a customer

Once a customer submits the form with a VAT ID, open Forms → Customers, find the relevant submission, and open the customer detail page.

The submitted VAT number appears in the Customer information section as "Tax id". On the right side of the page, a new Tax ID verification panel summarises the validation outcome.

The panel shows:

  • Status badgeValid, Invalid, Format invalid, Country not supported, or Unverified (still being retried).

  • VAT number as it was submitted.

  • Last checked — the timestamp of the most recent verification attempt.

  • Source — usually VIES for EU numbers; Format for non-EU numbers that only ran a format check.

  • Company name and company address as returned by VIES (these are dashes when VIES does not return them, or when the number is not yet verified).

Two actions are available on this panel:

  • Re-validate — runs the validation again immediately. Useful if a previous attempt returned "Unverified" because VIES was unavailable, or if you suspect the data on file is stale.

  • Validation history — expands a log of every validation attempt for this VAT ID, including timestamps and outcomes. This is useful when investigating why a customer's status changed or supporting an audit.

Troubleshooting

The customer's status stays "Unverified" for a long time.
VIES is the EU's free public service and occasionally has outages or rate limits. Clay automatically retries in the background. If a single VAT ID stays unverified for more than a few hours, click Re-validate to trigger a fresh attempt.

The status comes back "Country not supported".
Only the 27 EU member states have a VIES endpoint. Numbers from the UK, Switzerland, Norway, or any non-EU country will pass the format check (if their format is recognised) but cannot be verified online. Decide manually whether to grant tax-exempt status based on documentation the customer provides.

The status is "Format invalid" but the customer insists their VAT number is correct.
Ask the customer to re-enter the number including the two-letter country prefix (for example, DE129273398, not 129273398). Clay strips whitespace and uppercases the input automatically, but the country prefix is required.

"Auto-set customer as tax exempt on valid" is enabled, but the customer still shows tax on checkout.
Confirm the Tax ID verification panel shows Valid (not Invalid or Unverified). The tax-exempt sync only fires when VIES returns a positive confirmation. If the status is correct but the storefront still applies tax, double-check the "Is customer tax exempt" checkbox on the customer's account in Shopify — it should be checked.

I can't see the VAT field in the form editor.
The Tax/VAT ID element lives under Miscellaneous in the Add element picker. Make sure you're clicking Add element within a form page, not at the form's top-level area.

Frequently asked questions

Does Clay store the customer's VAT number on the Shopify customer record?
Yes — the submitted VAT ID is saved on the Clay customer record and is visible on the customer detail page. It is also retained for the Re-validate and Validation history actions.

Is there a charge for using VIES?
No. VIES is a free public service operated by the European Commission. Clay calls it on your behalf as part of the form submission flow.

Can I require a valid VAT ID before approving a customer?
The form itself does not block submission based on validation outcome. However, you can use the Status dropdown on the customer detail page to keep applications Pending until you've reviewed the validation result, and only mark them Approved once you're satisfied.

Did this answer your question?