PHPackages                             henryejemuta/laravel-vtung - 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. [Payment Processing](/categories/payments)
4. /
5. henryejemuta/laravel-vtung

ActiveLibrary[Payment Processing](/categories/payments)

henryejemuta/laravel-vtung
==========================

A laravel package to seamlessly integrate VTU.ng API into your laravel application. The VTU.ng API is an HTTPs GET API that allows you to integrate all virtual top-up and bills payment services available on our platform with your application (websites, desktop apps &amp; mobile apps). You can also start your own VTU business by integrating our VTU API and resell our services in Nigeria.

v1.2.1(4y ago)91734MITPHPPHP ^7.2|^8.0CI failing

Since Oct 16Pushed 4mo ago3 watchersCompare

[ Source](https://github.com/henryejemuta/laravel-vtung)[ Packagist](https://packagist.org/packages/henryejemuta/laravel-vtung)[ Docs](https://github.com/henryejemuta/laravel-vtung)[ RSS](/packages/henryejemuta-laravel-vtung/feed)WikiDiscussions main Synced yesterday

READMEChangelog (7)Dependencies (5)Versions (8)Used By (0)

Laravel VTU.ng
==============

[](#laravel-vtung)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cf65726bff38641440538b21152df6cbd14e8007e66f948247e426aedba62bb3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68656e7279656a656d7574612f6c61726176656c2d7674756e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/henryejemuta/laravel-vtung)[![Latest Stable Version](https://camo.githubusercontent.com/a332c41296385e4e352faa15dbcbac434ee8edffc4a114c06a8b568e8361d1ed/68747470733a2f2f706f7365722e707567782e6f72672f68656e7279656a656d7574612f6c61726176656c2d7674756e672f762f737461626c65)](https://packagist.org/packages/henryejemuta/laravel-vtung)[![Total Downloads](https://camo.githubusercontent.com/5fce0b62414d41a989b8ced59ba801bee2b8be09b28715621c4cee4a69066d6b/68747470733a2f2f706f7365722e707567782e6f72672f68656e7279656a656d7574612f6c61726176656c2d7674756e672f646f776e6c6f616473)](https://packagist.org/packages/henryejemuta/laravel-vtung)[![License](https://camo.githubusercontent.com/17afa955bf95be931e0a3cee1962deebab68639f62540365a3f30f5213263a26/68747470733a2f2f706f7365722e707567782e6f72672f68656e7279656a656d7574612f6c61726176656c2d7674756e672f6c6963656e7365)](https://packagist.org/packages/henryejemuta/laravel-vtung)[![Quality Score](https://camo.githubusercontent.com/3800b86bd22fd8ebd035a4b020a2ff6dae7022c34bc5895509e0614014037c1a/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f68656e7279656a656d7574612f6c61726176656c2d7674756e672e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/henryejemuta/laravel-vtung)

What is VTU.ng
--------------

[](#what-is-vtung)

The VTU.ng API is an HTTPs GET API that allows you to integrate all virtual top-up and bills payment services available on our platform with your application (websites, desktop apps &amp; mobile apps). You can also start your own VTU business by integrating our VTU API and resell our services in Nigeria.

What is Laravel VTU.ng
----------------------

[](#what-is-laravel-vtung)

Laravel VTU.ng is a laravel package to seamlessly integrate VTU.ng api within your laravel application.

Create a VTU.ng Account [Sign Up](http://bit.ly/3nTkLh4).

Look up VTU.ng API Documentation [API Documentation](https://vtu.ng/api/).

Non-Laravel Usage
-----------------

[](#non-laravel-usage)

If you are using this package in a non-laravel project, or you need a framework agnostic usage of this package, using the vanilla php version [php-vtung-vtu](https://github.com/henryejemuta/php-vtung-vtu) is suggested.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require henryejemuta/laravel-vtung
```

Publish VTU.ng configuration file, migrations as well as set default details in .env file:

```
php artisan vtung:init
```

Usage
-----

[](#usage)

The Laravel VTU.ng Package is quite easy to use via the VtuDontNG facade

```
use HenryEjemuta\LaravelVtuDotNG\Facades\VtuDotNG;
use HenryEjemuta\LaravelVtuDotNG\Classes\VtuDotNGResponse;

...
//To buy Airtime
try{
    $response = VtuDotNG::purchaseAirtime('mtn', '1500', '08134567890');
}catch(VtuDotNGErrorException $ex){
    Log::error("Error while purchasing airtime\n\r" . $exception->getCode() . ": " . $exception->getMessage());
}
...
```

**Note: To handle upgrade warning differently it is thrown as exception with the message from VTU.ng and an error code of 401**

Find an overview of all method with comment on what they do and expected arguments

```
    /**
     * Get Your wallet available balance, Wallet is identified by username set in vtung config or environmental variable
     * @return VtuDotNGResponse
     * @throws VtuDotNGErrorException
     */
    public function getWalletBalance(): VtuDotNGResponse

    /**
     * Purchase Airtime with py specifying the network (i.e. mtn, glo, airtel, or 9mobile to buy airtime corresponding the provided telco service code)
     * @param string $network The network_id is used to make each network unique. They include mtn, glo, airtel and etisalat. Notice that they are all in small letters.
     * @param int $amount The amount you wish to topup
     * @param string $phoneNumber The phone number that will receive the airtime
     * @return VtuDotNGResponse
     *
     * @throws VtuDotNGErrorException
     */
    public function purchaseAirtime(string $network, int $amount, $phoneNumber): VtuDotNGResponse

    /**
     * Purchase Data Bundle
     * @param string $network The network_id is used to make each network unique. They include mtn, glo, airtel and etisalat. Notice that they are all in small letters.
     * @param string $plan The variation ID of the data plan you want to purchase.
     * @param string $phone The phone number that will receive the data
     * @return VtuDotNGResponse
     * @throws VtuDotNGErrorException
     */
    public function purchaseDataBundle(string $network, string $plan, string $phone): VtuDotNGResponse

    /**
     * Verify Customer Smart Card Number/IUC/Decoder Number verification
     * You need to verify your customer unique number before purchasing.
     *
     * @param string $cableTvType The $cableTvType is used to make each cable TV unique. They include dstv, gotv, and startimes. Notice that they are all in small letters.
     * @param string $smartCardNumber The smartcard/IUC number of the decoder that should be subscribed
     * @return VtuDotNGResponse
     * @throws VtuDotNGErrorException
     */
    public function verifyCableSmartCardNumber(string $cableTvType, string $smartCardNumber): VtuDotNGResponse

    /**
     * Purchase DSTV or GoTv Cable Tv Plan
     *
     *
     * @param string $cableTvType The $cableTvType is used to make each cable TV unique. They include dstv, gotv, and startimes. Notice that they are all in small letters.
     * @param string $smartCardNumber The smartcard/IUC number of the decoder that should be subscribed
     * @param string $plan The $plan ID of the cable TV package/bouquet you want to purchase. They are as follows:
     *
     *    dstv-padi = DStv Padi
     *    dstv-yanga = DStv Yanga
     *    dstv-confam = DStv Confam
     *    dstv6 = DStv Asian
     *    dstv79 = DStv Compact
     *    dstv7 = DStv Compact Plus
     *    dstv3 = DStv Premium
     *    dstv10 = DStv Premium Asia
     *    gotv-smallie = GOtv Smallie
     *    gotv-jinja = GOtv Jinja
     *    gotv-jolli = GOtv Jolli
     *    gotv-max = GOtv Max
     *    nova = Startimes Nova
     *    basic = Startimes Basic
     *    smart = Startimes Smart
     *    classic = Startimes Classic
     *    super = Startimes Super
     *
     * @param string $customerPhoneNumber The phone number that will be stored for reference
     * @return VtuDotNGResponse
     * @throws VtuDotNGErrorException
     */
    public function purchaseCableTvPlan(string $cableTvType, string $smartCardNumber, string $plan, string $customerPhoneNumber): VtuDotNGResponse

    /**
     * We advise that you always verify the customer’s details before submitting requests to purchase the service (cable TV or electricity). The VTU.ng customer verification endpoint allows you to get the customer’s full name.
     *
     * @param DiscoEnum $disco The service_id is unique for all cable TV and electricity services.
     * @param string $meterNumber Meter Number to verify
     * @param string $meterType Meter type i.e. prepaid or postpaid
     * @return VtuDotNGResponse
     * @throws VtuDotNGErrorException
     */
    public function verifyMeterNumber(DiscoEnum $disco, string $meterNumber, string $meterType): VtuDotNGResponse

    /**
     * Purchase Electricity
     * You can purchase electricity through our API and get instant token for prepaid meters.
     *
     * @param DiscoEnum $disco Unique code of the Electricity distribution company the meter number is for
     *
     * @param string $meterNumber The meter number you want to purchase electricity for
     * @param string $meterType The meter type of electricity company you want to purchase. It is either prepaid or postpaid
     * @param int $amount The meter type of electricity company you want to purchase. It is either prepaid or postpaid
     * @param string $customerPhoneNumber The phone number that will be stored for reference
     * @return VtuDotNGResponse
     * @throws VtuDotNGErrorException
     */
    public function purchaseElectricity(DiscoEnum $disco, string $meterNumber, string $meterType, $amount, string $customerPhoneNumber): VtuDotNGResponse
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Henry Ejemuta](https://github.com/henryejemuta)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance51

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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

Every ~66 days

Recently: every ~98 days

Total

7

Last Release

1638d ago

PHP version history (2 changes)v1.0PHP ^7.2

v1.2.1PHP ^7.2|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/54673a3d375309540e1831b2827b8bf499d048dfe3cdb56193cf575c4105d85f?d=identicon)[henryejemuta](/maintainers/henryejemuta)

---

Top Contributors

[![henryejemuta](https://avatars.githubusercontent.com/u/13375596?v=4)](https://github.com/henryejemuta "henryejemuta (16 commits)")

---

Tags

paymentNigeriaairtimelaravel-vtungdata bundlebill paymentUtility BillsCable Billshenryejemuta

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/henryejemuta-laravel-vtung/health.svg)

```
[![Health](https://phpackages.com/badges/henryejemuta-laravel-vtung/health.svg)](https://phpackages.com/packages/henryejemuta-laravel-vtung)
```

###  Alternatives

[shetabit/multipay

PHP Payment Gateway Integration Package

291348.2k3](/packages/shetabit-multipay)[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4845.9k](/packages/sebdesign-laravel-viva-payments)[henryejemuta/laravel-monnify

A laravel package to seamlessly integrate monnify api within your laravel application

132.1k](/packages/henryejemuta-laravel-monnify)

PHPackages © 2026

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