VAT Number Validator API - Dart/Flutter Client
VAT Number Validator checks the format and check digits of a VAT number from any EU member state, the UK, Northern Ireland (XI), Switzerland or Norway, using each tax authority's published algorithm. It returns whether the number is well formed, the country and a pass or fail for each check. It does not check registration: a number can pass and still not be registered. Paid plans add the number type, the correct check digits and EU and VIES flags.
This is the Dart/Flutter client for the VAT Number Validator API.
Installation
Add this to your pubspec.yaml:
dependencies:
apiverve_vatnumbervalidator: ^1.2.6
Then run:
dart pub get
# or for Flutter
flutter pub get
Usage
import 'package:apiverve_vatnumbervalidator/apiverve_vatnumbervalidator.dart';
void main() async {
final client = VatnumbervalidatorClient('YOUR_API_KEY');
try {
final response = await client.execute({
'vat': 'IE6388047V',
'country': 'DE'
});
print('Status: ${response.status}');
print('Data: ${response.data}');
} catch (e) {
print('Error: $e');
}
}
Response
{
"status": "ok",
"error": null,
"data": {
"vatNumber": "IE6388047V",
"isValid": true,
"countryCode": "IE",
"isoCountryCode": "IE",
"countryName": "Ireland",
"localNumber": "6388047V",
"checks": {
"country": true,
"format": true,
"checksum": true
},
"errors": [],
"numberType": null,
"expectedCheckDigits": null,
"algorithm": "weighted MOD 23 letter",
"isEU": true,
"inVies": true
}
}
API Reference
- API Home: VAT Number Validator API
- Documentation: docs.apiverve.com/ref/vatnumbervalidator
Authentication
All requests require an API key. Get yours at apiverve.com.
License
MIT License - see LICENSE for details.
Built with Dart for APIVerve
Libraries
- apiverve_vatnumbervalidator
- VAT Number Validator API client for Dart/Flutter