PHPackages                             hngx/moneywave-php - 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. hngx/moneywave-php

ActiveLibrary[API Development](/categories/api)

hngx/moneywave-php
==================

PHP wrapper for the Moneywave API

1.2(8y ago)133738MITPHPPHP &gt;=5.4

Since Jan 27Pushed 8y ago2 watchersCompare

[ Source](https://github.com/Hng-X/moneywave-php)[ Packagist](https://packagist.org/packages/hngx/moneywave-php)[ RSS](/packages/hngx-moneywave-php/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (1)Versions (17)Used By (0)

moneywave-php
=============

[](#moneywave-php)

[![Latest Stable Version](https://camo.githubusercontent.com/524dd4ecb219ae211014d7da17169dd67b0f3e839acb3ea1d1a4a4a834037d2f/68747470733a2f2f706f7365722e707567782e6f72672f686e67782f6d6f6e6579776176652d7068702f762f737461626c65)](https://packagist.org/packages/hngx/moneywave-php) [![Total Downloads](https://camo.githubusercontent.com/b7f0758e190c1be867d4ad02357fd9a1faae29527f6aec3a2cdf09f85ee40de8/68747470733a2f2f706f7365722e707567782e6f72672f686e67782f6d6f6e6579776176652d7068702f646f776e6c6f616473)](https://packagist.org/packages/hngx/moneywave-php) [![License](https://camo.githubusercontent.com/b6f46a14a2253b78e0a8ec74e42da50d5865276c413de2ade56bb8dcae7be599/68747470733a2f2f706f7365722e707567782e6f72672f686e67782f6d6f6e6579776176652d7068702f6c6963656e7365)](https://packagist.org/packages/hngx/moneywave-php) [![Latest Unstable Version](https://camo.githubusercontent.com/b9360c7354c4e07ffd9ac18cf61dcec980afff2bdcaf84ce8371d360ae1fd0f0/68747470733a2f2f706f7365722e707567782e6f72672f686e67782f6d6f6e6579776176652d7068702f762f756e737461626c65)](https://packagist.org/packages/hngx/moneywave-php)

PHP wrapper for the [Moneywave API](http://moneywave.flutterwave.com/api)Please consult the official documentation for more details.

Contents
--------

[](#contents)

- [Configuration](#configuration)
- [Usage: Dispatching Transactions/Resources](#usage1)
- [Usage: Handling Responses](#usage2)
- [Usage: Errors](#usage3)
- [Installation](#installation)
- [Bugs](#bugs)

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

[](#configuration)

To carry out a transaction or access a resource, you will need an instance of the moneywave client This will be used for your API calls.

```
$mw = new \HngX\Moneywave\Moneywave($yourApiKey, $yourSecretKey);
```

Usage: Dispatching Transactions/Resources
---------------------------------------------------------------------------

[](#usage-dispatching-transactionsresources)

### Performing Transactions

[](#performing-transactions)

To perform a transaction, there are 3 simple steps:

1. Create the transaction. All transactions take the moneywave client instance as a constructor argument. The `WalletToAccountTransaction` and `BulkWalletToAccountTransaction` transactions also take a second parameter: the wallet password
2. Set the appropriate details All the fields listed for each transaction in [the docs](https://moneywave.flutterwave.com/api) are available as properties on the transaction class (via magic methods), so you can set them individually. Alternatively, you could use the `setDetails()` function to set them in one go. **Caution**: be sure to use the *exact* parameter names (including capitalisation) as described at . The following fields are automatically set for you on each transaction:

FieldDefaultapiKeythe API key used when creating the `Moneywave` clientsecretthe secret key used when creating the `Moneywave` clientcurrency"NGN"lock(for `WalletToAccountTransaction` and `BulkWalletToAccountTransaction`) the wallet password supplied in the constructor3. Dispatch the transaction by calling `dispatch()`

Here is an example:

```
//we want to perform a wallet to account transfer
$tran = new \HngX\Moneywave\Transactions\WalletToAccountTransaction($mw, $walletPassword);

//set details
$tran->amount = 25000;
$tran->bankcode = \HngX\Moneywave\Bank::STERLING;
$tran->accountNumber = "000056050";
$tran->senderName = "Johnson";
$tran->ref = 40;

//then make the transaction
$tran->dispatch();

//or you could do this in a batch
$tran->setDetails(array(
  "amount" => 25000,
  "bankcode" => \HngX\Moneywave\Bank::STERLING,
  "accountNumber" => "000056050",
  "senderName" => "Johnson",
  "ref" => 40
))->dispatch();
```

#### Available Transaction Types

[](#available-transaction-types)

```
AccountToAccountTransaction
CardToAccountTransaction
CardToWalletTransaction
TotalChargeToCardTransaction
WalletToAccountTransaction
BulkWalletToAccountTransaction

```

#### Available bank codes

[](#available-bank-codes)

Here is the list of banks currently supported by the Moneywave API. Their codes are available as constants in the `\HngX\Moneywavw\Bank` class:

```
FCMB   // FIRST CITY MONUMENT BANK PLC
UNITY   // UNITY BANK PLC
STANBIC_IBTC   // STANBIC IBTC BANK PLC
STERLING   // STERLING BANK PLC
STANBIC_MOBILE   //  STANBIC Mobile PLC
PAYCOM //  PAYCOM
ECOBANK_MOBILE //  ECOBANK MOBILE
FBN_MOBILE //  FBN MOBILE
PARKWAY //  PARKWAY
GTBANK_MOBILE //  GTBank Mobile Money
ZENITH_MOBILE //  ZENITH Mobile
ACCESS_MOBILE //  ACCESS Mobile
ASO //  Aso Savings and Loans
ACCESS //  ACCESS BANK NIGERIA
AFRIBANK //  AFRIBANK NIGERIA PLC
DIAMOND //  DIAMOND BANK PLC
ECOBANK //  ECOBANK NIGERIA PLC
ENTERPRISE //  ENTERPRISE BANK LIMITED
FIDELITY //  FIDELITY BANK PLC
FIRST //  FIRST BANK PLC
GTBANK //  GTBANK PLC
HERITAGE //  HERITAGE BANK
KEYSTONE //  KEYSTONE BANK PLC
SKYE //  SKYE BANK PLC
STANDARD_CHARTERED //  STANDARD CHARTERED BANK NIGERIA LIMITED
UNION //  UNION BANK OF NIGERIA PLC
UBA //  UNITED BANK FOR AFRICA PLC
WEMA //  WEMA BANK PLC
ZENITH //  ZENITH BANK PLC

```

### Accessing a Resource

[](#accessing-a-resource)

The same 3 steps apply:

1. Create the resource. All resources take the moneywave client instance as their only constructor argument.
2. Set the appropriate details, if any. The `GetWalletBalance` do not need any extra data All the fields listed for each resource in [the docs](https://moneywave.flutterwave.com/api) are available as properties on the resource class (via magic methods), so you can set them individually. Alternatively, you could use the `setDetails()` function to set them in one go. **Caution**: be sure to use the *exact* parameter names (including capitalisation) as described at . The following fields are automatically set for you on each resource:

FieldDefaultapiKeythe API key used when creating the `Moneywave` clientsecretthe secret key used when creating the `Moneywave` client3. Dispatch the resource by calling `dispatch()`.

Here is an example:

```
//we want to check our wallet balance
$bal=new \HngX\Moneywave\Resources\GetWalletBalance($mw);
$bal->dispatch();
```

#### Available Resource Types

[](#available-resource-types)

```
GetWalletBalance
PreviousCardToAccount
PreviousWalletToAccount
RetryFailedTransaction
ValidateAccountNumber
TokenizeCard

```

Usage: Handling Responses
-----------------------------------------------------------

[](#usage-handling-responses)

After dispatching a transaction or resource, you may access the full response by calling `getResponse()` on the object.

```
$tran->getResponse();

/*
[
  "status" => "success",
  "data" => [
    ...]
  ]
*/
```

You can also find out the `status` alone by calling `getStatus()`.

```
$tran->getStatus(); // -> "success" or "error"
```

You may also call `successful()` directly to test if the `status` of the response was `success`: Caution: According to Moneywave, "success" does not neccessarily mean The transaction has gone through. Consult the official docs for more details

```
if ($tran->successful()) {
  //yay!
} else {
  print_r($tran->getResponse());
}
```

#### Validating Transactions

[](#validating-transactions)

According to the docs, the two transaction types `AccountToAccountTransaction` and `CardToAccountTransaction` may also need validation after being dispatched. To do that, simply call `validate()` on the transaction object with the appropriate data:

```
$tran = new \HngX\Moneywave\AccountToAccountTransaction($mw);
$tran->setDetails([
    "firstname" => "Donald",
    "lastname" => "Trump",
    ...
  ])
  ->dispatch();
if ($tran->successful()){
  $tran->validate([
    "transactionRef" => $tran->getResponse()["data"]["ref"],
    "authType" => "OTP",
    "authValue" => "7489",
  ]);
}
```

Note: after this, calling `getResponse()` or `getStatus()` will return the response or status for the validation process

Usage: Errors
-----------------------------------------------

[](#usage-errors)

You will get an instance of `\HngX\MoneywaveException` if you do anything naughty.

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

[](#installation)

```
composer require hngx/moneywave-php

```

Bugs
------------------------------------

[](#bugs)

If you notice any bugs, please create a new issue. We will attend to it promptly.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 72.1% 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 ~26 days

Recently: every ~78 days

Total

16

Last Release

3039d ago

Major Versions

0.9.2 → 1.0.02017-04-20

### Community

Maintainers

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

---

Top Contributors

[![shalvah](https://avatars.githubusercontent.com/u/14361073?v=4)](https://github.com/shalvah "shalvah (62 commits)")[![stephenafamo](https://avatars.githubusercontent.com/u/13472455?v=4)](https://github.com/stephenafamo "stephenafamo (19 commits)")[![iifeoluwa](https://avatars.githubusercontent.com/u/15154504?v=4)](https://github.com/iifeoluwa "iifeoluwa (4 commits)")[![amorebise](https://avatars.githubusercontent.com/u/7103976?v=4)](https://github.com/amorebise "amorebise (1 commits)")

---

Tags

bankfintechflutterwavemoneywave-apiphpfintechflutterwaveMoneywave

### Embed Badge

![Health badge](/badges/hngx-moneywave-php/health.svg)

```
[![Health](https://phpackages.com/badges/hngx-moneywave-php/health.svg)](https://phpackages.com/packages/hngx-moneywave-php)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

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

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[avalara/avataxclient

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

528.3M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

232.5k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1772.4k4](/packages/aimeos-prisma)

PHPackages © 2026

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