PHPackages                             towoju5/bitnob - 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. towoju5/bitnob

ActiveLibrary[API Development](/categories/api)

towoju5/bitnob
==============

Laravel wrapper around Bitnob virtual cards Rest API.

v1.2.6(1y ago)23.1k1MITPHPPHP &gt;=7.2

Since Oct 2Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/towoju5/bitnob)[ Packagist](https://packagist.org/packages/towoju5/bitnob)[ Docs](https://github.com/towoju5/bitnob)[ RSS](/packages/towoju5-bitnob/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (11)Used By (0)

Very short description of the package
=====================================

[](#very-short-description-of-the-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a77a768221e000bd30048252bd2c255c41b33318b43ada0542cf8ad91b8bc418/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f776f6a75352f6269746e6f622e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/towoju5/bitnob)[![Total Downloads](https://camo.githubusercontent.com/9771d5bf79d68e191050a1ae4765708590ca41a437c3e37182fe14d721367eaf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f776f6a75352f6269746e6f622e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/towoju5/bitnob)[![GitHub Actions](https://github.com/towoju5/bitnob/actions/workflows/main.yml/badge.svg)](https://github.com/towoju5/bitnob/actions/workflows/main.yml/badge.svg)

This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.

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

[](#installation)

You can install the package via composer:

```
composer require towoju5/bitnob
```

Setup your base url and api key via the env file

```
    BITNOB_API_KEY=pk.f75b136.8a9babaec7ce729be883a7111
    BITNOB_BASE_URL='https://sandboxapi.bitnob.co/api/v1'
```

```
    use Towoju5\Bitnob\Bitnob;
    $bitnob = new Bitnob;
```

Virtual cards Management
------------------------

[](#virtual-cards-management)

```
    $bitnob = new Bitnob();
    $cards      = $bitnob->cards();
    $regUser    = $cards->regUser(array $data)
    $create     = $cards->create(array $data)
    $topup      = $cards->topup(array $data)
    $action     = $cards->action(string $action, string $cardId)
    $getCard    = $cards->getCard(string $cardId)
    $getTransaction = $cards->getTransaction(string $cardId)

```

Manage Bitnob Customers
-----------------------

[](#manage-bitnob-customers)

```
    $bitnob = new Bitnob();
    $customer = $bitnob->customer();
    $createCustomer = $customer->createCustomer(array $data);
    $updateCustomer = $customer->updateCustomer(string $id, array $data);
    $listCustomer   = $customer->listCustomer(string $id);
    $getCustomer    = $customer->getCustomer(string $id);
```

Transfer/Payout
---------------

[](#transferpayout)

```
    $bitnob = new Bitnob();
    $transfer   = $bitnob->transfer();
    $initPayout = $transfer->initPayout(array $arrays)
    $completePayout      = $transfer->completePayout(string $payoutInitId)
    $countryRequirements = $transfer->countryRequirements(string $country_code)
    $supportedCountries  = $transfer->supportedCountries()
```

Beneficiary
-----------

[](#beneficiary)

```
    $bitnob = new Bitnob();
    $beneficiary        = $bitnob->beneficiary();
    $createBeneficiary  = $beneficiary->createBeneficiary(array $data)
    $listBeneficiaries  = $beneficiary->listBeneficiaries()
    $getBeneficiary     = $beneficiary->getBeneficiary($beneficiary_id)
```

Hosted Checkout - BTC Payment
-----------------------------

[](#hosted-checkout---btc-payment)

### Note: Amount in Bitcoin and not satoshi

[](#note--amount-in-bitcoin-and-not-satoshi)

```
    $bitnob = new Bitnob();
    $checkout = $bitnob->checkout();
    $createHostedCheckout   = $checkout->createHostedCheckout(array $data)
    $getCheckoutStatus      = $checkout->getCheckoutStatus($checkoutId)
    $getCheckouts           = $checkout->getCheckouts($param = null)
    $getCheckout            = $checkout->getCheckout($checkoutId)
```

Enroll user for card creation
-----------------------------

[](#enroll-user-for-card-creation)

```
// enroll user for card creation
$data = [
    'customerEmail'     => 'johnsmith@gmail.com',
    'idNumber'          => 'A00100010',
    'idType'            => 'PASSPORT',
    'firstName'         => 'Smith',
    'lastName'          => 'John',
    'phoneNumber'       => '08012345678',
    'city'              => 'ILORIN',
    'state'             => 'KWARA',
    'country'           => 'NIGERIA',
    'zipCode'           => '90011',
    'line1'             => 'ABC street, klotovan road',
    'houseNumber'       => 15,
    'idImage'           => 'https://example.com/image.png',
];
app('bitnob')->regUser($data);
```

Create card.
------------

[](#create-card)

NOTE: user must be firstly enrolled for this service

```
$data = [
    'customerEmail' => 'johndoe@gmail.com',
    'cardBrand'     => 'visa', // cardBrand should be "visa" or "mastercard"
    'cardType'      => 'virtual',
    'reference'     => '4f644a2c-3c4f-48c7-a3fa-e896b544d546',
    'amount'        => 5000,
];
app('bitnob')->create($data);

```

Card Topup.
-----------

[](#card-topup)

NOTE: user must be firstly enrolled for this service

```
 $arr = [
    'cardId'    => $data['cardId'],
    'reference' => $data['reference'],
    'amount'    => $data['amount'],
];
app('bitnob')->topup($arr);

```

Perform action on card
----------------------

[](#perform-action-on-card)

```
    $action = 'freeze'; // unfreeze
    $cardId = '4f644a2c-3c4f-48c7-a3fa-e896b544d546';
    app('bitnob')->action($action, $cardId);

```

Get single card
---------------

[](#get-single-card)

```
    $cardId = '4f644a2c-3c4f-48c7-a3fa-e896b544d546';
    app('bitnob')->getCard($cardId);

```

Get card getTransaction
-----------------------

[](#get-card-gettransaction)

```
    $cardId = '4f644a2c-3c4f-48c7-a3fa-e896b544d546';
    app('bitnob')->getTransaction($cardId);

```

### 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)

- [EMMANUEL TOWOJU](https://github.com/towoju5)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

Todo List
---------

[](#todo-list)

- ✅ Virtual Card
- ✅ Customers
- ✅ Payouts/Mobile Transfers
- ✅ Hosted Checkout
- ✅ Beneficiary
- ❌ Bitcoin Onchain
- ❌ Wallet
- ❌ Transactions
- ❌ StableCoins

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance47

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity44

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

Every ~46 days

Recently: every ~18 days

Total

10

Last Release

539d ago

PHP version history (2 changes)V1.0PHP ^7.2|^8.0

v1.2PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/10d0b6560e7895f8e4b30e120cc5fca9e6a6472ce741a9c54779ba6f1ac6b158?d=identicon)[Towoju5](/maintainers/Towoju5)

---

Top Contributors

[![towoju5](https://avatars.githubusercontent.com/u/40261626?v=4)](https://github.com/towoju5 "towoju5 (29 commits)")

---

Tags

towoju5bitnobvirtual cards

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/towoju5-bitnob/health.svg)

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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