PHPackages                             akika/laravel-mwaloni - 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. akika/laravel-mwaloni

ActiveLibrary

akika/laravel-mwaloni
=====================

A single-tenant Laravel package for integrating Mpesa, Equity Jenga API's and NCBA Loop API through Mwaloni Wallet

v0.2.3(2mo ago)152MITPHPPHP &gt;=7.4

Since Mar 9Pushed 2mo ago2 watchersCompare

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

READMEChangelog (10)Dependencies (3)Versions (24)Used By (0)

Laravel Mwaloni Package by [Mwaloni Limited](https://mwaloni.com)
-----------------------------------------------------------------

[](#laravel-mwaloni-package-by-mwaloni-limited)

This Laravel package provides convenient methods for integrating [Mwaloni](https://mwaloni.com) functionalities into your Laravel application.

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

[](#installation)

You can install the package via composer:

```
composer require akika/laravel-mwaloni
```

After installing the package, publish the configuration file using the following command:

```
php artisan mwaloni:install
```

This will generate a mwaloni.php file in your config directory where you can set your Mwaloni credentials and other configuration options.

.env file Setup
---------------

[](#env-file-setup)

Add the following configurations into the .env file

```
MWALONI_ENV= # sandbox|production
MWALONI_DEBUG= # true|false
MWALONI_URL_SANDBOX= # Can be added for local tests
```

NOTE:

- The mwaloni.php config file sets the default `MWALONI_ENV` value to `sandbox`. This will always load sandbox url and credentials.
- It also sets the default debug mode to true. When true, the package will log into the log destination provided
- The other variables except `MWALONI_ENV` and `MWALONI_DEBUG` will be provided by Mwaloni during onboarding.
- When debug mode is set to true, Mwaloni will log both data object and result on every API call

Function Responses
------------------

[](#function-responses)

All responses, will be in json format as received from the Mwaloni portal.

### Sample failed response

[](#sample-failed-response)

```
{
   "status":"01",
   "message":"Service not found",
}
```

### Sample successful transaction response

[](#sample-successful-transaction-response)

```
{
   "status":"00",
   "message":"Cashout was successful."
}
```

Usage
-----

[](#usage)

### Initializing Mwaloni

[](#initializing-mwaloni)

To initialize Mwaloni, paste the following code within your code.

```
use Akika\LaravelMwaloni\Mwaloni; // Paste before class definition

/**
 *
   * Initialize the Mwaloni class using credentials provided
   *
   * @param string $serviceId
   * @param string $username
   * @param string $password
   * @param string $apiKey
   */

$mwaloni = new Mwaloni($serviceId, $username, $password, $apiKey); // Paste code where appropriate in your code.
```

### Authentication

[](#authentication)

Authentication si required in order to consume Mwaloni APIs. The function below will perform authentication.

```
$response = $mwaloni->authenticate();
```

#### Authentication result

[](#authentication-result)

```
{
   "status":"00",
   "message":"Success",
   "data":{
      "token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.xxxx.xxxxxx",
      "tokenType":"Bearer",
      "expiresIn":3600
   }
}
```

- A generated token can be used for up to 60 minutes.

#### Setting token

[](#setting-token)

- On successful authentication, use the following function to set up the toke for use on subsequent calls.

```
/**
 *
   * Set the API token
   *
   * @param string $token
   */

$response = $mwaloni->setToken($token); // $data->token
```

### Query account balance

[](#query-account-balance)

```
$response = $mwaloni->fetchBalance();
```

A successful balance query response will have the below structure:

```
{
   "status":"00",
   "message":"Success",
   "balance":3250544,
   "balanceBreakdown":{
      "utilityBalance":3250544,
      "workingBalance":0
   }
}
```

### Send money to mpesa enabled lines

[](#send-money-to-mpesa-enabled-lines)

```
/**
 *
   * Send money to a mobile number
   *
   * @param string $orderNumber - The order number
   * @param string $phoneNumber - The phone number
   * @param float $amount - The amount to send
   * @param string $description - The description of the transaction
   *
   * @return mixed
   */

$response = $mwaloni->mobile($orderNumber, $phoneNumber, $amount, $description);
```

### Send to mpesa till number

[](#send-to-mpesa-till-number)

```
/**
   *
   * Send money to a till number
   *
   * @param string $orderNumber - The order number
   * @param string $accountName - The name of the account holder
   * @param string $accountNumber - The till number
   * @param float $amount - The amount to send
   * @param string $description - The description of the transaction
   *
   * @return mixed
   */

$response = $mwaloni->till($orderNumber, $accountName, $accountNumber, $amount, $description);
```

### Send to mpesa paybill

[](#send-to-mpesa-paybill)

```
/**
   *
   * Send money to a paybill number
   *
   * @param string $accountReference - The account reference
   * @param string $orderNumber - The order number
   * @param string $accountName - The name of the account holder
   * @param string $accountNumber - The paybill number
   * @param float $amount - The amount to send
   * @param string $description - The description of the transaction
   *
   * @return mixed
   */

$response = $mwaloni->paybill($accountReference, $orderNumber, $accountName, $accountNumber, $amount, $description);
```

### Send to bank via ift

[](#send-to-bank-via-ift)

```
/**
 *
   * Send money to a bank account through ift
   *
   * @param string $orderNumber - The order number
   * @param string $accountName - The name of the account holder
   * @param string $accountNumber - The account number
   * @param string $address - The address of the account holder
   * @param string $countryCode - The country code
   * @param float $amount - The amount to send
   * @param string $currencyCode - The currency code
   * @param string $description - The description of the transaction
   *
   * @return mixed
   */

$response = $mwaloni->ift($orderNumber, $accountName, $accountNumber, $address, $countryCode, $amount, $currencyCode, $description);
```

### Send to bank via eft

[](#send-to-bank-via-eft)

```
/**
 *
   * Send money to a bank account through eft
   *
   * @param string $orderNumber - The order number
   * @param string $accountNumber - The account number
   * @param string $accountName - The name of the account holder
   * @param string $bankCode - The bank code
   * @param string $bankName - The name of the bank
   * @param string $bankCountryCode - The country code of the bank
   * @param string $bankCIF - The CIF/Swift Code of the bank
   * @param string $accountAddress - The address of the account holder
   * @param float $amount - The amount to send
   * @param string $currencyCode - The currency code
   * @param string $description - The description of the transaction
   *
   * @return mixed
   */

$response = $mwaloni->eft($orderNumber, $accountNumber, $accountName, $bankCode, $bankName, $bankCountryCode, $bankCIF, $accountAddress, $amount, $currencyCode, $description);
```

### Send to bank via pesalink

[](#send-to-bank-via-pesalink)

```
/**
   *
   * Send money to a bank account through pesalink
   *
   * @param string $orderNumber - The order number
   * @param string $accountNumber - The account number
   * @param string $accountName - The name of the account holder
   * @param string $bankName - The name of the bank
   * @param string $bankCountryCode - The country code of the bank
   * @param string $bankCIF - The CIF/Swift Code of the bank
   * @param float $amount - The amount to send
   * @param string $currencyCode - The currency code
   * @param string $description - The description of the transaction
   *
   * @return mixed
*/

$response = $mwaloni->pesalink($orderNumber, $accountNumber, $accountName, $bankName, $bankCountryCode, $bankCIF, $amount, $currencyCode, $description);
```

### Send to bank via rtgs

[](#send-to-bank-via-rtgs)

```
/**
   *
   * Send money to a bank account through rtgs
   *
   * @param string $orderNumber - The order number
   * @param string $accountNumber - The account number
   * @param string $accountName - The name of the account holder
   * @param string $bankName - The name of the bank
   * @param string $swiftCode - The swift code of the bank
   * @param string $address - The address of the account holder
   * @param string $bankCountryCode - The country code of the bank
   * @param float $amount - The amount to send
   * @param string $currencyCode - The currency code
   * @param string $description - The description of the transaction
   *
   * @return mixed
*/

$response = $mwaloni->rtgs($orderNumber, $accountNumber, $accountName, $bankName, $swiftCode, $address, $bankCountryCode, $amount, $currencyCode, $description);
```

### Send via Stanbic

[](#send-via-stanbic)

```
/**
 * Send money to a Stanbic bank account
   *
   * @param string $orderNumber - The order number
   * @param string $bankName - The name of the bank
   * @param string $accountNumber - The account number
   * @param string $accountName - The name of the account holder
   * @param string $bankCode - The bank code
   * @param float $amount - The amount to send
   * @param string $description - The description of the transaction
   */
$response = $mwaloni->sendStanbic($orderNumber, $bankName, $accountNumber, $accountName, $bankCode, $amount, $description)
```

### Send via MoMo

[](#send-via-momo)

```
/**
     * Send money via MTN Mobile Money
     *
     * @param string $orderNumber
     * @param string $accountNumber
     * @param float $amount
     * @param string $description
     * @return mixed
     */
$response = $mwaloni->sendMomo($orderNumber, $accountNumber, $amount, $description);
```

### Query transaction status

[](#query-transaction-status)

```
/**
 *
   * Fetch the status of a transaction
   *
   * @param string $orderNumber
   *
   * @return mixed
   */
$response = $mwaloni->getStatus($orderNumber);
```

### KPLC Postpaid

[](#kplc-postpaid)

```
/**
 *
   * Send money to a KPLC postpaid account
   *
   * @param string $meterNumber - The meter number
   * @param string $accountNumber - The account number
   * @param string $msisdn - The phone number attached to the account
   * @param float $amount - The amount to send
   *
   * @return mixed
   */

$response = $mwaloni->kplcPostpaid($meterNumber, $accountNumber, $msisdn, $amount);
```

### Perform contact lookup

[](#perform-contact-lookup)

```
/**
 *
   * Fetch the status of a transaction
   *
   * @param string $orderNumber
   *
   * @return mixed
   */
$response = $mwaloni->contactLookup($contact);
```

### Send SMS

[](#send-sms)

```
/**
 *
   * Send an SMS
   *
   * @param string $phone
   * @param string $message
   *
   * @return mixed
   */

$response = $mwaloni->sendSms($phone, $message);
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance85

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity37

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

Every ~16 days

Recently: every ~0 days

Total

23

Last Release

77d ago

PHP version history (2 changes)v0.0.1PHP ^8.0|^8.1|^8.2

v0.0.4PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b9d9e3a6ef73a3692c261d49a7a70d0362c5e83fa9a4e8765eb9309173b59b3?d=identicon)[akika.digital](/maintainers/akika.digital)

---

Top Contributors

[![fenicfelix](https://avatars.githubusercontent.com/u/7171039?v=4)](https://github.com/fenicfelix "fenicfelix (44 commits)")

---

Tags

equityequity-bankjengajenga-apiloopmpesampesa-apimtnmtnmomoncbalaravelloopwalletmpesaAkikadigitalequity bankjengancbamwaloni

### Embed Badge

![Health badge](/badges/akika-laravel-mwaloni/health.svg)

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

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k96.9M674](/packages/laravel-socialite)[tzsk/sms

A robust and unified SMS gateway integration package for Laravel, supporting multiple providers.

320244.3k6](/packages/tzsk-sms)[torchlight/torchlight-laravel

A Laravel Client for Torchlight, the syntax highlighting API.

120452.8k11](/packages/torchlight-torchlight-laravel)[iankumu/mpesa

A package that helps integrate the Mpesa APIs to your Laravel Project

5014.7k](/packages/iankumu-mpesa)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

1516.7k](/packages/truckersmp-steam-socialite)

PHPackages © 2026

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