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

ActiveLibrary[Payment Processing](/categories/payments)

rtraselbd/bkash-php
===================

A PHP library for integrating with the bKash payment gateway

v1.0.0(2y ago)1201MITPHP

Since Oct 22Pushed 2y ago1 watchersCompare

[ Source](https://github.com/rtraselbd/bkash-php)[ Packagist](https://packagist.org/packages/rtraselbd/bkash-php)[ RSS](/packages/rtraselbd-bkash-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

bKash PHP Library
=================

[](#bkash-php-library)

The bKash PHP library is a convenient way to integrate the bKash payment gateway into your PHP applications. It provides methods for creating and verifying payments. With this library, you can offer your users a seamless and secure way to make payments using the bKash platform.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
- [License](#license)

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

[](#installation)

You can easily install the bKash PHP library via [Composer](https://getcomposer.org/):

```
composer require rtraselbd/bkash-php
```

Usage
-----

[](#usage)

To get started with the bKash PHP library, follow these steps:

1. **Initialize the bKash Object**: Create an instance of the `bKash` class by providing your bKash API credentials in an array.

    ```
     use RT\bKash\bKash;

     require 'vendor/autoload.php';

     $credential = [
        'username'      => 'your-bKash-username',
        'password'      => 'your-bKash-password',
        'app_key'       => 'your-app-key',
        'app_secret'    => 'your-app-secret',
     ];
     $bKash = new bKash($credential);
    ```
2. **Create a Payment Request**: Use the `createPayment` method to create a payment request. Provide the required payment request data, including the amount, success URL, and brand name.

    ```
    $requestData = [
        'amount'        => 10,
        'success_url'   => 'https://your-website.com/success.php',
        'brand_name'    => 'YourBrandName',
    ];

    try {
        $bKashURL = $bKash->createPayment($requestData);
        // Redirect the user to the bKash payment URL
        header('Location: ' . $bKashURL);
    } catch (Exception $e) {
        // Handle any exceptions or errors here
        $error = $e->getMessage();
    }
    ```
3. **Verify a Payment**: To verify a payment, retrieve the `paymentID` from the query parameters and use the `verifyPayment` method.

    ```
    $paymentID = $_GET['paymentID'];

    try {
        $response = $bKash->verifyPayment($paymentID);
    } catch (Exception $e) {
        // Handle any exceptions or errors here
        $error = $e->getMessage();
    }
    ```

License
-------

[](#license)

This library is open-source and licensed under the [MIT License](LICENSE). You are free to use and modify it in accordance with the terms of the license.

Feel free to contribute, report issues, or suggest improvements! Your feedback and contributions are highly appreciated.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity42

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

936d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a6975c50488b3eeb7cb613bf0b280342ce3912dc4ffaa1aa14b75add8fe070a?d=identicon)[rtraselbd](/maintainers/rtraselbd)

---

Top Contributors

[![rtraselbd](https://avatars.githubusercontent.com/u/31556372?v=4)](https://github.com/rtraselbd "rtraselbd (2 commits)")

---

Tags

phplibrarypaymentbkash

### Embed Badge

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

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

###  Alternatives

[yandex-money/yandex-money-sdk-php

Yandex.Money API SDK for PHP

105167.4k2](/packages/yandex-money-yandex-money-sdk-php)[cryptonator/merchant-php-sdk

Cryptonator.com Merchant API SDK for PHP

2713.7k](/packages/cryptonator-merchant-php-sdk)[omalizadeh/laravel-multi-payment

A driver-based laravel package for online payments via multiple gateways

491.1k](/packages/omalizadeh-laravel-multi-payment)

PHPackages © 2026

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