Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Vat Laravel Package

ibericode/vat

Validate European VAT numbers and retrieve company details via VIES and other services with this PHP library. It provides a clean API, Laravel integration, caching, and multi-country support, making VAT checks reliable and easy to add to your app.

Deep Wiki
Context7

PHP library for dealing with European VAT

Frequently asked questions about Vat
How do I install ibericode/vat in a Laravel application?
Run composer require ibericode/vat. The core library is framework-agnostic, so there are no migrations, published config files, or facades. In Laravel, wrap the validator, rates, and calculator classes behind your own service provider and interfaces. Optional Laravel integration exists, but caching, retries, and configuration remain yours to build.
Which Laravel and PHP versions does ibericode/vat support?
The core package is framework-agnostic and its PHP version constraints are defined in Composer; it does not require Laravel. Optional Laravel integration is available, but verify exact supported Laravel versions in the package metadata before adoption. Check PHP constraints and ext-soap availability early.
How do I validate an EU VAT number against VIES with ibericode/vat?
Instantiate the validator class and call it with the VAT number; it queries the European Commission VIES service to confirm registration and validity. Treat a format-valid but unregistered VAT number differently from VIES being unreachable. The library exposes the VIES call but not a full resilience policy, so map outcomes explicitly in your adapter.
What should happen when VIES is unavailable or times out?
VIES has no meaningful SLA and member-state backends can fail independently, so a synchronous checkout call is an availability risk. The library does not give you retry, backoff, circuit breaker, or reliable timeout defaults; implement those in your wrapper. Decide whether to block, allow with a flag, or defer revalidation, and never silently treat an unreachable VIES as invalid.
How do I get the current VAT rate for an EU country?
Use the rates class to fetch the current VAT percentage for an EU country from the EU's official rates database. This is a default-rate source, not a full tax engine. Store the returned rate with the transaction and define your own rounding policy.
Does ibericode/vat handle reduced, zero, parking rates, and territory exceptions?
A single rate-for-country lookup does not model reduced, zero, parking rates, mid-year changes, or territory exceptions such as the Canary Islands, Åland, Heligoland, and Monaco. The package rates ship as data updated on a release cadence. Treat ibericode/vat as a default rate source and handle exceptions in your tax logic.
Can I cache VAT validation results and rate lookups?
The library does not provide caching; you add it in your Laravel wrapper. Cache VIES results and rate lookups with sensible TTLs, and make cache keys include the VAT number and country. Because VIES is rate-limited and slow, caching plus a documented fallback policy is strongly recommended.
What PHP extensions or runtime requirements does ibericode/vat need?
The core is dependency-light PHP and framework-agnostic. VIES validation relies on SOAP, so confirm ext-soap is installed in your runtime images. Also verify the package's PHP version constraints against your Laravel and CI environments early.
Is ibericode/vat actively maintained, and what are the alternatives?
The project has a modest footprint and a small maintainer base, so single-maintainer abandonment is a plausible risk. Its MIT license and tiny API mean forking or vendoring is feasible, but make that a conscious decision. For alternatives, compare direct VIES SOAP clients and dedicated tax engines if you need audit evidence, resilience, or complex rate modeling.
How do I test VAT validation without calling VIES in CI?
Wrap VIES validation behind your own VatValidator interface and fake it in unit tests, so CI does not depend on the external service. Keep a small number of opt-in integration tests for real VIES behavior. Test format-valid, unregistered, and VIES-unreachable paths separately.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo