cba85 / eu-vat-rates
A PHP component to grab up-to-date VAT rates for any European member state
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/cba85/eu-vat-rates
Requires
- php: ~7.2
Requires (Dev)
- phpunit/phpunit: 8.*
This package is auto-updated.
Last update: 2025-09-29 02:06:26 UTC
README
A PHP package to grab up-to-date VAT rates for any European Union member state.
This package uses http://jsonvat.com to obtain its data for the VAT rates.
Installation
Install using Composer :
$ composer require cba85/eu-vat-rates dev-master
Usage
$rates = new Rates; /** * Get VAT rate of a country */ $rate = $rates->getRate('FR'); /** * Get specific VAT rate of a country */ $rate = $rates->getRate('FR', 'reduced2');
You'll find more examples in the example
folder.
Tests
If VAT rates evolve, change the results expected.
$ ./vendor/bin/phpunit --bootstrap vendor/autoload.php tests/RatesTest