Skip to content
java library for calling the eu vat checker web service
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
.travis.yml
LICENSE.txt
README.md
pom.xml

README.md

vatchecker: a basic java library for fetching VAT information from the EU webservice

Maven Central Build Status Coverage Status

A small utility for calling the VIES webservice. See http://ec.europa.eu/taxation_customs/vies/ .

License

vatchecker is licensed under the Apache License Version 2.0.

Download

maven:

<dependency>
    <groupId>ch.digitalfondue.vatchecker</groupId>
    <artifactId>vatchecker</artifactId>
    <version>1.1</version>
</dependency>

gradle:

compile 'ch.digitalfondue.vatchecker:vatchecker:1.1'

Use

As a static method:

EUVatCheckResponse resp = EUVatChecker.doCheck("IT", "00950501007");
Assert.assertEquals(true, resp.isValid());
Assert.assertEquals("BANCA D'ITALIA", resp.getName());
Assert.assertEquals("VIA NAZIONALE 91 \n00184 ROMA RM\n", resp.getAddress());

You can create an instance if you prefer:

EUVatChecker euVatChecker = new EUVatChecker();
EUVatCheckResponse resp = euVatChecker.check("IT", "00950501007");
Assert.assertEquals(true, resp.isValid());
Assert.assertEquals("BANCA D'ITALIA", resp.getName());
Assert.assertEquals("VIA NAZIONALE 91 \n00184 ROMA RM\n", resp.getAddress());

You can use your own data fetcher if customization is needed, see:

You can’t perform that action at this time.