Vat API Overview
The Vat API allows you to calculate the value added tax (VAT) on specific goods, and satisfy other VAT requirements in your app
The Vat API can be used to calculate VATs on goods, validate a company’s VAT number, and get the latest VAT rates for product categories in a country.
In abstract-python
, the VatAPI
class is used to communicate with this API.
Endpoints
Validate VAT
Validate VAT numbers in your app
Calculate VAT
Calculate the VAT fee on goods in a country
Supported currency codes
AbstractAPI supports ISO 4217 currency codes for the VAT API which can be found here
Get currency codes
With abstract-python
you can get the supported country codes as a Python List. See usage below:
Below is the result:
Use case
If your app receives country codes from users, you may need to validate these inputs before querying the VatAPI
class.
See usage below:
The code above is a simple console-based program. This technique can also be extended to other programs such as a web app or desktop app.
Error messages
Refer to this page for all possible error messages you may encounter while using the VatAPI
class.