PHPackages                             bingpay/bingpay-api - 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. bingpay/bingpay-api

ActiveLibrary[API Development](/categories/api)

bingpay/bingpay-api
===================

A PHP Wrapper for Bingpay API

10PHP

Since Apr 28Pushed 4y agoCompare

[ Source](https://github.com/bingpay/bingpay-php)[ Packagist](https://packagist.org/packages/bingpay/bingpay-api)[ RSS](/packages/bingpay-bingpay-api/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Installation
============

[](#installation)

Using composer

```
composer install bingpay/bingpay-php

```

Add to your PHP code by including the index.php file `require_once "__DIR__/bingpay-php/index.php";`

Usage
=====

[](#usage)

Configuration
-------------

[](#configuration)

Download the repo, head over to index.php and edit the addPrivateKey() by adding your key. (Remember to always keep your private key Private!!!)

```
 // call the connection class
      $connection = new Connection();

      // Add your private key here
      $connection->addPrivateKey('1dd501141dffd9d68f254b241f05871b8f10754c90f4832ad9');

```

### Retrieve your wallet balance

[](#retrieve-your-wallet-balance)

The following implementation shows how eftch your bingpay wallet balance.

```
// make sure to call the class Bingpay
$bingpay = new BingPay();

$bingpay->getBalance()->data->balance;
```

### Fetch all networks

[](#fetch-all-networks)

The following implementation shows how fetch all networks.

```
 var_dump($bingpay->fetchAllNetwork());
// returns an array of all networks

// you can loop through the arrays from the data property
foreach($bingpay->fetchAllNetwork()->data as $data){
    echo 'Network Provider: '.$data->name;
    echo '';
    echo 'Network Note: '.$data->note;
    echo '';
}
```

### Airtime Purchase

[](#airtime-purchase)

The following implementation shows how perform airtime purchase.

```
$bingpay->purchaseAirtime('$phone_number', $amount, $network_id)->message;
// returns a message
```

### Verify Phone Number

[](#verify-phone-number)

The following implementation shows how to verify if a phone number is correct, you can find list of all ISO codes [here](https://www.nationsonline.org/oneworld/country_code_list.htm).

```
$bingpay->verifyNumber('$phone_number', $country_iso)->message;
// returns a message
```

### Fetch all banks

[](#fetch-all-banks)

The following implementation shows how to fetch all Nigerian banks.

```
$bingpay->fetchAllBanks();
// returns an array of all banks
```

### Resolve bank account details

[](#resolve-bank-account-details)

The following implementation shows how to fetch bank account name from account details.

```
$bingpay->resolveBank($bank_code, $account_number)->message;
// returns a message
```

### Fetch all data plans

[](#fetch-all-data-plans)

The following implementation shows how to fetch all data plans for all networks.

```
$bingpay->getAllDataPlan();
// returns an array of all data plans
```

### Fetch plans of a network

[](#fetch-plans-of-a-network)

The following implementation shows how to fetch data plans from a network id.

```
$bingpay->getDataPlan($network_id);
// returns an array of data plan
```

### Data Purchase

[](#data-purchase)

The following implementation shows how to perform data purchase.

```
$bingpay->buyData('$phone_number', $plan_id, $network_id);
// returns a message
```

### Fetch network fee

[](#fetch-network-fee)

The following implementation shows how to fetch fee in percentage before performing airtime to cash request.

```
$bingpay->getNetworkFee($amount, $network_id)->message;
// returns a message
```

### Convert airtime to cash

[](#convert-airtime-to-cash)

The following implementation shows how to make an airtime to cash request.

```
$bingpay->airtimeToCash($amount, $network_id, '$phone_number')->message;
// returns a message
```

### Fetch all bill services

[](#fetch-all-bill-services)

The following implementation shows how fetch all bills available on Bingpay.

```
$bingpay->getAllService();
// returns an array of all services
```

### Fetch service variation

[](#fetch-service-variation)

The following implementation shows how to get service variation from a service id.

```
$bingpay->getSingleService($service_id);
// returns an array of service
```

### Verify customer id

[](#verify-customer-id)

The following implementation shows how to verify customer id such as smart card number, meter number etc.

```
$bingpay->verifyCustomer($service_id,$customer_id,'prepaid')->message;
// returns a message
```

### Perform bill purchase

[](#perform-bill-purchase)

The following implementation shows how to make a bill purchase.

```
$bingpay->purchaseBill($service_id,$customer_id,$variation,$amount)->message;
// returns a message
```

### BVN Verification

[](#bvn-verification)

The following implementation shows how to verify a Bank Verification Number.

```
$bingpay->verifyBVN('$firstname', '$lastname', '$phone_number', '$bvn')->message;
// returns a message
```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 Bus Factor1

Top contributor holds 85.7% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8a3f0bb4716067ed55a4d1013094bab7e55ff9c7c4f62272b1da0b5f850eecc3?d=identicon)[thechidd](/maintainers/thechidd)

---

Top Contributors

[![thechiddx3](https://avatars.githubusercontent.com/u/55422013?v=4)](https://github.com/thechiddx3 "thechiddx3 (6 commits)")[![DevPrecious](https://avatars.githubusercontent.com/u/51764615?v=4)](https://github.com/DevPrecious "DevPrecious (1 commits)")

### Embed Badge

![Health badge](/badges/bingpay-bingpay-api/health.svg)

```
[![Health](https://phpackages.com/badges/bingpay-bingpay-api/health.svg)](https://phpackages.com/packages/bingpay-bingpay-api)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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