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

ActiveLibrary[API Development](/categories/api)

kulmipay/kulmipay-php
=====================

PHP SDK for the KulmiPay API

00PHP

Since May 28Pushed 1mo agoCompare

[ Source](https://github.com/kulmidigital/kulmipay-php-sdk)[ Packagist](https://packagist.org/packages/kulmipay/kulmipay-php)[ RSS](/packages/kulmipay-kulmipay-php/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

KulmiPay PHP SDK
================

[](#kulmipay-php-sdk)

PHP SDK for the KulmiPay API. Use it to create checkout sessions, collect M-Pesa and PesaLink payments, send money, manage wallets, and create or retrieve refunds.

Install
-------

[](#install)

```
composer require kulmipay/kulmipay-php
```

Configure
---------

[](#configure)

```
use KulmiPay\KulmiPayPHP\Collection;

$credentials = [
    'token' => 'ISSecretKey_live_xxxxxxxxxxxxxxxx',
    'publishable_key' => 'ISPubKey_live_xxxxxxxxxxxxxxxx',
];

$collection = new Collection();
$collection->init($credentials);
```

For sandbox:

```
$credentials = [
    'token' => 'ISSecretKey_test_xxxxxxxxxxxxxxxx',
    'publishable_key' => 'ISPubKey_test_xxxxxxxxxxxxxxxx',
    'sandbox' => true,
];
```

For self-hosted deployments:

```
$credentials = [
    'token' => 'YOUR_SECRET_KEY',
    'publishable_key' => 'YOUR_PUBLIC_KEY',
    'base_url' => 'https://payments.example.com/api/v1',
];
```

Checkout
--------

[](#checkout)

```
use KulmiPay\KulmiPayPHP\Checkout;
use KulmiPay\KulmiPayPHP\Customer;

$customer = new Customer();
$customer->first_name = 'Jane';
$customer->last_name = 'Doe';
$customer->email = 'jane@example.com';
$customer->phone_number = '254712345678';

$checkout = new Checkout();
$checkout->init($credentials);

$response = $checkout->create(
    1500,
    'KES',
    $customer,
    null,
    'https://merchant.example/thank-you',
    'ORDER-1001',
    null,
    null,
    'BUSINESS-PAYS',
    'BUSINESS-PAYS',
    null,
    true
);

echo $response->url;
```

M-Pesa STK Push
---------------

[](#m-pesa-stk-push)

```
use KulmiPay\KulmiPayPHP\Collection;

$collection = new Collection();
$collection->init($credentials);

$response = $collection->mpesa_stk_push(
    '1500.00',
    '254712345678',
    'ORDER-1001'
);

echo $response->invoice->invoice_id;
```

PesaLink Collection
-------------------

[](#pesalink-collection)

```
$response = $collection->pesalink(
    '5000.00',
    'KES',
    'ORDER-BANK-1001',
    [
        'email' => 'customer@example.com',
        'first_name' => 'Jane',
        'last_name' => 'Doe',
    ]
);
```

Payment Status
--------------

[](#payment-status)

```
$response = $collection->status('GQ7KZ2XPNM');
```

Send Money
----------

[](#send-money)

```
use KulmiPay\KulmiPayPHP\Transfer;

$transfer = new Transfer();
$transfer->init($credentials);

$transactions = [
    [
        'name' => 'Jane Doe',
        'account' => '254712345678',
        'amount' => '1000',
        'narrative' => 'Refund',
        'idempotency_key' => 'refund-1001',
    ],
];

$response = $transfer->mpesa('KES', $transactions, 'YES');
$status = $transfer->status($response->tracking_id);
```

Supported helpers:

MethodProvider`$transfer->mpesa(...)``MPESA-B2C``$transfer->mpesa_b2b(...)``MPESA-B2B``$transfer->bank(...)``PESALINK``$transfer->p2p(...)``P2P`Wallets
-------

[](#wallets)

```
use KulmiPay\KulmiPayPHP\Wallet;

$wallet = new Wallet();
$wallet->init($credentials);

$wallets = $wallet->retrieve();

$created = $wallet->create('KES', 'Payroll Wallet', true);

$transactions = $wallet->transactions($created->wallet_id);
```

Refunds
-------

[](#refunds)

Refunds use the chargebacks API internally.

```
use KulmiPay\KulmiPayPHP\Refunds;

$refunds = new Refunds();
$refunds->init($credentials);

$refund = $refunds->create(
    'GQ7KZ2XPNM',
    '1500.00',
    'Duplicate payment'
);

$allRefunds = $refunds->retrieve();
$oneRefund = $refunds->details($refund->chargeback_id);
```

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance59

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/184629387?v=4)[Kulmi Digital Agency](/maintainers/kulmidigital)[@kulmidigital](https://github.com/kulmidigital)

---

Top Contributors

[![kelvinguchu](https://avatars.githubusercontent.com/u/107367551?v=4)](https://github.com/kelvinguchu "kelvinguchu (1 commits)")

### Embed Badge

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

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k18](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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