ddeboer/vatin

Validate VAT identification numbers

Maintainers

πŸ‘ ddeboer

Package info

github.com/ddeboer/vatin

pkg:composer/ddeboer/vatin

Fund package maintenance!

ddeboer

Statistics

Installs: 3 167 203

Dependents: 8

Suggesters: 2

Stars: 141

Open Issues: 4

3.1.0 2025-02-27 22:06 UTC

Requires

  • php: >=8.1

Suggests

  • ext-soap: Required if you want to check the VAT number via VIES

Provides

None

Conflicts

None

Replaces

None

MIT 778c9e7d7619ee9ed5f30609b9b2a39b613933db

vattaxbtwvies

This package is auto-updated.

Last update: 2026-06-28 01:11:41 UTC


README

πŸ‘ Packagist Version

A small PHP library for validating VAT identification numbers (VATINs).

Installation

This library is available on Packagist:

$ composer require ddeboer/vatin

If you want to use this library in a Symfony application, you can use the VatinBundle instead.

Usage

Validate a VAT number’s format:

use Ddeboer\Vatin\Validator;

$validator = new Validator();
$bool = $validator->isValid('NL123456789B01');

Additionally check whether the VAT number is in use, with a call to the VAT Information Exchange System (VIES) SOAP web service:

use Ddeboer\Vatin\Validator;

$validator = new Validator();
$bool = $validator->isValid('NL123456789B01', true);