PHPackages                             eurovalidate/sdk - 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. eurovalidate/sdk

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

eurovalidate/sdk
================

PHP SDK for the EuroValidate API — EU VAT, IBAN, EORI validation and company data lookup.

0.1.0(3mo ago)052[2 issues](https://github.com/eurovalidate/eurovalidate-php-sdk/issues)MITPHPPHP &gt;=8.1

Since Mar 30Pushed 2mo agoCompare

[ Source](https://github.com/eurovalidate/eurovalidate-php-sdk)[ Packagist](https://packagist.org/packages/eurovalidate/sdk)[ Docs](https://eurovalidate.com)[ RSS](/packages/eurovalidate-sdk/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

EuroValidate PHP SDK
====================

[](#eurovalidate-php-sdk)

Official PHP SDK for the [EuroValidate API](https://eurovalidate.com) — validate EU VAT numbers, IBANs, EORI numbers, look up company data, and retrieve VAT rates.

**Zero dependencies.** Requires only PHP 8.1+ with the `curl` and `json` extensions.

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

[](#installation)

```
composer require eurovalidate/sdk
```

Quick Start
-----------

[](#quick-start)

```
use EuroValidate\EuroValidate;

$client = new EuroValidate('ev_live_your_key');

// Validate a VAT number
$vat = $client->validateVat('NL820646660B01');
echo $vat->valid;        // true
echo $vat->companyName;  // "COOLBLUE B.V."
echo $vat->meta->confidence; // "HIGH"

// Validate an IBAN
$iban = $client->validateIban('DE89370400440532013000');
echo $iban->valid;    // true
echo $iban->bankName; // "Commerzbank"

// Validate an EORI number
$eori = $client->validateEori('DE328169180000040');
echo $eori->valid;

// Look up a company by LEI
$company = $client->lookupCompanyByLei('724500Y6DUVHQD6OXN27');
echo $company->legalName;

// Get VAT rates for a country
$rates = $client->getVatRates('DE');
echo $rates->standardRate; // 19.0

// Get all EU VAT rates
$allRates = $client->getAllVatRates();

// Unified validation (multiple checks in one call)
$result = $client->validate([
    'vat_number' => 'NL820646660B01',
    'iban' => 'DE89370400440532013000',
]);
echo $result->vat->companyName;
echo $result->iban->bankName;

// Account info
$account = $client->getAccount();
echo $account->plan;
echo $account->callsUsed . '/' . $account->callsLimit;
```

Error Handling
--------------

[](#error-handling)

The SDK throws typed exceptions for different error scenarios:

```
use EuroValidate\Exceptions\AuthException;
use EuroValidate\Exceptions\RateLimitException;
use EuroValidate\Exceptions\ValidationException;
use EuroValidate\Exceptions\ServerException;
use EuroValidate\Exceptions\EuroValidateException;

try {
    $vat = $client->validateVat('INVALID');
} catch (AuthException $e) {
    // 401/403 — invalid or missing API key
    echo "Auth error: " . $e->getMessage();
} catch (RateLimitException $e) {
    // 429 — rate limit exceeded (auto-retried up to 3 times)
    echo "Retry after: " . $e->getRetryAfter() . " seconds";
} catch (ValidationException $e) {
    // 400/422 — invalid input
    echo "Validation error: " . $e->getErrorDetail();
} catch (ServerException $e) {
    // 5xx — server error
    echo "Server error: " . $e->getMessage();
} catch (EuroValidateException $e) {
    // Any other API error
    echo "Request ID: " . $e->getRequestId();
}
```

Configuration
-------------

[](#configuration)

```
// Custom base URL (for testing or self-hosted)
$client = new EuroValidate('ev_test_key', baseUrl: 'https://staging-api.eurovalidate.com');

// Custom timeout (default: 30 seconds)
$client = new EuroValidate('ev_live_key', timeout: 60);
```

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

[](#requirements)

- PHP 8.1+
- `ext-curl`
- `ext-json`

License
-------

[](#license)

MIT

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance83

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity32

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

Unknown

Total

1

Last Release

91d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/22b9cf981b2186380c8bd79c58c2bc184b424f26e3e3a11f9b3ebdd6e1e01bce?d=identicon)[eurovalidate](/maintainers/eurovalidate)

---

Top Contributors

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

---

Tags

validationvattaxcompanyIBANeuEuropeleieorieurovalidate

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/eurovalidate-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/eurovalidate-sdk/health.svg)](https://phpackages.com/packages/eurovalidate-sdk)
```

###  Alternatives

[intervention/validation

Additional validation rules for the Laravel framework

6777.1M18](/packages/intervention-validation)[ronanguilloux/isocodes

PHP library - Validators for standards from ISO, International Finance, Public Administrations, GS1, Book and Music Industries, Phone numbers &amp; Zipcodes for many countries

8043.4M26](/packages/ronanguilloux-isocodes)[dragonbe/vies

EU VAT numbers validation using the VIES Service of the European Commission

2814.2M17](/packages/dragonbe-vies)[ddeboer/vatin

Validate VAT identification numbers

1413.1M9](/packages/ddeboer-vatin)[jschaedl/iban-validation

A small library for validating International BankAccount Numbers (IBANs).

1023.0M17](/packages/jschaedl-iban-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).

97485.7k1](/packages/ph-7-eu-vat-validator)

PHPackages © 2026

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