PHPackages                             malipo/malipo-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. [Payment Processing](/categories/payments)
4. /
5. malipo/malipo-php

ActiveLibrary[Payment Processing](/categories/payments)

malipo/malipo-php
=================

Official PHP library for the Malipo Payment Gateway

v1.0.2(4w ago)01MITPHPPHP &gt;=7.4

Since May 4Pushed 4w agoCompare

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

READMEChangelog (1)Dependencies (4)Versions (4)Used By (0)

Malipo PHP SDK
==============

[](#malipo-php-sdk)

The official PHP library for the Malipo Payment Gateway. Securely accept Mobile Money payments (Vodacom MPesa, Orange Money, Airtel Money) in the DRC.

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

[](#installation)

```
composer require malipo/malipo-php
```

Quick Start
-----------

[](#quick-start)

```
use Malipo\Malipo;

$malipo = new Malipo('sk_test_your_api_key');

// Create a charge
try {
    $charge = $malipo->charges->create([
        "amount" => 10,
        "currency" => "USD",
        "phone" => "243810000000",
        "network" => "VODACOM_MPESA",
        "description" => "Order #123"
    ], [
        'idempotencyKey' => 'unique_order_id_123'
    ]);

    echo "Charge initiated: " . $charge['id'] . "\n";
    echo "Status: " . $charge['status'] . "\n"; // 'pending'
} catch (\Malipo\Exceptions\MalipoException $e) {
    echo "Charge failed: " . $e->getMessage() . "\n";
}
```

Features
--------

[](#features)

### 🔐 Idempotency

[](#-idempotency)

Protect against duplicate charges by providing an `idempotencyKey` in the options array.

### 🔄 Environment Detection

[](#-environment-detection)

The SDK automatically switches between `sandbox` and `live` environments based on your API key prefix (`sk_test_` vs `sk_live_`).

### 📊 Balance Check

[](#-balance-check)

Check your available and pending balances for your current environment.

```
$balance = $malipo->balance->retrieve();
print_r($balance['available']);
```

Webhooks
--------

[](#webhooks)

```
use Malipo\Malipo;

$malipo = new Malipo('...');

$payload = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_WEBHOOK_SIGNATURE'];
$secret = 'whsec_your_secret';

try {
    $event = $malipo->webhooks->constructEvent($payload, $signature, $secret);

    if ($event['type'] === 'charge.succeeded') {
        $charge = $event['data']['object'];
        // Handle successful payment
    }
} catch (\Exception $e) {
    http_response_code(400);
    echo $e->getMessage();
}
```

License
-------

[](#license)

MIT

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance94

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity36

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.

###  Release Activity

Cadence

Every ~26 days

Total

3

Last Release

29d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1003942?v=4)[Patrick Bashizi](/maintainers/bashizip)[@bashizip](https://github.com/bashizip)

---

Top Contributors

[![bashizip](https://avatars.githubusercontent.com/u/1003942?v=4)](https://github.com/bashizip "bashizip (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k543.5M2.7k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k46](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

293.1k](/packages/eslazarev-wildberries-sdk)[chargebee/chargebee-php

ChargeBee API client implementation for PHP

758.5M9](/packages/chargebee-chargebee-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k16](/packages/tempest-framework)

PHPackages © 2026

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