Skip to content

conedevelopment/vies-php

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

use Cone\Vies\Client;
use Cone\Vies\Model\CheckVatRequest;
use Throwable;

$client = new Client;

try {
    $response = $client->api()->checkVatNumber(new CheckVatRequest([
        '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

Class Method HTTP request Description
PublicApi checkStatus GET /check-status Check the status of each member states
PublicApi checkVatNumber POST /check-vat-number Check a Vat Number for a specific country
PublicApi checkVatTestService POST /check-vat-test-service Test the check vat service

Models

About

VIES EU VAT number checker API.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages