Skip to content

Latest commit

 

History

History
171 lines (157 loc) · 14.1 KB

README.md

File metadata and controls

171 lines (157 loc) · 14.1 KB

Tax ID Validation Library

Tax ID Pro allows you to quickly integrate tax ID validation into your existing applications and workflows. You can validate over 200 different tax ID formats for over 100 countries. Tax ID Pro ensures your system can handle the diverse tax identification needs of your international customer base.

Lookup is available for VAT Numbers from the European Union (EU), plus the United Kingdom and Australia. Tax ID Pro provides a simple way to check the validity of VAT numbers and ensure compliance with EU regulations.

Install

npm i @balancer-team/taxidpro

Usage

Provide your API key to the TaxIDPro constructor. You can obtain an API key by signing up at Tax ID Pro.

import { TaxIDPro } from '@balancer-team/taxidpro'

const taxidpro = new TaxIDPro({ apiKey: 'YOUR_API_KEY' })

const validationResult = await taxidpro.validate({
  country: 'au',
  tin: '92873837267',
  type: 'entity',
})

// Output:
//
// {
//   "is_valid": true,
//   "message": null,
//   "tin_compact": "92873837267",
//   "tin_standard": "92 873 837 267",
//   "country_name": "Australia",
//   "format_name": "Business Number"
// }

const lookupResult = await taxidpro.lookup({
  country: 'au',
  tin: '49004028077',
})

// Output:
//
// {
//   country_name: 'Australia',
//   tin_compact: '49004028077',
//   tin_standard: '49 004 028 077',
//   format_name: 'Business Number',
//   is_valid: true,
//   message: null,
//   lookup_data: { name: 'BHP GROUP LIMITED', address: '3000 VIC' }
// }

Supported Countries

Country Code Validate Lookup
Albania al ✔︎
Andorra ad ✔︎
Argentina ar ✔︎
Armenia am ✔︎
Aruba aw ✔︎
Australia au ✔︎ ✔︎
Austria at ✔︎ ✔︎
Azerbaijan az ✔︎
Bangladesh bd ✔︎
Barbados bb ✔︎
Belarus by ✔︎
Belgium be ✔︎ ✔︎
Belize bz ✔︎
Bolivia bo ✔︎
Brazil br ✔︎
Brunei bn ✔︎
Bulgaria bg ✔︎ ✔︎
Canada ca ✔︎
Chile cl ✔︎
China cn ✔︎
Colombia co ✔︎
Costa Rica cr ✔︎
Croatia hr ✔︎ ✔︎
Cuba cu ✔︎
Curacao cw ✔︎
Cyprus cy ✔︎ ✔︎
Czech Republic cz ✔︎ ✔︎
Denmark dk ✔︎ ✔︎
Dominican Rep do ✔︎
Ecuador ec ✔︎
Egypt eg ✔︎
El Salvador sv ✔︎
Estonia ee ✔︎ ✔︎
Faroe Islands fo ✔︎
Finland fi ✔︎ ✔︎
France fr ✔︎ ✔︎
Georgia ge ✔︎
Germany de ✔︎ ✔︎
Gibraltar gi ✔︎
Greece gr ✔︎ ✔︎
Greenland gl ✔︎
Guatemala gt ✔︎
Guernsey gg ✔︎
Hong Kong hk ✔︎
Hungary hu ✔︎ ✔︎
Iceland is ✔︎
India in ✔︎
Indonesia id ✔︎
Ireland ie ✔︎ ✔︎
Israel il ✔︎
Italy it ✔︎ ✔︎
Jamaica jm ✔︎
Japan jp ✔︎
Jersey je ✔︎
Kazakhstan kz ✔︎
Kuwait kw ✔︎
Kyrgyzstan kg ✔︎
Latvia lv ✔︎ ✔︎
Liechtenstein li ✔︎
Lithuania lt ✔︎ ✔︎
Luxembourg lu ✔︎ ✔︎
Macedonia mk ✔︎
Malaysia my ✔︎
Malta mt ✔︎ ✔︎
Mauritius mu ✔︎
Mexico mx ✔︎
Moldova md ✔︎
Monaco mc ✔︎
Montenegro me ✔︎
Morocco ma ✔︎
Netherlands nl ✔︎ ✔︎
New Zealand nz ✔︎
Nicaragua ni ✔︎
Northern Ireland xi ✔︎ ✔︎
Norway no ✔︎
Pakistan pk ✔︎
Panama pa ✔︎
Paraguay py ✔︎
Peru pe ✔︎
Philippines ph ✔︎
Poland pl ✔︎ ✔︎
Portugal pt ✔︎ ✔︎
Romania ro ✔︎ ✔︎
Russia ru ✔︎
Samoa ws ✔︎
San Marino sm ✔︎
Saudi Arabia sa ✔︎
Serbia rs ✔︎
Singapore sg ✔︎
Slovakia sk ✔︎ ✔︎
Slovenia si ✔︎ ✔︎
South Africa za ✔︎
South Korea kr ✔︎
Spain es ✔︎ ✔︎
Sri Lanka lk ✔︎
Sweden se ✔︎ ✔︎
Switzerland ch ✔︎
Tajikistan tj ✔︎
Thailand th ✔︎
Trinidad tt ✔︎
Tunisia tn ✔︎
Turkey tr ✔︎
Turkmenistan tm ✔︎
Ukraine ua ✔︎
United Arab Emirates ae ✔︎
United Kingdom gb ✔︎ ✔︎
United States us ✔︎
Uruguay uy ✔︎
Uzbekistan uz ✔︎
Venezuela ve ✔︎
Vietnam vn ✔︎