PHPackages                             belghiti/vies-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. belghiti/vies-client

ActiveLibrary[API Development](/categories/api)

belghiti/vies-client
====================

Core PSR-18 VIES (VoW) REST API client (Belghiti\\Vies) with retry and DTOs.

v0.1.1(2mo ago)0211MITPHPPHP &gt;=8.1CI failing

Since Feb 23Pushed 2mo agoCompare

[ Source](https://github.com/belghiti/vies-client)[ Packagist](https://packagist.org/packages/belghiti/vies-client)[ RSS](/packages/belghiti-vies-client/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (8)Versions (3)Used By (1)

belghiti/vies-client
====================

[](#belghitivies-client)

[![CI](https://github.com/belghiti/vies-client/actions/workflows/ci.yml/badge.svg)](https://github.com/belghiti/vies-client/actions)[![Packagist](https://camo.githubusercontent.com/e9706d79477cab74c6993eae01ca2fe72ed5cd5883c41bc8596dc7f4e1247ed8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f62656c67686974692f766965732d636c69656e742e737667)](https://packagist.org/packages/belghiti/vies-client)[![Downloads](https://camo.githubusercontent.com/281f4b7f9c554723f203d4b59251f3e84cbbac7fabeb56c41b005182bacebd19/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f62656c67686974692f766965732d636c69656e742e737667)](https://packagist.org/packages/belghiti/vies-client)

A lightweight, framework‑agnostic **PSR‑18** client for the European Commission’s **VIES (VAT Information Exchange System)** REST API.

- DTOs for requests/responses (`CheckVatRequest`, `CheckVatResponse`, `StatusInformationResponse`)
- Retry decorator (exponential backoff)
- Contract test against the official Swagger (downloaded in CI)
- **Non‑fatal** smoke test of `GET /check-status` to the public VIES REST base

---

Requirements
------------

[](#requirements)

- PHP **8.1+** (CI matrix covers 8.1 – 8.5)
- Any **PSR‑18** HTTP client + **PSR‑17** factories (e.g., Guzzle + Nyholm PSR‑7)

Installation
------------

[](#installation)

```
composer require belghiti/vies-client
# (optional) choose a PSR-18 stack:
composer require guzzlehttp/guzzle guzzlehttp/psr7     # Guzzle PSR-18 + PSR-7
# or
composer require symfony/http-client nyholm/psr7       # Symfony Psr18Client + PSR-7
```

Quick start (Guzzle PSR‑18)
---------------------------

[](#quick-start-guzzle-psr18)

```
use Belghiti\Vies\Client\HttpViesClient;
use Belghiti\Vies\Support\Adapter\GuzzlePsr18Client;
use Belghiti\Vies\Dto\CheckVatRequest;
use GuzzleHttp\Client as Guzzle;
use GuzzleHttp\Psr7\HttpFactory;

$psr18   = new GuzzlePsr18Client(new Guzzle());
$factory = new HttpFactory();

$client = new HttpViesClient(
    http:           $psr18,
    requestFactory: $factory,
    streamFactory:  $factory,
    baseUri:        'https://ec.europa.eu/taxation_customs/vies/rest-api'
);

$res = $client->checkVatNumber(new CheckVatRequest('FR', '40303265045'));
var_dump($res->valid);
```

API surface
-----------

[](#api-surface)

```
interface ViesClientInterface {
    public function checkVatNumber(CheckVatRequest $request): CheckVatResponse;
    public function checkVatTestService(CheckVatRequest $request): CheckVatResponse;
    public function checkStatus(): StatusInformationResponse;
}
```

- `CheckVatRequest` matches the public contract fields (`countryCode`, `vatNumber`, optional `requester*` &amp; trader fields)
- `checkStatus()` returns overall VOW availability and per‑country availability entries

Retry &amp; caching
-------------------

[](#retry--caching)

- Wrap the core client with `Belghiti\Vies\Decorator\RetryingViesClient` for exponential backoff
- Add your own cache decorator, or use the Laravel/Symfony packages for prebuilt caching

Quality
-------

[](#quality)

```
composer lint   # PSR-12 via PHP_CodeSniffer
composer stan   # PHPStan (level max)
vendor/bin/phpunit
```

License
-------

[](#license)

MIT

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance85

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

76d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/45d9657097644f4fffbd69fb767b90215abe1f65654806e31fb246089422a6f1?d=identicon)[belghiti](/maintainers/belghiti)

---

Top Contributors

[![belghiti](https://avatars.githubusercontent.com/u/5228095?v=4)](https://github.com/belghiti "belghiti (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/belghiti-vies-client/health.svg)

```
[![Health](https://phpackages.com/badges/belghiti-vies-client/health.svg)](https://phpackages.com/packages/belghiti-vies-client)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M650](/packages/sylius-sylius)[saloonphp/saloon

Build beautiful API integrations and SDKs with Saloon

2.4k9.6M467](/packages/saloonphp-saloon)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[swisnl/json-api-client

A PHP package for mapping remote JSON:API resources to Eloquent like models and collections.

211473.2k12](/packages/swisnl-json-api-client)[yoti/yoti-php-sdk

Yoti SDK for quickly integrating your PHP backend with Yoti

27539.9k1](/packages/yoti-yoti-php-sdk)[php-heroku-client/php-heroku-client

A PHP client for the Heroku Platform API

24404.8k4](/packages/php-heroku-client-php-heroku-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
