Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
EU VAT Number validation via European Union VIES API including company information
VATEU is 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.
npm install --save vateu
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 vateu = require('vateu');
var vateuOptions = {
"countryCode": "xx", // ie FR
"vatNumber": 'xxxxxx', // vat Number without country code
"timeout": 10000 // optional - default 30000 ( 30 seconds )
}
vateu(vateuOptions, function (error, vateuInfo) {
if (error) console.log('vateu callback test - error ', res.error)
console.log('vateu callback test ', vateuInfo)
});
var vateu = require('vateu');
awaitTest()
async function awaitTest() {
var vateuOptions = {
"countryCode": "xx", // ie FR
"vatNumber": 'xxxxxx', // vat Number without country code
"timeout": 10000 // optional - default 30000 ( 30 seconds )
}
var res = await vateu(vateuOptions)
if (res.error) console.log('vateu sync test - error ', res.error)
console.log('vateu sync test Result ', res.vateuInfo)
}
{
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'
}
'vateu Badly formed request - Check vatNumber & countryCode'
'vateu Badly formed request - vatNumber is empty'
'vateu Badly formed request - countryCode is empty'
'vateu Badly formed request - Not EU Country'
'vateu vies call error'
'vateu Timeout'
Add the Debug key to your options
This will give more details of the call including errors
debugTest()
async function debugTest() {
var vateuOptions = {
"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 vateu(vateuOptions)
if (res.error) console.log('vateu debug test - error ', res.error)
console.log('vateu debug test Result ', res.vateuInfo)
}
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
Add Debug option
Add common issues section
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
EU VAT Number validation via European Union VIES API including company information
The npm package vateu receives a total of 0 weekly downloads. As such, vateu popularity was classified as not popular.
We found that vateu 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
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.