PHPackages                             henryejemuta/php-vtung-vtu - 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. [API Development](/categories/api)
4. /
5. henryejemuta/php-vtung-vtu

ActiveLibrary[API Development](/categories/api)

henryejemuta/php-vtung-vtu
==========================

A PHP package for integrating with the VTU.ng API.

v0.0.1(6mo ago)038MITPHPPHP ^7.4 || ^8.0CI passing

Since Dec 25Pushed 6mo agoCompare

[ Source](https://github.com/henryejemuta/php-vtung-vtu)[ Packagist](https://packagist.org/packages/henryejemuta/php-vtung-vtu)[ RSS](/packages/henryejemuta-php-vtung-vtu/feed)WikiDiscussions main Synced today

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

PHP VTU.ng VTU
==============

[](#php-vtung-vtu)

A PHP package for integrating with the [VTU.ng API](https://vtu.ng/api/).

[![Run Tests](https://github.com/henryejemuta/php-vtung-vtu/actions/workflows/run-tests.yml/badge.svg)](https://github.com/henryejemuta/php-vtung-vtu/actions/workflows/run-tests.yml)[![Release](https://github.com/henryejemuta/php-vtung-vtu/actions/workflows/publish.yml/badge.svg)](https://github.com/henryejemuta/php-vtung-vtu/actions/workflows/publish.yml)[![Total Downloads](https://camo.githubusercontent.com/45688aec894aa59c16eaf18a4ad3bc6df0fdce40e49bc4fc429fe8e1b69960fd/68747470733a2f2f706f7365722e707567782e6f72672f68656e7279656a656d7574612f7068702d7674756e672d7674752f646f776e6c6f616473)](https://packagist.org/packages/henryejemuta/php-vtung-vtu)[![License](https://camo.githubusercontent.com/64fec7dab53282daad3d41927b7da84115a0cef024c364e0713feb0de88bddc9/68747470733a2f2f706f7365722e707567782e6f72672f68656e7279656a656d7574612f7068702d7674756e672d7674752f6c6963656e7365)](https://packagist.org/packages/henryejemuta/php-vtung-vtu)[![Quality Score](https://camo.githubusercontent.com/91754a9ad94ba69bb9d61de44c42fbbccae0a5d9bff9d56f2987413533555b11/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f68656e7279656a656d7574612f7068702d7674756e672d7674752e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/henryejemuta/php-vtung-vtu)

Documentation
-------------

[](#documentation)

For full API documentation, please visit .

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

[](#installation)

You can install the package via composer:

```
composer require henryejemuta/php-vtung-vtu
```

Usage
-----

[](#usage)

### Authentication

[](#authentication)

You can authenticate using your VTU.ng username and password to retrieve a token, or pass an existing token directly.

```
use HenryEjemuta\Vtung\Client;

// Option 1: Authenticate with username and password
$client = new Client();
$response = $client->authenticate('your_username', 'your_password');
$token = $response['token'];

// Option 2: Instantiate with existing token
$client = new Client('your_jwt_token');
```

Note: The token expires after 7 days. It is recommended to store and reuse the token until it expires to avoid unnecessary authentication requests.

### Check Balance

[](#check-balance)

```
$balance = $client->getBalance();
print_r($balance);
```

### Purchase Airtime

[](#purchase-airtime)

```
// $requestId should be a unique identifier for the transaction
$requestId = uniqid();
$result = $client->purchaseAirtime('mtn', '08012345678', 100, $requestId);
print_r($result);
```

### Purchase Data

[](#purchase-data)

```
// Get Data Variations
$variations = $client->getDataVariations('mtn');
print_r($variations);

// Purchase Data
$requestId = uniqid();
$result = $client->purchaseData('mtn', '08012345678', 'variation_id', $requestId);
print_r($result);
```

### Verify Customer (Electricity, Cable TV, Betting)

[](#verify-customer-electricity-cable-tv-betting)

```
// Electricity
$customer = $client->verifyCustomer('12345678901', 'ikeja-electric', 'prepaid');

// Cable TV
$customer = $client->verifyCustomer('1234567890', 'dstv');
```

### Purchase Electricity

[](#purchase-electricity)

```
$requestId = uniqid();
$result = $client->purchaseElectricity($requestId, '12345678901', 'ikeja-electric', 'prepaid', 1000);
```

### Purchase Cable TV

[](#purchase-cable-tv)

```
$requestId = uniqid();
$result = $client->purchaseCableTV($requestId, '1234567890', 'dstv', 'variation_id');
```

Testing
-------

[](#testing)

PHPUnit is used for testing.

```
composer test
```

License
-------

[](#license)

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

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance67

Regular maintenance activity

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 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

191d ago

### 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 (5 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M992](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.5M7](/packages/avalara-avataxclient)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)

PHPackages © 2026

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