PHPackages                             hopekelldev/laravel-klasha - 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. hopekelldev/laravel-klasha

ActiveLibrary[Payment Processing](/categories/payments)

hopekelldev/laravel-klasha
==========================

Laravel SDK for Klasha Payments API

v1.0.0(today)00MITPHPPHP ^8.2

Since Jun 10Pushed todayCompare

[ Source](https://github.com/HopekellDev/laravel-klasha)[ Packagist](https://packagist.org/packages/hopekelldev/laravel-klasha)[ RSS](/packages/hopekelldev-laravel-klasha/feed)WikiDiscussions main Synced today

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

Laravel Klasha
==============

[](#laravel-klasha)

[![Packagist Version](https://camo.githubusercontent.com/c94cfd11743456f56df57cc23e2cb8bd2a04d370294296b4854b8d9540d07677/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f686f70656b656c6c6465762f6c61726176656c2d6b6c61736861)](https://camo.githubusercontent.com/c94cfd11743456f56df57cc23e2cb8bd2a04d370294296b4854b8d9540d07677/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f686f70656b656c6c6465762f6c61726176656c2d6b6c61736861)[![PHP Version](https://camo.githubusercontent.com/1e3b6c1af3414be6fc25b2cea901fd667bc944d0859eabfb5cdf6d8f5a5ca27a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f686f70656b656c6c6465762f6c61726176656c2d6b6c61736861)](https://camo.githubusercontent.com/1e3b6c1af3414be6fc25b2cea901fd667bc944d0859eabfb5cdf6d8f5a5ca27a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f686f70656b656c6c6465762f6c61726176656c2d6b6c61736861)[![Laravel Version](https://camo.githubusercontent.com/93e2a73a6be4178312d2ac1dc894dab6632c2e920066fd0178100fe839695d02/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31332e782d726564)](https://camo.githubusercontent.com/93e2a73a6be4178312d2ac1dc894dab6632c2e920066fd0178100fe839695d02/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31332e782d726564)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)[![Downloads](https://camo.githubusercontent.com/889b10514f6a2413a58d7918900efbd650e5499298d5496ae5e471dd519d9626/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f686f70656b656c6c6465762f6c61726176656c2d6b6c61736861)](https://camo.githubusercontent.com/889b10514f6a2413a58d7918900efbd650e5499298d5496ae5e471dd519d9626/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f686f70656b656c6c6465762f6c61726176656c2d6b6c61736861)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/e600275bee40f4032e34f4aae9363cdec7db713645687f46c9bc0e39043a3f31/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f486f70656b656c6c4465762f6c61726176656c2d6b6c617368612f6261646765732f7175616c6974792d73636f72652e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/HopekellDev/laravel-klasha/?branch=main)[![Code Intelligence Status](https://camo.githubusercontent.com/c48b7c853bc8619b1e418b24fbdc53ac94e7ed4896cec2ec78ee357c07fd8bc0/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f486f70656b656c6c4465762f6c61726176656c2d6b6c617368612f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d61696e)](https://scrutinizer-ci.com/code-intelligence)[![Build Status](https://camo.githubusercontent.com/b7fe7688c0616f2746cbed7e5c675375b5b7c531c749e426b6351059d94d4690/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f486f70656b656c6c4465762f6c61726176656c2d6b6c617368612f6261646765732f6275696c642e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/HopekellDev/laravel-klasha/build-status/main)

---

[![Laravel Klasha Banner](https://raw.githubusercontent.com/HopekellDev/laravel-klasha/main/assets/banner.png)](https://raw.githubusercontent.com/HopekellDev/laravel-klasha/main/assets/banner.png)

A modern Laravel SDK for integrating with the Klasha Payments API.

Accept payments, create virtual accounts, manage transfers, verify transactions, fund wallets, and access Klasha financial services directly from your Laravel applications.

Laravel Klasha is a modern Laravel SDK that provides a clean and fluent interface for interacting with the Klasha API.

Accept payments, create virtual accounts, manage transfers, verify transactions, fund wallets, retrieve exchange rates, and access Klasha services directly from your Laravel applications.

---

Features
--------

[](#features)

- Laravel Auto Discovery
- Facade Support
- Service Container Binding
- Fluent API Interface
- Virtual Accounts
- Payments
- Transfers
- Wallet Funding
- Transaction Verification
- Customer Payments
- Mobile Money
- Exchange Rates
- Bank Listings
- Country Listings
- Currency Listings
- Laravel 11, 12 &amp; 13 Support

---

Requirements
------------

[](#requirements)

RequirementVersionPHP8.2+Laravel11+---

Installation
============

[](#installation)

Install via Composer:

```
composer require hopekelldev/laravel-klasha
```

---

Publish Configuration
=====================

[](#publish-configuration)

```
php artisan vendor:publish --tag=klasha-config
```

This publishes:

```
config/klasha.php

```

---

Environment Configuration
=========================

[](#environment-configuration)

Add the following values to your `.env` file:

```
KLASHA_PUBLIC_KEY=
KLASHA_SECRET_KEY=
KLASHA_ENCRYPTION_KEY=
KLASHA_BASE_URL=https://api.klasha.com
```

---

Configuration
=============

[](#configuration)

```
return [

    'public_key' => env('KLASHA_PUBLIC_KEY'),

    'secret_key' => env('KLASHA_SECRET_KEY'),

    'encryption_key' => env('KLASHA_ENCRYPTION_KEY'),

    'base_url' => env(
        'KLASHA_BASE_URL',
        'https://api.klasha.com'
    ),

];
```

---

Quick Start
===========

[](#quick-start)

Using The Facade
----------------

[](#using-the-facade)

```
use HopekellDev\Klasha\Facades\Klasha;
```

Example:

```
$response = Klasha::payments()
    ->transactions();
```

---

Dependency Injection
--------------------

[](#dependency-injection)

```
use HopekellDev\Klasha\KlashaManager;

class PaymentController
{
    public function index(KlashaManager $klasha)
    {
        return $klasha->payments()
            ->transactions();
    }
}
```

---

Available Services
==================

[](#available-services)

```
Klasha::payments();

Klasha::transfers();

Klasha::bankAccounts();

Klasha::misc();
```

---

Payments API
============

[](#payments-api)

Access payment services:

```
Klasha::payments();
```

---

Initialize Payment
------------------

[](#initialize-payment)

Create a payment request.

```
$response = Klasha::payments()
    ->initialize([
        'amount' => 10000,
        'currency' => 'NGN',
        'email' => 'customer@example.com',
        'tx_ref' => uniqid(),
        'redirect_url' => route('payment.callback'),
    ]);
```

---

Verify Transaction
------------------

[](#verify-transaction)

```
$response = Klasha::payments()
    ->verify('TRANSACTION_REFERENCE');
```

---

Fetch Transaction
-----------------

[](#fetch-transaction)

```
$response = Klasha::payments()
    ->fetch('TRANSACTION_ID');
```

---

List Transactions
-----------------

[](#list-transactions)

```
$response = Klasha::payments()
    ->transactions();
```

---

Refund Transaction
------------------

[](#refund-transaction)

```
$response = Klasha::payments()
    ->refund([
        'transaction_id' => '123456'
    ]);
```

---

Wallet Funding
==============

[](#wallet-funding)

Generate card BINs for wallet funding.

```
$response = Klasha::payments()
    ->generateBin('BUSINESS_ID');
```

---

Mobile Money
============

[](#mobile-money)

Initiate mobile money payments.

```
$response = Klasha::payments()
    ->mobileMoney([
        'amount' => 500,
        'currency' => 'GHS',
        'phone_number' => '233XXXXXXXXX',
        'network' => 'MTN'
    ]);
```

---

Transfers API
=============

[](#transfers-api)

Access transfer services:

```
Klasha::transfers();
```

---

Create Transfer Recipient
-------------------------

[](#create-transfer-recipient)

```
$response = Klasha::transfers()
    ->createRecipient([
        'bank_code' => '058',
        'account_number' => '0123456789',
        'account_name' => 'John Doe'
    ]);
```

---

Initiate Transfer
-----------------

[](#initiate-transfer)

```
$response = Klasha::transfers()
    ->initiate([
        'amount' => 10000,
        'currency' => 'NGN',
        'recipient_id' => 'RECIPIENT_ID',
        'reference' => uniqid()
    ]);
```

---

Verify Transfer
---------------

[](#verify-transfer)

```
$response = Klasha::transfers()
    ->verify('TRANSFER_REFERENCE');
```

---

Fetch Transfer
--------------

[](#fetch-transfer)

```
$response = Klasha::transfers()
    ->fetch('TRANSFER_ID');
```

---

List Transfers
--------------

[](#list-transfers)

```
$response = Klasha::transfers()
    ->all();
```

---

Virtual Accounts API
====================

[](#virtual-accounts-api)

Access virtual account services:

```
Klasha::bankAccounts();
```

---

Create Virtual Account
----------------------

[](#create-virtual-account)

Klasha requires encrypted payloads.

```
$response = Klasha::bankAccounts()
    ->createVirtualAccount([
        'first_name' => 'John',
        'last_name' => 'Doe',
        'email' => 'john@example.com',
        'currency' => 'NGN'
    ]);
```

---

Get Virtual Account
-------------------

[](#get-virtual-account)

```
$response = Klasha::bankAccounts()
    ->getVirtualAccount('ACCOUNT_ID');
```

---

List Virtual Accounts
---------------------

[](#list-virtual-accounts)

```
$response = Klasha::bankAccounts()
    ->virtualAccounts();
```

---

Disable Virtual Account
-----------------------

[](#disable-virtual-account)

```
$response = Klasha::bankAccounts()
    ->disableVirtualAccount('ACCOUNT_ID');
```

---

Utility APIs
============

[](#utility-apis)

Access miscellaneous Klasha services.

```
Klasha::misc();
```

---

Banks
-----

[](#banks)

Retrieve supported banks.

```
$response = Klasha::misc()
    ->banks();
```

---

Countries
---------

[](#countries)

Retrieve supported countries.

```
$response = Klasha::misc()
    ->countries();
```

---

Currencies
----------

[](#currencies)

Retrieve supported currencies.

```
$response = Klasha::misc()
    ->currencies();
```

---

Exchange Rates
--------------

[](#exchange-rates)

```
$response = Klasha::misc()
    ->exchangeRate([
        'source_currency' => 'USD',
        'destination_currency' => 'NGN',
        'amount' => 100
    ]);
```

---

Health Check
------------

[](#health-check)

```
$response = Klasha::misc()
    ->health();
```

---

Response Format
===============

[](#response-format)

Successful response:

```
[
    'success' => true,
    'message' => 'Request successful',
    'data' => [
        //
    ],
]
```

Error response:

```
[
    'success' => false,
    'message' => 'Invalid API Key',
    'data' => null,
]
```

---

Error Handling
==============

[](#error-handling)

```
try {

    $response = Klasha::payments()
        ->initialize($payload);

} catch (\Throwable $exception) {

    report($exception);

    return response()->json([
        'message' => $exception->getMessage()
    ], 500);

}
```

---

Service Container
=================

[](#service-container)

Resolve the SDK from Laravel's service container:

```
app('klasha');
```

or

```
app(
    \HopekellDev\Klasha\KlashaManager::class
);
```

---

Testing
=======

[](#testing)

Run tests:

```
composer test
```

---

Changelog
=========

[](#changelog)

v1.0.0
------

[](#v100)

- Initial Release
- Payments API
- Transfers API
- Virtual Accounts API
- Wallet Funding
- Utility APIs
- Laravel Auto Discovery
- Facade Support

---

Security
========

[](#security)

If you discover any security vulnerability, please send an email to:

```
hopekelltech@gmail.com

```

All security vulnerabilities will be addressed promptly.

---

Contributing
============

[](#contributing)

Contributions are welcome.

### Fork Repository

[](#fork-repository)

```
git clone https://github.com/HopekellDev/laravel-klasha.git
```

### Create Branch

[](#create-branch)

```
git checkout -b feature/my-feature
```

### Commit Changes

[](#commit-changes)

```
git commit -m "Add my feature"
```

### Push Changes

[](#push-changes)

```
git push origin feature/my-feature
```

### Open Pull Request

[](#open-pull-request)

Submit a pull request describing your changes.

---

License
=======

[](#license)

MIT License

Copyright (c) 2026 HopekellDev

---

Author
======

[](#author)

**HopekellDev**

Website:

Email:

GitHub:

Packagist:

---

Made with ❤️ for the Laravel Community.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

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

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/46373141?v=4)[Ezenwa Hopekell](/maintainers/HopekellDev)[@HopekellDev](https://github.com/HopekellDev)

---

Top Contributors

[![HopekellDev](https://avatars.githubusercontent.com/u/46373141?v=4)](https://github.com/HopekellDev "HopekellDev (3 commits)")

---

Tags

laravelpaymentsalipaywechatfintechpayoutsafricavirtual-accountklasha

### Embed Badge

![Health badge](/badges/hopekelldev-laravel-klasha/health.svg)

```
[![Health](https://phpackages.com/badges/hopekelldev-laravel-klasha/health.svg)](https://phpackages.com/packages/hopekelldev-laravel-klasha)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)

PHPackages © 2026

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