Rates

Charge the correct VAT rate by querying the customer’s country code. This ensures that your invoice states the correct final amount as VAT rates vary from European member state to member state.

The Rate Object

Aside from retrieving VAT rates applicable to your customer, you can also obtain net and gross prices to display during checkout. The API will do the calculation for you. Simply attach the price to your query to present the correct total price to your customer.

Key

Value

abbreviation

Abbreviation of local_name.

categories

Categories relevant for digital products. Supports audiobook,ebook and periodical. Default to standard_rate if your digital product category is not available or contact us.

country_code

2-letter ISO country code.

country_name

Corresponding English name of country_code.

ip_address

The same IP address coming from the ip_address query params, or the geolocated IP address if none was provided.

local_name

Localized name of the VAT.

member_state

Boolean indicating whether the country is an EU member state.

price

gross

Gross amount in cents, after applying the applicable VAT rate.

net

Net amount in cents, as requested in your query.

vat

VAT amount in cents.

vat_rate

VAT rate applied for the calculation. This can equal the standard_rate or the rate of the category as per your request. If member_state is false, this value will be 0.

reduced_rates

Array of reduced VAT rates in percent.

standard_rate

Standard VAT rate in percent.

get
List all rates

https://api.vatstack.com/v1/rates
Retrieves all VAT rate objects, including standard VAT rates and VAT rates for digital products. You can filter the results by a 2-letter ISO country code to only obtain the rate object for a specific member state. This method requires that you request a customer’s country code yourself.
Request
Response
Request
Query Parameters
limit
optional
number
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
page
optional
number
Integer for the current page.
country_code
optional
string
Filter results by a 2-letter ISO country code of the EU member state. If found, the returned response will only list the rate object for that country code.
price
optional
number
Net price in cents (e.g. 100.50 must be expressed as 10050). This common workaround prevents unexpected rounding issues. Applies to all objects returned.
category
optional
string
If the price is provided, you can provide the digital products category relevant for calculation. Supports audiobook,ebook and periodical. Applies to all objects returned.
Response
200: OK
VAT rates successfully obtained with price object for 100 EUR.
{
"has_more": false,
"rates": [
{
"abbreviation": "UID",
"categories": {
"audiobook": 20,
"ebook": 20,
"periodical": 20
},
"country_code": "AT",
"country_name": "Austria",
"local_name": "Umsatzsteuer-Identifikationsnummer",
"member_state": true,
"price": {
"vat": 2000,
"vat_rate": 20,
"net": 10000,
"gross": 12000
},
"reduced_rates": [
10,
13
],
"standard_rate": 20
},
...
],
"rates_count": 28
}

get
Retrieve geolocated rate

https://api.vatstack.com/v1/rates/geolocate
Retrieves a geolocated VAT rate by IP address. While you can let customers choose the country they reside in, it may result in fraudulent data. It is best practice to geolocate the customer with their IP address, as the IP address counts as your tax evidence for VAT MOSS returns. You can leave out the IP address in your query and Vatstack will automatically use the IP address coming from the request. Leaving out the IP address can be useful if the request originates from a front-end application.
Request
Response
Request
Query Parameters
ip_address
optional
string
IPv4 or IPv6 address to geolocate. If none is provided, the IP address of the request is used.
price
optional
number
Net price in cents (e.g. 100.50 must be expressed as 10050). This common workaround prevents unexpected rounding issues.
category
optional
string
If the price is provided, you can provide the digital products category relevant for calculation. Supports audiobook,ebook and periodical.
Response
200: OK
VAT rate successfully obtained.
{
"abbreviation": "USt-IdNr.",
"categories": {
"audiobook": 7,
"ebook": 19,
"periodical": 19
},
"country_code": "DE",
"country_name": "Germany",
"ip_address": "81.169.181.179",
"local_name": "Umsatzsteuer-Identifikationsnummer",
"member_state": true,
"price": {
"gross": 11900,
"net": 10000,
"vat": 1900,
"vat_rate": 19
},
"reduced_rates": [
7
],
"standard_rate": 19
}