PHPackages                             mak8tech/mobile-wallet-zm - 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. [Payment Processing](/categories/payments)
4. /
5. mak8tech/mobile-wallet-zm

ActiveLibrary[Payment Processing](/categories/payments)

mak8tech/mobile-wallet-zm
=========================

A Laravel package for mobile money payments in Zambia (MTN, Airtel, Zamtel)

1.0.0(1y ago)112[5 PRs](https://github.com/Mak8Tech/mobile-wallet-zm/pulls)MITPHPPHP ^8.2|^8.3|^8.4CI passing

Since Mar 17Pushed 1mo agoCompare

[ Source](https://github.com/Mak8Tech/mobile-wallet-zm)[ Packagist](https://packagist.org/packages/mak8tech/mobile-wallet-zm)[ Docs](https://github.com/Mak8Tech/mobile-wallet-zm)[ GitHub Sponsors](https://github.com/Mak8Tech)[ RSS](/packages/mak8tech-mobile-wallet-zm/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (15)Versions (9)Used By (0)

Mobile Wallet ZM
================

[](#mobile-wallet-zm)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f05c07f98aab4a7ebab7b9111505e3487830767095d42e8132789edf2ae66ab8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f4d616b38546563682f6d6f62696c652d77616c6c65742d7a6d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Mak8Tech/mobile-wallet-zm)[![GitHub Tests Action Status](https://camo.githubusercontent.com/99648ae72a5255033fb361807a756aeae2532d8b817a123c1cb724b484889cd1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f4d616b38546563682f6d6f62696c652d77616c6c65742d7a6d2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/Mak8Tech/mobile-wallet-zm/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/c18100ae4515f63b0343b57297988a2cf6a8e80732ad3679435212ed2a883006/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f4d616b38546563682f6d6f62696c652d77616c6c65742d7a6d2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/Mak8Tech/mobile-wallet-zm/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/8ac82639dead22cb6ca9fd225e14cc813b987976af26b2821ad1c59aa6701e6f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f4d616b38546563682f6d6f62696c652d77616c6c65742d7a6d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/Mak8Tech/mobile-wallet-zm)

A comprehensive Laravel package for integrating mobile money payment services in Zambia. This package supports MTN Mobile Money, Airtel Money, and Zamtel Kwacha, providing a unified API for all three providers.

Features
--------

[](#features)

- **Multi-provider Support**: Seamlessly integrate with MTN, Airtel, and Zamtel
- **Laravel Integration**: Works with Laravel 12+ and includes a service provider, facade, and middleware
- **Inertia.js &amp; React Components**: Ready-to-use TypeScript React components for payment forms
- **Transaction Management**: Complete lifecycle management for payment transactions
- **Webhook Handling**: Process payment notifications from all providers
- **Configuration**: Flexible configuration options for each provider

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

[](#installation)

You can install the package via composer:

```
composer require mak8tech/mobile-wallet-zm
```

After installation, run the package installation command:

```
php artisan mobile-wallet:install
```

This will publish the necessary configuration files, migrations, and frontend components.

### Manual Setup

[](#manual-setup)

You can also publish and run the migrations manually:

```
php artisan vendor:publish --tag="mobile-wallet-migrations"
php artisan migrate
```

Publish the configuration file:

```
php artisan vendor:publish --tag="mobile-wallet-config"
```

Publish the frontend components:

```
php artisan vendor:publish --tag="mobile-wallet-assets"
```

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

[](#configuration)

After publishing the configuration file, you can find it at `config/mobile_wallet.php`. You'll need to set up your API credentials for each provider:

```
return [
    // Default mobile money provider
    'default' => env('MOBILE_WALLET_PROVIDER', 'mtn'),

    // Default currency
    'currency' => env('MOBILE_WALLET_CURRENCY', 'ZMW'),

    // Default country code
    'country_code' => env('MOBILE_WALLET_COUNTRY_CODE', 'ZM'),

    // MTN MoMo Configuration
    'mtn' => [
        'base_url' => env('MTN_API_BASE_URL', 'https://sandbox.momodeveloper.mtn.com'),
        'api_key' => env('MTN_API_KEY'),
        'api_secret' => env('MTN_API_SECRET'),
        'collection_subscription_key' => env('MTN_COLLECTION_SUBSCRIPTION_KEY'),
        'disbursement_subscription_key' => env('MTN_DISBURSEMENT_SUBSCRIPTION_KEY'),
        'environment' => env('MTN_ENVIRONMENT', 'sandbox'),
    ],

    // Airtel Money Configuration
    'airtel' => [
        'base_url' => env('AIRTEL_API_BASE_URL', 'https://openapi.airtel.africa'),
        'api_key' => env('AIRTEL_API_KEY'),
        'api_secret' => env('AIRTEL_API_SECRET'),
        'environment' => env('AIRTEL_ENVIRONMENT', 'sandbox'),
    ],

    // Zamtel Kwacha Configuration
    'zamtel' => [
        'base_url' => env('ZAMTEL_API_BASE_URL', 'https://api.zamtel.com/kwacha'),
        'api_key' => env('ZAMTEL_API_KEY'),
        'api_secret' => env('ZAMTEL_API_SECRET'),
        'environment' => env('ZAMTEL_ENVIRONMENT', 'sandbox'),
    ],

    // Webhook Configuration
    'webhook' => [
        'secret' => env('MOBILE_WALLET_WEBHOOK_SECRET'),
        'url_path' => env('MOBILE_WALLET_WEBHOOK_PATH', 'api/mobile-wallet/webhook'),
    ],
];
```

Add the corresponding environment variables to your `.env` file:

```
# Mobile Wallet General Config
MOBILE_WALLET_PROVIDER=mtn
MOBILE_WALLET_CURRENCY=ZMW
MOBILE_WALLET_COUNTRY_CODE=ZM
MOBILE_WALLET_WEBHOOK_SECRET=your-webhook-secret

# MTN MoMo Config
MTN_API_BASE_URL=https://sandbox.momodeveloper.mtn.com
MTN_API_KEY=your-mtn-api-key
MTN_API_SECRET=your-mtn-api-secret
MTN_COLLECTION_SUBSCRIPTION_KEY=your-mtn-collection-key
MTN_ENVIRONMENT=sandbox

# Airtel Money Config
AIRTEL_API_BASE_URL=https://openapi.airtel.africa
AIRTEL_API_KEY=your-airtel-api-key
AIRTEL_API_SECRET=your-airtel-api-secret
AIRTEL_ENVIRONMENT=sandbox

# Zamtel Kwacha Config
ZAMTEL_API_BASE_URL=https://api.zamtel.com/kwacha
ZAMTEL_API_KEY=your-zamtel-api-key
ZAMTEL_API_SECRET=your-zamtel-api-secret
ZAMTEL_ENVIRONMENT=sandbox

```

Usage
-----

[](#usage)

### Backend Usage

[](#backend-usage)

You can use the facade to interact with the default provider:

```
use Mak8Tech\MobileWalletZm\Facades\MobileWallet;

// Request a payment
$result = MobileWallet::requestPayment(
    '0977123456',  // Phone number
    100.00,        // Amount
    'REF123',      // Reference (optional)
    'Payment for order #123' // Narration (optional)
);

// Check transaction status
$status = MobileWallet::checkTransactionStatus($transactionId);
```

To use a specific provider:

```
// Using a specific provider
$result = MobileWallet::provider('airtel')->requestPayment(
    '0977123456',
    100.00
);
```

### Frontend Usage

[](#frontend-usage)

The package includes a React component for payment forms. After publishing the assets, you can import and use the component:

```
import { PaymentForm } from "@/vendor/mobile-wallet-zm/components/payment-form";

function CheckoutPage() {
    const handleSuccess = (data) => {
        console.log("Payment initiated", data);
        // Handle successful payment initiation
    };

    const handleError = (error) => {
        console.error("Payment failed", error);
        // Handle payment error
    };

    return (

            Checkout

    );
}
```

### Handling Webhooks

[](#handling-webhooks)

The package automatically registers routes to handle webhooks from all providers. Make sure your webhook URL is properly configured in your provider dashboard:

```
https://your-app.com/api/mobile-wallet/webhook/mtn
https://your-app.com/api/mobile-wallet/webhook/airtel
https://your-app.com/api/mobile-wallet/webhook/zamtel

```

You can also use the provider-agnostic endpoint:

```
https://your-app.com/api/mobile-wallet/webhook

```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Innocent Makusa](https://github.com/makusa-the)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance72

Regular maintenance activity

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 81.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 ~5 days

Total

3

Last Release

410d ago

Major Versions

0.0.2-beta → 1.0.02025-03-28

PHP version history (3 changes)0.0.1-betaPHP ^8.3

0.0.2-betaPHP ^8.2|^8.3

1.0.0PHP ^8.2|^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/116803ec73acffc494c4cc854e7bc914891224a72eef6960ce360cd46b234470?d=identicon)[makusa-the](/maintainers/makusa-the)

---

Top Contributors

[![makusa-the](https://avatars.githubusercontent.com/u/24973307?v=4)](https://github.com/makusa-the "makusa-the (30 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")

---

Tags

laravelMak8Techmobile-wallet-zm

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/mak8tech-mobile-wallet-zm/health.svg)

```
[![Health](https://phpackages.com/badges/mak8tech-mobile-wallet-zm/health.svg)](https://phpackages.com/packages/mak8tech-mobile-wallet-zm)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[laravel/cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.

264778.4k3](/packages/laravel-cashier-paddle)[aedart/athenaeum

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

255.2k](/packages/aedart-athenaeum)[simplestats-io/laravel-client

Client for SimpleStats!

4515.5k](/packages/simplestats-io-laravel-client)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)

PHPackages © 2026

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