PHPackages                             mam-laka/payment-sdk - 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. mam-laka/payment-sdk

ActiveLibrary[Payment Processing](/categories/payments)

mam-laka/payment-sdk
====================

A PHP SDK for processing payments with Mamlaka.

1.0.0(1y ago)01MITPHPPHP &gt;=7.4

Since Jan 12Pushed 1y agoCompare

[ Source](https://github.com/Mamlaka-Hub-and-Spoke/PHP-SDK)[ Packagist](https://packagist.org/packages/mam-laka/payment-sdk)[ RSS](/packages/mam-laka-payment-sdk/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (3)Used By (0)

Mamlaka SDK
===========

[](#mamlaka-sdk)

Mamlaka SDK is a PHP library for integrating with the Mamlaka API.

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

[](#installation)

Install using Composer:

```
composer require mama-laka/payment-sdk
```

Usage
-----

[](#usage)

### 1. Set up the MamlakaAPI object and authenticate

[](#1-set-up-the-mamlakaapi-object-and-authenticate)

```
$api = new MamlakaAPI('production');
$response1 = $api->getToken('username', 'password');
if(!$response1['error']){
    $response = $api->initiateMobilePayment(
        'merchantid',
        'KES',
        1.0,
        '254768899729',
        'M-Pesa',
        'externalId3',
        'https://b8ca-217-21-116-242.ngrok-free.app'
    );
    print_r($response);
} else {
    echo "Authentication failed
";
}
```

### 3. Example API Methods

[](#3-example-api-methods)

#### 3.1. `getToken`

[](#31-gettoken)

Authenticate and get the token:

```
$response = $api->getToken('username', 'password');
```

#### 3.2. `initiateMobilePayment`

[](#32-initiatemobilepayment)

Initiate a mobile payment:

```
$response = $api->initiateMobilePayment(
    'merchantid',
    'KES',
    1.0,
    '254768899729',
    'M-Pesa',
    'externalId',
    'https://b8ca-217-21-116-242.ngrok-free.app'
);
```

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

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

Unknown

Total

1

Last Release

538d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/189969807?v=4)[hashcript](/maintainers/hashcript)[@hashcript](https://github.com/hashcript)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mam-laka-payment-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/mam-laka-payment-sdk/health.svg)](https://phpackages.com/packages/mam-laka-payment-sdk)
```

###  Alternatives

[aws/aws-sdk-php

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

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

The PHP Agentic Framework.

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

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[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.4k15](/packages/tempest-framework)[imdhemy/google-play-billing

Google Play Billing

491.5M5](/packages/imdhemy-google-play-billing)

PHPackages © 2026

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