PHPackages                             jairforo/php-vat-checker - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. jairforo/php-vat-checker

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

jairforo/php-vat-checker
========================

PHP VAT checker based on the European Commission web service

3.0.0(5y ago)24.7k3[1 issues](https://github.com/jairforo/php-vat-checker/issues)[1 PRs](https://github.com/jairforo/php-vat-checker/pulls)BSD-2-ClausePHPPHP ^7.3

Since Feb 24Pushed 1y ago1 watchersCompare

[ Source](https://github.com/jairforo/php-vat-checker)[ Packagist](https://packagist.org/packages/jairforo/php-vat-checker)[ RSS](/packages/jairforo-php-vat-checker/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (3)Versions (5)Used By (0)

PHP VAT Checker
===============

[](#php-vat-checker)

[![Latest Version](https://camo.githubusercontent.com/4558cb887718035a2dedb372d986163b07a0a77be501b67b8933ebd6b75ee4d1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6a616972666f726f2f7068702d7661742d636865636b65722e7376673f7374796c653d666c61742d737175617265)](https://github.com/jairforo/php-vat-checker/releases)[![Build Status](https://camo.githubusercontent.com/eb4c894bb1ed4d3a6c9c1cd4fa0a5aea4501d10d86be4b6575ab9451b6a2beb5/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f756269656e742f6c61726176656c2d70776e65642d70617373776f7264732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.com/github/jairforo/php-vat-checker)[![StyleCI](https://camo.githubusercontent.com/807e96b0f14dbae5b7af91481d72c4a80edc677f483509702feb2561e6c47e5e/68747470733a2f2f7374796c6563692e696f2f7265706f732f3232363930373535342f736869656c64)](https://styleci.io/repos/226907554)[![Total Downloads](https://camo.githubusercontent.com/871ebe970709028a4644e7a5b7628874e2cb36353056bfb64a124148e56e78a9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a616972666f726f2f7068702d7661742d636865636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jairforo/php-vat-checker)

A PHP package that helps you to check information about Union European companies through the combination of VAT number and Country code. This package is an interface to consume the SOAP API webservice provided by the European Commission. ([http://ec.europa.eu/taxation\_customs/vies/checkVatTestService.wsdl](http://ec.europa.eu/taxation_customs/vies/checkVatTestService.wsdl))

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

[](#installation)

You can install the package via composer:

```
composer require jairforo/php-vat-checker
```

Usage
-----

[](#usage)

### Checking the VAT information.

[](#checking-the-vat-information)

This check only validates whether the VAT information is valid.

```
use JairForo\VATChecker\Exceptions\VATCheckerException;
use JairForo\VATChecker\VATChecker;

try {
    /** @var bool $isValid */
    $isValid = (new VATChecker())->isValid($countryCode, $vatNumber);
} catch (VATCheckerException $exception) {
    // Something went wrong during the request.
}
```

### Obtaining the VAT information.

[](#obtaining-the-vat-information)

- If the information is not valid, an InvalidVATException is thrown.
- If something goes wrong during the request, an VATCheckerException is thrown.

```
use JairForo\VATChecker\Exceptions\InvalidVATException;
use JairForo\VATChecker\Exceptions\VATCheckerException;
use JairForo\VATChecker\Objects\VATResponse;
use JairForo\VATChecker\VATChecker;

try {
    /** @var VATResponse $vatResponse */
    $vatResponse = (new VATChecker())->check($countryCode, $vatNumber);

    print_r($vatResponse);
} catch (VATCheckerException $exception) {
    if ($exception instanceof InvalidVATException) {
        // The VAT information was invalid.
        return;
    }

    // Something else went wrong during the request.
}
```

The above, when successful, prints the following output:

```
{
  "country_code": "NL",
  "vat_number": "611989431B01",
  "requested_at": {
    "date": "2020-02-02 00:00:00.000000",
    "timezone_type": 1,
    "timezone": "+00:00"
  },
  "company_name": "UNICORN B.V.",
  "address": "UNICORN STREET 007",
  "zipcode": "1108DH",
  "city": "AMSTERDAM",
  "original_address": "UNICORN STREET 007 1108DH AMSTERDAM"
}

```

### Testing

[](#testing)

```
composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

License
-------

[](#license)

The BSD 2-clause "Simplified" license (bsd-2-clause). Please see [License File](LICENSE.md) for more information.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 68.3% 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 ~161 days

Total

3

Last Release

1998d ago

Major Versions

1.0.0 → 2.0.02021-01-12

2.0.0 → 3.0.02021-01-12

PHP version history (3 changes)1.0.0PHP ^7.1

2.0.0PHP ^7.2

3.0.0PHP ^7.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7620948?v=4)[Jair Foro](/maintainers/jairforo)[@jairforo](https://github.com/jairforo)

---

Top Contributors

[![jairforo-fixeads](https://avatars.githubusercontent.com/u/25613192?v=4)](https://github.com/jairforo-fixeads "jairforo-fixeads (28 commits)")[![jairforo](https://avatars.githubusercontent.com/u/7620948?v=4)](https://github.com/jairforo "jairforo (11 commits)")[![claudiodekker](https://avatars.githubusercontent.com/u/1752195?v=4)](https://github.com/claudiodekker "claudiodekker (2 commits)")

---

Tags

phpvalidationvatviescheckercheckVatService

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jairforo-php-vat-checker/health.svg)

```
[![Health](https://phpackages.com/badges/jairforo-php-vat-checker/health.svg)](https://phpackages.com/packages/jairforo-php-vat-checker)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.5k55.4M8.4k](/packages/larastan-larastan)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[illuminate/validation

The Illuminate Validation package.

18838.2M1.7k](/packages/illuminate-validation)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M194](/packages/laravel-ai)[moonshine/moonshine

Laravel administration panel

1.3k253.1k81](/packages/moonshine-moonshine)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

725172.4k14](/packages/tallstackui-tallstackui)

PHPackages © 2026

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