Skip to content

Repository files navigation

VIES API PHP SDK

This is the contract for Vies on-the-Web endpoints. The checkVat service supports exact and approximate matching at the same time. In order to retrieve the requestIdentifier, the information about requesterMemberStateCode and requesterNumber have to be provided.

Installation

Requirements

  • PHP 8.1+.

Composer

composer require conedevelopment/vies-php

Then run composer install

Usage

useCone\Vies\Client;
useCone\Vies\Model\CheckVatRequest;
useThrowable;
$client = newClient;
try {
$response = $client->api()->checkVatNumber(newCheckVatRequest([
'countryCode' => 'HU',
'vatNumber' => '12345678',
]));
// Handle response
} catch (Throwable$e) {
// Handle exception, report to Sentry etc...
}

API Endpoints

All URIs are relative to https://ec.europa.eu/taxation_customs/vies/rest-api

ClassMethodHTTP requestDescription
PublicApicheckStatusGET /check-statusCheck the status of each member states
PublicApicheckVatNumberPOST /check-vat-numberCheck a Vat Number for a specific country
PublicApicheckVatTestServicePOST /check-vat-test-serviceTest the check vat service

Models

About

VIES EU VAT number checker API.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages