PHPackages                             blockpoint/vat24api-php - 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. blockpoint/vat24api-php

ActiveLibrary[API Development](/categories/api)

blockpoint/vat24api-php
=======================

API wrapper for Vat24API

1.4(1y ago)068[3 PRs](https://github.com/Blockpoint/php-vat24api-wrapper/pulls)MITPHPPHP ^8.1CI passing

Since May 21Pushed 2mo agoCompare

[ Source](https://github.com/Blockpoint/php-vat24api-wrapper)[ Packagist](https://packagist.org/packages/blockpoint/vat24api-php)[ Docs](https://github.com/blockpoint/vat24api-php)[ GitHub Sponsors](https://github.com/Blockpoint)[ RSS](/packages/blockpoint-vat24api-php/feed)WikiDiscussions main Synced today

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

API wrapper for Vat24API
========================

[](#api-wrapper-for-vat24api)

[![Latest Version on Packagist](https://camo.githubusercontent.com/aad4ea1e734a00a266fba745cf1ce6befd9db4534e21a9edc317af0a39eb13ff/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626c6f636b706f696e742f76617432346170692d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/blockpoint/vat24api-php)[![Tests](https://camo.githubusercontent.com/30638feceb185b37e09bf2174f661570946826000e1eae390ba81bdf17429edf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f626c6f636b706f696e742f76617432346170692d7068702f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/blockpoint/vat24api-php/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/54a50fae7a4bb92875c1caf0b8f3aebc7a02ef1b9c5594918858bf56604fbca0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626c6f636b706f696e742f76617432346170692d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/blockpoint/vat24api-php)

A PHP wrapper for the Vat24API service, which provides VAT and EORI number validation for EU and UK businesses. This package makes it easy to integrate VAT and EORI validation into your PHP applications.

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

[](#installation)

You can install the package via composer:

```
composer require blockpoint/vat24api-php
```

Usage
-----

[](#usage)

```
// Create a new Vat24Api instance with your API key
$vat24api = new Blockpoint\Vat24Api\Vat24Api('your-api-key');

// Validate a VAT number
try {
    $response = $vat24api->validateVat('NL', '836176320B01');

    if ($response->hasError()) {
        echo "API Error: " . $response->getErrorMessage() . "\n";
        echo "Status Code: " . $response->getStatusCode() . "\n";
    } elseif ($response->isValid()) {
        echo "VAT number is valid!\n";
        echo "Company name: " . $response->getCompanyName() . "\n";
        echo "Company address: " . $response->getCompanyAddress() . "\n";
    } else {
        echo "VAT number is not valid!\n";
        echo "Reason: " . $response->getFaultString() . "\n";
    }
} catch (\Blockpoint\Vat24Api\Exceptions\Vat24ApiException $e) {
    echo "Error: " . $e->getMessage() . "\n";
}

// Validate an EORI number
try {
    $response = $vat24api->validateEori('GB', '123456789000');

    if ($response->hasError()) {
        echo "API Error: " . $response->getErrorMessage() . "\n";
        echo "Status Code: " . $response->getStatusCode() . "\n";
    } elseif ($response->isValid()) {
        echo "EORI number is valid!\n";
        echo "Company name: " . $response->getCompanyName() . "\n";
    } else {
        echo "EORI number is not valid!\n";
        echo "Reason: " . $response->getFaultString() . "\n";
    }
} catch (\Blockpoint\Vat24Api\Exceptions\Vat24ApiException $e) {
    echo "Error: " . $e->getMessage() . "\n";
}
```

### Available Methods

[](#available-methods)

#### Validate VAT Number

[](#validate-vat-number)

```
$response = $vat24api->validateVat('NL', '836176320B01');
```

You can also perform a mutual validation by providing a requester country code and VAT number:

```
$response = $vat24api->validateVat('NL', '836176320B01', 'GB', '123456789');
```

#### Validate EORI Number

[](#validate-eori-number)

```
$response = $vat24api->validateEori('GB', '123456789000');
```

### Response Methods

[](#response-methods)

The `ValidationResponse` object provides the following methods:

- `isValid()`: Returns whether the VAT/EORI number is valid
- `hasError()`: Returns whether the response contains an API error
- `getErrorMessage()`: Returns the error message if any
- `getStatusCode()`: Returns the HTTP status code
- `getMessage()`: Returns the status message
- `getCountryCode()`: Returns the country code
- `getVatNumber()`: Returns the VAT number
- `getEoriNumber()`: Returns the EORI number
- `getValidationStatus()`: Returns the validation status
- `getFaultString()`: Returns the fault string if validation failed
- `getRequestDate()`: Returns the request date
- `getConsultationNumber()`: Returns the consultation number
- `getConsultationAuthority()`: Returns the consultation authority
- `getCompanyName()`: Returns the company name
- `getCompanyAddress()`: Returns the company address
- `toArray()`: Returns the raw response data as an array

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance68

Regular maintenance activity

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73.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 ~0 days

Total

5

Last Release

408d ago

PHP version history (2 changes)1.0PHP ^8.3

1.4PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/ce5e3f8ae85cffa4b773a7e06a158989a00191d29cfe1c645d072d8a008d1e97?d=identicon)[Blockpoint](/maintainers/Blockpoint)

---

Top Contributors

[![Stijnbak](https://avatars.githubusercontent.com/u/24252568?v=4)](https://github.com/Stijnbak "Stijnbak (11 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

Blockpointvat24api-php

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/blockpoint-vat24api-php/health.svg)

```
[![Health](https://phpackages.com/badges/blockpoint-vat24api-php/health.svg)](https://phpackages.com/packages/blockpoint-vat24api-php)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k14](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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