PHPackages                             kiplingkelvin/chpter-laravel-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. kiplingkelvin/chpter-laravel-sdk

ActiveLibrary[Payment Processing](/categories/payments)

kiplingkelvin/chpter-laravel-sdk
================================

chpter.co PHP SDK for easy Payments and Payouts Integration

v1.0.8(2y ago)046MITPHPPHP &gt;=7.2

Since Nov 14Pushed 2y ago2 watchersCompare

[ Source](https://github.com/kiplingkelvin/ChpterLaravelSdk)[ Packagist](https://packagist.org/packages/kiplingkelvin/chpter-laravel-sdk)[ RSS](/packages/kiplingkelvin-chpter-laravel-sdk/feed)WikiDiscussions master Synced 1mo ago

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

[![Laravel Logo](https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg)](https://laravel.com)

Chpter Laravel SDK
==================

[](#chpter-laravel-sdk)

[![Scrutinizer build (GitHub/Bitbucket)](https://camo.githubusercontent.com/aaa19b81d8e75bf70189426e272945950c95166121a6a7c35c0c400d5f2ba715/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f6275696c642f672f6b69706c696e676b656c76696e2f4368707465724c61726176656c53646b3f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/kiplingkelvin/ChpterLaravelSdk/)[![Packagist Version](https://camo.githubusercontent.com/67b5f008c7aa55acbabcaa3853c3770d6f6dbe31e4f37c17f01eea02f52f138b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b69706c696e676b656c76696e2f6368707465722d6c61726176656c2d73646b3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kiplingkelvin/chpter-laravel-sdk)[![Packagist Downloads](https://camo.githubusercontent.com/173ecbad72adffefcccdcaf9e6e1b3c94a3bdf840451adc8a243db112181dc75/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b69706c696e676b656c76696e2f6368707465722d6c61726176656c2d73646b3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kiplingkelvin/chpter-laravel-sdk)[![Scrutinizer code quality (GitHub/Bitbucket)](https://camo.githubusercontent.com/a8c7096cbdbe5e247c5f272d326d60fbc5ed9dd44c8c976a7e6a58626f6b8672/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f6b69706c696e676b656c76696e2f4368707465724c61726176656c53646b3f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/kiplingkelvin/ChpterLaravelSdk/)[![GitHub issues](https://camo.githubusercontent.com/2e28f1619c5814f951a1bb0ccf0cf0f34404c7544ebd39c25c0477ac1a23ed3e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6b69706c696e676b656c76696e2f4368707465724c61726176656c53646b3f7374796c653d666c61742d737175617265)](https://github.com/kiplingkelvin/ChpterLaravelSdk)[![GitHub](https://camo.githubusercontent.com/83ea8e9e922ab2bd40f70336e348cfe540a3c3b3598fd8c124a2e8616ee151fb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6b69706c696e676b656c76696e2f4368707465724c61726176656c53646b3f7374796c653d666c61742d737175617265)](https://github.dev/kiplingkelvin/ChpterLaravelSdk)

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

[](#installation)

Install via composer

```
composer require kiplingkelvin/chpter-laravel-sdk
```

Run vendor:publish command inside your laravel project

```
php artisan vendor:publish --provider="KiplingKelvin\ChpterLaravelSdk\ChpterServiceProvider"
```

After publishing you will find config/chpter.php config file. You can now adjust the configurations appropriately. Additionally, add the configurations to your env for security purposes.

Add the following files to your .env

```
CLIENT_DOMAIN=
CHPTER_TOKEN=

eg.

CLIENT_DOMAIN=chpter.co
CHPTER_TOKEN=chpter_pk_2b4037c1c8
```

Usage
-----

[](#usage)

Payments
--------

[](#payments)

### Mpesa Payment with STK Push

[](#mpesa-payment-with-stk-push)

```
        $chpter= new \KiplingKelvin\ChpterLaravelSdk\Chpter();

        $customer = array(
            "payment_method"=> "MPesa",
            "full_name"=> "John Doe",
            "location"=> "Nairobi",
            "phone_number"=> "254700123123",
            "email"=> "johndoe@mail.com"  );

        $products = array(  array(
                "product_id"=> "08",
                "product_name"=> "HoodEez",
                "quantity"=> "1",
                "unit_price"=> "1" ));

        $amount = array(
                "delivery_fee"=> "0",
                "discount_fee"=> "0",
                "total"=> "1",
                "currency"=> "kes");

        $callback_details = array(
                "transaction_reference"=>  "123456789123",
                "callback_url"=>  "https://df02-197-232-140-206.in.ngrok.io/api/chpter_mpesa_payment_callback_url" );

        $response = $chpter->mpesaPayment($customer, $products, $amount, $callback_details);

        //Response Is in json
        return $response;
```

### Redirect Payment (Hosted session)

[](#redirect-payment-hosted-session)

```
        $chpter= new \KiplingKelvin\ChpterLaravelSdk\Chpter();

        $customer = array(
            "full_name"=> "John Doe",
            "location"=> "Nairobi",
            "phone_number"=> "254706347307",
            "email"=> "johndoe@mail.com"  );

        $products = array(  array(
                "product_name"=> "HoodEez",
                "quantity"=> "1",
                "unit_price"=> "1" ));

        $amount = array(
                 "order_id"=> "859",
                "delivery_fee"=> 0,
                "discount_fee"=> 0,
                "total"=> 500,
                "currency"=> "kes");

        $callback_details = array(
                "success_url" => "https://www.url.com",
                "failed_url" => "https://www.url.com",
                "callback_url" => "https://yourcallback.com/url"
        )

        Log::info('********Starting Redirect Api Request**********');
        $response = $chpter->hostedRedirectPayment($customer, $amount, $callback_details);

        //The response is in json
        Log::alert('Chpter Redirect API Response');
        return $response;
```

Payouts
-------

[](#payouts)

### Creating Mobile Payout Destination

[](#creating-mobile-payout-destination)

```
        $chpter= new \KiplingKelvin\ChpterLaravelSdk\Chpter();

        $type = "Mpesa";
        $phoneNumber = "254700000000";

        Log::info('********Starting Api Request**********');
        $response = $chpter->createMobilePayoutDestination($type, $phoneNumber);
        //The response is in json
        Log::alert('Chpter API Response');
        return $response;
```

### Creating Bank Payout Destination

[](#creating-bank-payout-destination)

```
        $chpter= new \KiplingKelvin\ChpterLaravelSdk\Chpter();

        $bankName = "KCB";
        $bankAccountName = "ALBERT CHELA";
        $bankAccountNumber = "123451267";

        Log::info('********Starting Api Request**********');
        $response = $chpter->createBankPayoutDestination($bankName, $bankAccountName, $bankAccountNumber);
        //The response is in json
        Log::alert('Chpter API Response');
        return $response;
```

Resources
---------

[](#resources)

- [Laravel Chpter Implementation Sample Project](https://github.com/kiplingkelvin/chpter-laravel-sample)

Author
------

[](#author)

[@kiplingkelvin](https://www.github.com/kiplingkelvin)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 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 ~27 days

Recently: every ~0 days

Total

9

Last Release

1055d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/557ae326ae43f1c3c0e296cd94f645eaa34217ba7b4a86c956d29b398e17d6eb?d=identicon)[kiplingkelvin](/maintainers/kiplingkelvin)

---

Top Contributors

[![kiplingkelvin](https://avatars.githubusercontent.com/u/54105474?v=4)](https://github.com/kiplingkelvin "kiplingkelvin (17 commits)")

---

Tags

cardcomposer-packagelaravelmpesapayment-gatewayphpsdk-php

### Embed Badge

![Health badge](/badges/kiplingkelvin-chpter-laravel-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/kiplingkelvin-chpter-laravel-sdk/health.svg)](https://phpackages.com/packages/kiplingkelvin-chpter-laravel-sdk)
```

###  Alternatives

[chargebee/chargebee-php

ChargeBee API client implementation for PHP

768.0M9](/packages/chargebee-chargebee-php)[imdhemy/google-play-billing

Google Play Billing

491.3M5](/packages/imdhemy-google-play-billing)[bitpay/sdk

Complete version of the PHP library for the new cryptographically secure BitPay API

42337.5k4](/packages/bitpay-sdk)[buckaroo/sdk

Buckaroo payment SDK

12189.1k9](/packages/buckaroo-sdk)[contica/facturador-electronico-cr

Un facturador de código libre para integrar facturación electrónica en Costa Rica a un proyecto PHP

2128.8k](/packages/contica-facturador-electronico-cr)[karson/mpesa-php-sdk

172.2k](/packages/karson-mpesa-php-sdk)

PHPackages © 2026

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