This PHP library is a wrapper of vatlayer.com respecting PSR18/PSR17/PSR7.
composer require th3mouk/vatlayer
use Th3Mouk\VatLayer\Psr18Wrapper;
// Client respecting PSR18
// @see https://packagist.org/providers/psr/http-client-implementation
$http_client = WhateverYouWant();
// Request factory respecting PSR17
// @see https://packagist.org/providers/psr/http-factory-implementation
$request_factory = WhateverYouWantToo();
// Or automatically take an http client with
// composer require php-http/discovery
$http_client = Psr18ClientDiscovery::find();
$request_factory = Psr17FactoryDiscovery::findRequestFactory();
$wrapper = new Psr18Wrapper('access_key', $http_client, $request_factory);
$response = $wrapper->validate('vat_number');
- VAT Number Validation
- Get VAT Rates via Country Code
- Get VAT Rates via IP Address
- Get VAT Rates via Client IP
- Retrieve all EU VAT Rates
- VAT Compliant Price Calculation