A PHP library for handling EU MOSS tax/VAT calculations, validation, and integration with Laravel and Cashier.
VatCalculator is a PHP library that simplifies handling European Union VAT and MOSS tax regulations for developers. It provides methods to calculate taxes based on country codes, validate VAT numbers via EU and UK APIs, and integrate seamlessly with Laravel and Cashier Stripe. The library automates complex tax logic to ensure compliance with EU tax rules.
PHP developers building e-commerce platforms, SaaS applications, or any digital service that sells to customers in the European Union and needs to handle VAT calculations and compliance.
Developers choose VatCalculator for its straightforward API, deep integration with Laravel ecosystems, and reliable handling of EU-specific tax rules, reducing the manual effort and potential errors associated with VAT compliance.
Handle all the hard stuff related to EU MOSS tax/vat regulations, the way it should be.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Includes a service provider, config publishing, and a ValidVatNumber validation rule, making it drop-in ready for Laravel apps as shown in the configuration and validation sections.
Handles tax calculations, VAT number validation via VIES, and rate retrieval for all EU countries, including post-Brexit UK with HMRC integration, automating MOSS compliance.
Offers the BillableWithinTheEU trait to automate VAT calculations in subscription flows with Laravel Cashier, simplifying billing integration for older versions.
Can be used in any PHP project without Laravel dependencies, demonstrated by the standalone usage example where you instantiate the VatCalculator class directly.
The README explicitly warns that the package is not compatible with Laravel Cashier Stripe v13 or higher, limiting its utility in modern Laravel setups with updated billing.
VAT validation relies on the VIES SOAP API and HMRC for UK, which can be unavailable, throwing VATCheckUnavailableException and requiring complex error handling or fallbacks.
Focused solely on EU VAT regulations, so it cannot handle tax calculations for other regions without significant customization or additional libraries.