Home / VAT API / Integrations / Shopify
Shopify EU VAT Validation API
Add EU VAT number validation to your Shopify B2B storefront. Automatically verify EU business customers against VIES before applying tax exemptions on cross-border orders, so you never wrongly zero-rate an unregistered buyer.
Quick start
CURL
curl -H "Authorization: Bearer YOUR_API_KEY" \ http://localhost:3000/api/v1/validate/DE/DE123456789
Code example
Full integration example including error handling for service_unavailable responses from VIES.
Node.js (Remix app)
// Shopify app (Remix) — validate EU VAT in an API route
// app/routes/api.validate-vat.jsx
import { json } from "@remix-run/node";
import { authenticate } from "../shopify.server";
export const action = async ({ request }) => {
await authenticate.admin(request);
const { country, vatNumber, customerId } = await request.json();
const res = await fetch(
`http://localhost:3000/api/v1/validate/${country}/${vatNumber}`,
{ headers: { Authorization: `Bearer ${process.env.TAXID_API_KEY}` } }
);
const data = await res.json();
if (data.valid) {
// Apply tax exemption via Shopify Admin API
await shopify.rest.Customer.update({
id: customerId,
tax_exempt: true,
note: `EU VAT: ${vatNumber} | ${data.company_name}`,
});
}
return json({ valid: data.valid, company: data.company_name });
};cURL
curl "http://localhost:3000/api/v1/validate/DE/DE123456789" \
-H "Authorization: Bearer $TAXID_API_KEY"
# {
# "valid": true,
# "status": "active",
# "company_name": "Example GmbH",
# "company_address": "Musterstraße 1, 10115 Berlin",
# "country_code": "DE",
# "cached": false
# }API response
The TaxID API returns a consistent JSON response for every validation:
{
"valid": true,
"status": "active",
"country_code": "DE",
"vat_number": "DE123456789",
"company_name": "Example GmbH",
"company_address": "Musterstraße 1, 10115 Berlin",
"request_date": "2026-05-10T00:00:00.000Z",
"cached": false,
"request_id": "req_01j..."
}activeVAT number is valid and the business is registered
invalidVAT number format is wrong or not registered in VIES
service_unavailableVIES or the national authority is temporarily down — retry later, do not silently zero-rate
Implementation steps
- 1
Get a free TaxID API key
Sign up at taxid.dev/signup. No credit card required. The free plan includes 100 validations per month, which is enough for early-stage B2B storefronts.
- 2
Build a Shopify app or custom storefront field for VAT input
Create a Shopify app (using Remix or the Shopify CLI) with a custom checkout UI extension that adds a VAT number field to the billing form. Alternatively, use a headless storefront with a server action that calls the TaxID API before the order is confirmed.
- 3
Validate via a server-side app route
In your Shopify Remix app route, call GET /api/v1/validate/:country/:vat from the server using the TAXID_API_KEY environment variable. Check that status === 'active' before applying any tax exemption. Never expose the API key in client-side JavaScript.
- 4
Apply Shopify tax exemption for verified businesses
When the TaxID API returns valid: true, update the Shopify customer object to set tax_exempt: true via the Shopify Admin API or GraphQL Storefront API. This prevents Shopify from calculating tax on future orders for that customer.
- 5
Store validation result in Shopify customer metafields
Persist the validated VAT number, company_name, and company_address from the TaxID response in Shopify customer metafields. This gives you an auditable record showing the VAT was valid at the time of the transaction, which is required under EU record-keeping obligations.
Frequently asked questions
Does Shopify validate EU VAT numbers automatically?
No. Shopify does not call VIES or any other registry to verify that a VAT number is real or currently active. You must integrate an independent validation API — such as TaxID — to verify VAT numbers before applying tax exemptions on your Shopify storefront.
Can I use the TaxID API with Shopify Plus?
Yes. Shopify Plus gives you access to checkout customizations via the Checkout Extensibility UI, which allows you to add custom fields and server-side validation logic. You can call the TaxID API from your app backend during checkout to validate EU VAT numbers before the order is placed.
What happens if VIES is temporarily unavailable?
If the TaxID API returns status: 'service_unavailable', do not silently exempt the customer. The safest approach is to allow the order through with standard tax and send the customer a follow-up email asking them to provide their VAT number again once VIES recovers. Log the event with the customer ID and order ID.
Which countries can I validate for my Shopify B2B store?
TaxID validates VAT numbers for all 27 EU member states via VIES, plus UK (HMRC), Norway (Brønnøysund Register), and Australia (ABN Lookup). This covers the most common B2B export markets for Shopify merchants.
Country-specific API docs:
In-depth integration guide:
UK VAT validation in Shopify B2B
Validate UK VAT numbers for B2B customers in Shopify. Required under UK Making Tax Digital rules for businesses selling cross-border to UK companies.
Start validating EU VAT numbers in Shopify
Free plan — 100 validations/month. No credit card required.