Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
A EU VAT Number validation via European Union VIES API including company information
A lightweight quick and easy to use NPM package written in node.js A simple request with country code & VAT number ( timeout & debug optional ) will allow you to verify the validity of a VAT number issued by any European Union Member State via the VIES System. The returned response will show whether the VAT number is valid or not and any extra company information where available.
VIES (VAT Information Exchange System) is an electronic means of validating VAT-identification ( VATIN ) numbers of economic operators registered in the European Union for cross border transactions on goods or service.
Contact the developer at bitinix@gmail.com
npm install --save VIES-VAT
AT BE BG HR CY CZ DK EE FI FR DE EL HU IE IT LV LT LU MT NL PL PT RO SK SI ES SE XI
var vies = require('VIES-VAT');
var viesOptions = {
"countryCode": "xx", // ie FR
"vatNumber": 'xxxxxx', // vat Number without country code
"timeout": 10000 // optional - default 30000 ( 30 seconds )
}
vies(viesOptions, function (error, viesInfo) {
if (error) console.log('vies callback test - error ', error)
console.log('vies callback test ', viesInfo)
});
var vies = require('VIES-VAT');
awaitTest()
async function awaitTest() {
var viesOptions = {
"countryCode": "xx", // ie FR
"vatNumber": 'xxxxxx', // vat Number without country code
"timeout": 10000 // optional - default 30000 ( 30 seconds )
}
var res = await vies(viesOptions)
if (res.error) console.log('vies sync test - error ', res.error)
console.log('vies sync test Result ', res.viesInfo)
}
{
valid: true,
countryCode: 'xx',
vatNumber: 'xxxxxxx',
requestDate: '2021-12-08+01:00',
name: 'Company Name', // if available
address: 'Company Address' // if available
}
{
valid: false,
countryCode: 'xx',
vatNumber: 'xxxxxxxxxx',
requestDate: '2021-12-08+01:00',
name: false,
address: false,
error : 'Error message'
}
'vies Badly formed request - Check vatNumber & countryCode'
'vies Badly formed request - vatNumber is empty'
'vies Badly formed request - countryCode is empty'
'vies Badly formed request - Not EU Country'
'vies vies call error'
'vies Timeout'
Add the Debug key to your options
This will give more details of the call including errors
debugTest()
async function debugTest() {
var viesOptions = {
"countryCode": "xx", // ie FR
"vatNumber": 'xxxxxx', // vat Number without country code
"timeout": 60000, // optional - default 30000 ( 30 seconds )
"debug": true // optional - default false
}
var res = await vies(viesOptions)
if (res.error) console.log('vies debug test - error ', res.error)
console.log('vies debug test Result ', res.viesInfo)
}
This could be an internet connection issue or dns lookup
Check that you can ping 'ec.europa.eu' from your server
Add the following entry to your host file:-
147.67.34.30 ec.europa.eu
Make for public use on GITHUB
The MIT License (MIT)
Copyright (c) 2021 bitinix@gmail.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
A EU VAT Number validation via European Union VIES API including company information
The npm package vies-vat receives a total of 17 weekly downloads. As such, vies-vat popularity was classified as not popular.
We found that vies-vat demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.