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 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 1mo ago

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

33

—

LowBetter than 75% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity54

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

1944d 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://www.gravatar.com/avatar/9391e9cbd6a7eadfa0736515192d8f5f8b734965ba7471e0f03e74fa97500eee?d=identicon)[jairforo](/maintainers/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

[propaganistas/laravel-phone

Adds phone number functionality to Laravel based on Google's libphonenumber API.

3.0k35.7M106](/packages/propaganistas-laravel-phone)[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[axlon/laravel-postal-code-validation

Worldwide postal code validation for Laravel and Lumen

3853.3M1](/packages/axlon-laravel-postal-code-validation)[ph-7/eu-vat-validator

A simple and clean PHP class that validates EU VAT numbers against the central ec.europa.eu database (using the official europa API).

95464.2k1](/packages/ph-7-eu-vat-validator)[galahad/laravel-addressing

Laravel package providing addressing functionality

70316.6k](/packages/galahad-laravel-addressing)[danielebarbaro/laravel-vat-eu-validator

A simple package that validates EU VAT numbers against the central ec.europa.eu database

37369.4k](/packages/danielebarbaro-laravel-vat-eu-validator)

PHPackages © 2026

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