PHPackages                             amit-patel/hmrc-vat-validator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. amit-patel/hmrc-vat-validator

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

amit-patel/hmrc-vat-validator
=============================

A Laravel package for validating UK VAT numbers and Business Name using HMRC API

1.0(1y ago)05MITPHPPHP &gt;=8.0

Since Dec 24Pushed 1y ago1 watchersCompare

[ Source](https://github.com/amitpatel1849/LARAVEL-HMRC-VAT-VALIDATOR)[ Packagist](https://packagist.org/packages/amit-patel/hmrc-vat-validator)[ RSS](/packages/amit-patel-hmrc-vat-validator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

LARAVEL HMRC VAT VALIDATOR PACKAGE
==================================

[](#laravel-hmrc-vat-validator-package)

This package will check UK VAT Number by using HMRC API.

What is this repository for?
----------------------------

[](#what-is-this-repository-for)

- Easily integrte UK VAT Validation
- Also check Business Name of the VAT number belongs to.

How do I Install Package?
-------------------------

[](#how-do-i-install-package)

You can install the package via composer. Make sure comoser is installed if not then go through

Run the following command: Go to your laravel root directory

```
composer require amit-patel/hmrc-vat-validator
```

How do I Configure Package?
---------------------------

[](#how-do-i-configure-package)

- Step 1: Publish configuration Run following command:

    ```
    php artisan vendor:publish --tag=config
    ```

    This command will create a hmrcvatvalidator.php configuration file in your config directory.
- Step 2: Set below environment variables in your .env file

    ```
    HMRC_BASE_URL=https://test-api.service.hmrc.gov.uk (change it to production url when you are working with production enverinment)
    HMRC_CLIENT_ID=your-client-id
    HMRC_CLIENT_SECRET=your-client-secret
    ```
- Step 3: Cleare all cache To ensure Laravel recognizes your new configuration, clear the configuration cache:

    ```
    php artisan o:c
    ```

Use guidelines
--------------

[](#use-guidelines)

Once you installation done succesfully. You can check VAT number.

- Step 1: Setup code in Controller in which you want to verify VAT number. ```
    use AmitPatel\HmrcVatValidator\Facades\HmrcVatValidator;
    public function validateVat()
    {
        $response = HmrcVatValidator::validateVat('123456789');
        return response()->json($response);
    }
    ```

    Step 2: Setup route ```
    Route::get('/validate-vat', [YourController::class, 'validateVat']);
    ```

### Who do I talk to?

[](#who-do-i-talk-to)

- **Name:** Amit Patel
- **LinkedIn:**

### License

[](#license)

This package is open-source software licensed under the MIT License.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance40

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

503d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/df4aa1475f5b900cec82bfac276c5eaa8ec858613708ba7fa5b06dcac9cde59b?d=identicon)[amitpatel727](/maintainers/amitpatel727)

---

Top Contributors

[![amitpatel1849](https://avatars.githubusercontent.com/u/3286084?v=4)](https://github.com/amitpatel1849 "amitpatel1849 (7 commits)")

### Embed Badge

![Health badge](/badges/amit-patel-hmrc-vat-validator/health.svg)

```
[![Health](https://phpackages.com/badges/amit-patel-hmrc-vat-validator/health.svg)](https://phpackages.com/packages/amit-patel-hmrc-vat-validator)
```

###  Alternatives

[aporat/store-receipt-validator

PHP receipt validator for Apple App Store and Amazon Appstore

6503.9M9](/packages/aporat-store-receipt-validator)[robertogallea/laravel-codicefiscale

Codice fiscale validation for php/laravel

58151.6k1](/packages/robertogallea-laravel-codicefiscale)[deligoez/tckimlikno

Turkish Identification Number Verification &amp; Validation Package for Laravel

2917.4k](/packages/deligoez-tckimlikno)[speelpenning/laravel-postcode-nl

A Laravel client using the Postcode.eu REST API for Dutch address verification.

1221.1k](/packages/speelpenning-laravel-postcode-nl)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
