https://vat.abstractapi.com/v1/calculate
? api_key = YOUR_API_KEY
& amount = 175
& country_code = DE
{
"vat_number": "SE556656688001",
"is_vat_valid": true,
"company_name": "Google Sweden AB",
"company_address": "Google Ireland Ltd, M Collins, Gordon House, Barrow Street, Dublin 4, Ireland",
"company_country": "SE",
"company_country_code": "Sweden"
}
STARTER
$9
per
month
PRO
$49
per
month
ENTERPRISE
$499
per
month
The VAT Validation and Rates API, like all of Abstract's APIs such as the Exchange Rate API, is organized around REST. It is designed to use predictable, resource-oriented URL's and to use HTTP status codes to indicate errors.
The VAT Validation and Rates API requires all communications to be secured TLS 1.2 or greater.
All of Abstract's API are versioned. The VAT Validation and Rates API is currently on Version 1.
Your API key is your unique authentication key to be used to access Abstract's Exchange Rate API. Note that each of Abstract's API has a unique API key, so you will need different keys to access the VAT Validation and Rates and IP Geolocation APIs, for example. To authenticate your requests, you will need to append your API key to the base URL.
https://vat.abstractapi.com/v1/
Abstract's VAT Validation and Rates API contains three main endpoints for accessing VAT data:
The /validate/ endpoint takes your unique API key and a VAT number in the request, checks if that number is valid, and if it is valid, returns addition details about the company associated with that VAT number.
https://vat.abstractapi.com/v1/validate
? api_key = YOUR_API_KEY
& vat_number = SE556656688001
This was a successful request, and the details below are included in the response:
{
"vat_number": "SE556656688001",
"is_vat_valid": true,
"company_name": "Google Sweden AB",
"company_address": "Google Ireland Ltd, M Collins, Gordon House, Barrow Street, Dublin 4, Ireland",
"company_country": "SE",
"company_country_code": "Sweden"
}
PARAMETER
TYPE
DETAILS
api_key required
String
Your unique API key. Note that each user has unique API keys for each of Abstract's APIs, so your VAT Validation and Rates API key will not work for as your IP Geolocation API key, for example.
vat_number required
String
The VAT number to validate.
The API response is returned in a universal and lightweight JSON format.
PARAMETER
TYPE
DETAILS
vat_number
String
The VAT number to validate.
is_vat_valid
Boolean
Is true if the submitted VAT number is valid.
company_name
String
The name of the company associated with the VAT number.
company_address
String
The address of the company associated with the VAT number.
company_country
String
The country of the company associated with the VAT number.
company_country_code
String
The two letter ISO 3166-1 alpha-2 code of the country associated with the VAT number.
The /calculate/ endpoint makes it easy to calculate a VAT compliant price given a country and price, as well as such optional values as the type of goods.
Below is a simple example of the /calculate/ endpoint being used to find the VAT compliant price of a 175 Euro purchase in Germany:
https://vat.abstractapi.com/v1/calculate
? api_key = YOUR_API_KEY
& amount = 175
& country_code = DE
This was a successful request, and the converted because no target currency or currencies were included, the exchange rate of all available currencies were included in the response:
{
"amount_excl_vat": 175.00,
"vat_amount": 33.25,
"amount_incl_vat": 208.25,
"vat_rate": 0.19,
"country_code": "DE",
"country_name": "Germany"
}
PARAMETER
TYPE
DETAILS
api_key required
String
Your unique API key. Note that each user has unique API keys for each of Abstract's APIs, so your VAT Validation API key will not work for as your IP Geolocation API key, for example.
amount required
String
The amount that you would like to get the VAT amount for or from.
country_code required
String
The two letter ISO 3166-1 alpha-2 code of the country in which the transaction takes place.
is_vat_incl
Boolean
If the amount already has VAT added and you'd like to do the reverse calculation and split out the amount and VAT, set this parameter to true. If this parameter is not explicitly included it will default to false.
vat_category
String
Some countries offer a reduced VAT rate for certain categories of goods. To determine if a reduced VAT is available and to apply it to the final amount, include the vat_category in the request.
The API response is returned in a universal and lightweight JSON format.
PARAMETER
TYPE
DETAILS
amount_excl_vat
Float
The amount excluding the VAT.
vat_amount
Float
The calculated amount of VAT.
amount_incl_vat
Float
The sum of the base amount and the VAT, i.e., amount_excl_vat + vat_amount
vat_rate
Float
The VAT rate, from 0.01 to 0.99.
vat_category
String
The optional category of the purchase, used to determine whether it qualifies for a reduced rate. See below for a list of supported categories.
country_code
String
The two letter ISO 3166-1 alpha-2 code of the country in which the transaction takes place.
country_name
String
The name of the country the VAT is being calculated from.
Rather than taking an amount and getting the VAT that should be added to it, let's assume we already have an amount with VAT added to it and that we want to split out the VAT from that amount. To do that, you would include the is_vat_incl parameter set to true.
https://vat.abstractapi.com/v1/calculate
? api_key = YOUR_API_KEY
& amount = 208.05
& country_code = DE
& is_vat_incl = true
You'll notice that response is the exact same as if the request was to add VAT to an amount. Using the is_vat_incl you can either add or more VAT from an amount, and have a clear breakdown of the base price, the VAT, and the base price including the VAT.
{
"amount_excl_vat": 175.00,
"vat_amount": 33.25,
"amount_incl_vat": 208.25,
"vat_rate": 0.19,
"country_code": "DE",
"country_name": "Germany"
}
Some countries give reduced VAT rates for certain categories of goods. If you pass the VAT category in the request, the API will check if there is a reduced VAT rate for that country and category. For example, below is a request to get the VAT for 500 EUR worth of books in Germany:
https://vat.abstractapi.com/v1/calculate
? api_key = YOUR_API_KEY
& amount = 500
& country_code = DE
& vat_category = books
The request was valid and successful, and books qualify for reduced VAT in Germany, so it returns the following:
{
"amount_excl_vat": 500.00,
"vat_amount": 35.00,
"amount_incl_vat": 535.00,
"vat_rate": 0.07,
"country_code": "DE",
"country_name": "Germany"
}
You can combine this use of the vat_category parameter with the is_vat_incl, to split out the VAT and base amount for an amount that already includes the VAT. Note in the example below, the amount has changed to 535, the total include VAT of 500 EUR worth of books from Germany.
https://vat.abstractapi.com/v1/calculate
? api_key = YOUR_API_KEY
& amount = 535
& country_code = DE
& vat_category = books
& is_vat_incl = true
Once again the response for an amount=535 where is_vat_incl=true is the same as for amount=500 and is_vat_incl=false or where this parameter is not included at all, since they are effectively two sides of the same equation, adding and removing VAT from the same amount.
{
"amount_excl_vat": 500.00,
"vat_amount": 35.00,
"amount_incl_vat": 535.00,
"vat_rate": 0.07,
"country_code": "DE",
"country_name": "Germany"
}
The /categories/ endpoint makes it easy to get the latest VAT rates, including the reduced rates for certain categories, for a specific country.
Below is a simple example of the /categories/ endpoint being used to get the latest VAT rates for Germany:
https://vat.abstractapi.com/v1/categories
? api_key = YOUR_API_KEY
& country_code = DE
This was a successful request, and the response includes both the standard rate as well as the reduces rates and categories associated with them:
{
"country_code": "DE",
"country_name": "Germany",
"standard_rate": 0.19,
"reduced_rates": {
"foodstuffs": 0.07,
"water supplies": 0.07,
"medical equipment": 0.07,
"books": 0.07,
"e-books": 0.07,
"audiobooks": 0.07,
"newspapers and periodicals": 0.07,
"cultural events": 0.07,
"hotel": 0.07,
"sports events": 0.07,
"social services": 0.07,
"medical care": 0.07,
"dental care": 0.07,
"firewood": 0.07,
"take away food": 0.07,
"cut flowers": 0.07
}
}
PARAMETER
TYPE
DETAILS
api_key required
String
Your unique API key. Note that each user has unique API keys for each of Abstract's APIs, so your VAT Validation API key will not work for as your IP Geolocation API key, for example.
country_code required
String
The two letter ISO 3166-1 alpha-2 code of the country in which the transaction takes place.
The API response is returned in a universal and lightweight JSON format.
PARAMETER
TYPE
DETAILS
country_code
String
The two letter ISO 3166-1 alpha-2 code of the country in which the transaction takes place, which is returned from the request.
country_name
String
The full plain text name of the country specified by the country_code.
standard_rate
Float
The standard VAT rate for the requested country.
reduced_rates
Object
A JSON object containing categories as the keys and the reduced VAT rate for that category as the values.
A value-added tax (VAT) is a consumption tax that is applied to a product when value is applied to it at every step of a supply chain. This means it can be applied all the way from the initial steps of production to the final point of sale. The total VAT amount that is paid is on the cost of the product itself, excluding the cost of materials that had already been taxed on the product itself. Many countries around the world use some form of VAT, but it is most commonly found in the European Union.
Yes, businesses selling to customers in the European Union must collect VAT numbers and submit them to the authorities. Incorrect VAT numbers -- whether the inaccuracy is purposeful or not -- could result in fines and / or other issues. Just as you would validate emails or validate phone numbers, it's best practice (and actually required!) that you validate VAT numbers.
The short answer is that it depends, but generally yes. If you are selling to customers in the European Union, whether or not you yourself are based in the European Union, you must obtain a (free) VAT number. Every country in the EU enforces tax requirements related to VAT, so it's not recommended that you ignore it.
We use a variety of sources to collect and validate VAT data to ensure our customers have the more accurate and up to date information available. We primarily rely on the VAT Information Exchange System (VIES) operated by the European Commission as a primary source, and then we supplement this with additional data and validations before we expose it to our end users.
While each country in the European Union has different detailed requirements on what must be on an invoice, they generally all require VAT information to be included on the invoices themselves.
September 1, 2020
-
Updated Ireland standard and reduced rates following Covid measures
August 10, 2020
-
Improved error handling and responses when third party services are down or slow
July 23, 2020
-
Updated reduced rates and their descriptions for France, Italy, and Sweden
Included references to tax codes where relevant and available.
July 11, 2020
-
Added additional categories and rates for reduced VAT types for France, Germany, and Spain
July 9, 2020
-
Improved daily data sync and validation with several European VAT sources, especially Nordic countries