PHP SDK for the German BZSt eVATR API — verify EU VAT identification numbers.
composer require xentral/evatr-php<?php
use Xentral\EvatrPhp\EvatrClient;
use Xentral\EvatrPhp\Request\ConfirmationQuery;
$client = new EvatrClient();
// Simple query
$result = $client->verifyVatId(
ConfirmationQuery::simple('DE123456789', 'ATU12345678')
);
echo $result->isValid(); // true/false
// Qualified query (with company data comparison)
$result = $client->verifyVatId(
ConfirmationQuery::qualified('DE123456789', 'ATU12345678', 'Firma GmbH', 'Wien')
);
$result->companyNameResult; // ComparisonResult::MATCH (A), MISMATCH (B), NOT_REQUESTED (C), NOT_PROVIDED (D)
// List EU member states and VIES availability
$states = $client->getMemberStates();The MIT License (MIT). Please see License File for more information.
- Sanan Guliyev
- All contributors who have helped improve this package
