Skip to content

The VIES API Client for Java provides simple and efficient access to the VAT Information Exchange System (VIES) for validating EU VAT numbers. It enables seamless integration with the VIES service to verify VAT registration status across EU member states using a clean and easy-to-use interface.

License

Notifications You must be signed in to change notification settings

wtx-labs/vies-api-client-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VIES API Client for Java

License: MIT Java Version Maven Central

A lightweight Java client for the public VIES REST API that validates EU VAT numbers and reports the availability of national VAT systems. 🚀

This client gives you type-safe access to the official VIES endpoints so you can:

  • Check VAT numbers for any EU member state
  • Exercise the built‑in VIES test service
  • Monitor the status of individual tax administrations

✨ Why choose this client?

  • 💡 Type-safe Java API – generated models and operations for each VIES REST endpoint
  • ⚙️ Zero-auth configuration – VIES is a public API, so no credentials are required
  • 📦 OkHttp + Gson stack – customizable HTTP client with optional logging
  • Compatible with API specification - based on official API specification

🎯 Currently implemented features

  • checkVatNumber
    • Validate a VAT number in a selected member state
    • Retrieve trader name/address and optional match indicators
  • checkVatTestService
    • Hit the official VIES sandbox without touching production data
    • Exercise request payloads used in certification
  • checkStatus
    • List availability per member state
    • Inspect VIES-wide operational status

🚨 Project status

⚠️ Note: This is the first public release focused on VIES REST endpoints.
Feedback and contributions are very welcome!

📦 Version information

  • Current version: 1.0.0
  • Supported API: VIES REST (/rest-api)
  • Java compatibility: 8+

🔓 License

MIT License

Use, modify, and distribute freely while keeping the original attribution.

🚀 Quick start guide

1️⃣ Installation

Clone and build from source:

git clone https://github.com/wtx-labs/vies-api-client-java.git
cd vies-api-client-java
mvn clean install

Add the artifact to your project:

<dependency>
    <groupId>pl.wtx.vies</groupId>
    <artifactId>vies-api-client</artifactId>
    <version>1.0.0</version>
</dependency>

2️⃣ Java integration example

package pl.wtx.vies;

import pl.wtx.vies.api.client.PublicApi;
import pl.wtx.vies.api.client.invoker.ApiException;
import pl.wtx.vies.api.client.model.CheckVatRequest;
import pl.wtx.vies.api.client.model.CheckVatResponse;

/**
 * The VIES (VAT Information Exchange System) API Client - Usage Demo
 * @author WTX Labs
 * @see https://github.com/wtx-labs/vies-api-client-java
 * @license MIT
 */
public class ViesApiClientUsageDemo {

    private static final String BASE_PATH = "https://ec.europa.eu/taxation_customs/vies/rest-api";

    public static void main(String[] args) {

        System.out.println(">>> Start running the ViesApiClientUsageDemo...");

        ViesApiClient apiClient = new ViesApiClient();
        apiClient.setBasePath(BASE_PATH);

        PublicApi publicApi = new PublicApi(apiClient);

        try {

            CheckVatRequest checkVatRequest = new CheckVatRequest();
            checkVatRequest.setCountryCode("PL");
            checkVatRequest.setVatNumber("1234567890");

            CheckVatResponse checkVatResponse = publicApi.checkVatNumber(checkVatRequest);

            System.out.println("Is VIES number valid: " + checkVatResponse.getValid());
            System.out.println("Name: " + checkVatResponse.getName());
            System.out.println("Address: " + checkVatResponse.getAddress());

        } catch (ApiException e) {
            System.err.println("API Error: " + e.getMessage());
        }

        System.out.println("<<< The <<< ViesApiClientUsageDemo has been finished.");

    }

}

🔗 Get involved

📊 Project statistics

  • 🚀 Fresh VIES-focused client
  • 🔄 Continuous improvements driven by OpenAPI updates
  • 👥 Maintained by WTX Labs

🔍 Keywords

vies java client, eu vat validation java, vies rest api java, vat information exchange system java, vat number check java, vies api client library, vies sdk java

🚀 Happy coding! 😊
Your WTX Labs Team 🚀

About

The VIES API Client for Java provides simple and efficient access to the VAT Information Exchange System (VIES) for validating EU VAT numbers. It enables seamless integration with the VIES service to verify VAT registration status across EU member states using a clean and easy-to-use interface.

Topics

Resources

License

Stars

Watchers

Forks

Languages