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
Vies Bundle

Vies Bundle Laravel Package

sandwich/vies-bundle

Validate EU VAT numbers through the official VIES service with sandwich/vies-bundle. It wraps VIES lookups in a configurable PHP API with error handling and framework integration, making it easy to check VAT registration status reliably in your application.

View on GitHub
Deep Wiki
Context7

sandwich/vies-bundle integrates the VIES (VAT Information Exchange System) service into your PHP application, making it easy to validate European VAT numbers without hand-writing SOAP requests. It wraps the official VIES API in a clean service layer, so you can confirm registration status and pull back the associated trader details from a single call.

  • Validate EU VAT numbers against the official VIES service
  • Retrieve trader name, address, and consultation status
  • Configurable service setup with dependency-injection friendly wiring
  • Thin abstraction over the underlying SOAP client for easier testing
Frequently asked questions about Vies Bundle
Can I use sandwich/vies-bundle in a Laravel application?
No. sandwich/vies-bundle is a Symfony bundle: its value is a DI extension, a configuration tree and service definitions that wire the DragonBe/vies SOAP client into Symfony's container, none of which ports to Laravel. Installing it in a Laravel app adds a dependency you cannot use and confuses future maintainers. Install the underlying sandwich/vies client instead and bind it in a service provider behind your own VatValidator contract.
What does sandwich/vies-bundle actually do?
It is a thin Symfony adapter over the DragonBe/vies library, providing a DI extension, configuration tree and service definitions that expose the SOAP client as container services. The actual domain logic, namely the SOAP call to the EU VIES endpoint and the response object, lives in the underlying framework-agnostic library. There is no persistence, no queueing, no caching and no resilience layer in the bundle.
Is sandwich/vies-bundle still maintained and safe to depend on in production?
Treat it as a risk. The repository has roughly 2 stars and no dependents, and the last release was February 2023, making it effectively a single-maintainer package with no visible consumer base. The transitive risk sits one level down in sandwich/vies: check that its PHP constraint clears your minimum version, and assume it may stop tracking VIES SOAP changes. If you use it at all, vendor it as code you own rather than a maintained dependency.
How do I validate an EU VAT number in Laravel without a Symfony bundle?
Require the underlying sandwich/vies client, or DragonBe/vies directly, and register it as a singleton in a service provider. Expose it through a framework-neutral VatValidator interface that returns a result object with status, normalized VAT number, member state, consultation number and raw response. Keep the library as one swappable adapter so you can replace it with a hand-rolled SOAP client or a commercial API later.
How do I distinguish an invalid VAT number from a VIES member-state outage?
Do not collapse them. A SOAP fault such as MS_UNAVAILABLE means the member state's system is down and the status of the number is unknown, while an invalid response means VIES actively rejected the number; returning false for both is a correctness bug in a billing or reverse-charge path. Model the outcome explicitly as valid, invalid, unavailable or malformed, and fail closed with a retry or manual review when the status is unavailable. Check whether your wrapper surfaces faults at all, since many thin clients only return a boolean.
Does the package expose the VIES consultation number and raw response for audit evidence?
This is the question to settle before adopting it. VIES returns a consultation number with each successful check, and that number plus the timestamp, request and raw response is exactly what auditors ask for when you justify reverse-charge treatment on cross-border B2B sales. Most thin wrappers return very little beyond a validity result, so plan to log and persist the raw SOAP response and consultation number yourself.
How do I handle post-Brexit GB and Northern Ireland XI VAT numbers with VIES?
Since Brexit, GB VAT numbers no longer validate through VIES, so an invalid or unavailable result for a GB number is not evidence that the number is bad; check it against HMRC instead. Northern Ireland XI numbers do continue to validate via VIES under the protocol arrangements. Do not assume the library handles this distinction, and branch on the country prefix in your own validator before calling VIES.
Does sandwich/vies-bundle handle timeouts, retries, or caching?
No. The bundle provides container wiring only, so there is no timeout, retry, circuit breaker or caching support. VIES is a federation of 27+ national systems with no SLA and frequent member-state outages, which means any design that assumes synchronous availability will fail in production. Implement timeouts, backoff, a cache of recent successful results and an asynchronous fallback inside your own adapter.
How do I test VIES VAT validation in Laravel without hitting the SOAP service?
Depend on your own VatValidator interface rather than the concrete client, then bind a stub or fake implementation in your test suite so unit tests never touch the network. Keep a small integration suite against real VIES calls behind a separate, manually triggered CI job, and use recorded SOAP fixtures for contract tests. This also keeps your tests stable when VIES suffers an outage.
What are the alternatives to sandwich/vies-bundle for EU VAT validation?
Three options are worth a short spike. A hand-rolled SOAP client against the VIES endpoint is roughly 150 lines and removes the dependency risk entirely. A commercial VAT validation API removes both the dependency and the availability risk at a per-call cost, and usually returns the consultation number and structured statuses. If you stay open source, check whether sandwich/vies itself is still receiving commits before wrapping it.
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.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource