PHPackages                             durrbar/payment-bkash-driver - 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. durrbar/payment-bkash-driver

ActiveLibrary[Payment Processing](/categories/payments)

durrbar/payment-bkash-driver
============================

A Laravel package to integrate the bKash Payment Gateway with the durrbar/payment-module.

00PHP

Since Apr 2Pushed 3mo agoCompare

[ Source](https://github.com/durrbar/payment-bkash-driver)[ Packagist](https://packagist.org/packages/durrbar/payment-bkash-driver)[ RSS](/packages/durrbar-payment-bkash-driver/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

---

**bKash Payment Driver for Laravel**
====================================

[](#bkash-payment-driver-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0723623bf3619a5506664d3d4002d4d15dd546653b022e159d4f3d219b4795a7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f647572726261722f7061796d656e742d626b6173682d6472697665722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/durrbar/payment-bkash-driver)[![Total Downloads](https://camo.githubusercontent.com/458321c0e8f09c529b328431aacd6f91fdcc0685d5ed1f908c1e2fe8be75ffd1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f647572726261722f7061796d656e742d626b6173682d6472697665722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/durrbar/payment-bkash-driver)

A Laravel package to integrate the **bKash Payment Gateway** seamlessly into your application. This package supports tokenized payments, refunds, transaction verification, and handling callbacks (IPN, success, failure, cancel). It is designed to work with the `durrbar/payment-module` for shared payment driver functionality.

---

**Features**
------------

[](#features)

- **Tokenized Payments**: Supports secure tokenized payment flows.
- **Refunds**: Initiate and check the status of refunds.
- **Transaction Verification**: Verify payment transactions using transaction IDs.
- **Callback Handling**: Handle IPN, success, failure, and cancellation callbacks.
- **Sandbox Support**: Easily switch between sandbox and live environments for testing.
- **Queue Integration**: Automatically retry refund status checks using queued jobs.

---

**Requirements**
----------------

[](#requirements)

- PHP &gt;= 8.0
- Laravel &gt;= 9.0
- `durrbar/payment-module` (for shared payment driver functionality)

---

**Installation**
----------------

[](#installation)

Install the package via Composer:

```
composer require durrbar/payment-bkash-driver
```

---

**Configuration**
-----------------

[](#configuration)

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

```
BKASH_SANDBOX=true
BKASH_APP_KEY=your_app_key
BKASH_APP_SECRET=your_app_secret
BKASH_USERNAME=your_username
BKASH_PASSWORD=your_password
BKASH_CALLBACK_URL=https://your-domain.com/bkash/callback
```

The configuration will automatically load from `payment.providers.bkash` in your Laravel application.

---

**Usage**
---------

[](#usage)

This package is designed to work seamlessly with the `PaymentService` from the `durrbar/payment-module`. All payment-related operations are handled automatically by the `PaymentService`. Simply configure the package and specify `bkash` as the provider when interacting with the `PaymentService`.

### **How It Works**

[](#how-it-works)

1. Install the package and configure the `.env` file with your bKash credentials.
2. The `PaymentService` dynamically resolves this package as the driver for bKash payments.
3. All payment-related operations (initiating payments, handling callbacks, refunds, etc.) are handled automatically by the `PaymentService`.

No additional setup or manual integration is required beyond installing the package and adding the configuration.

---

### **Supported Operations**

[](#supported-operations)

The following operations are supported and handled automatically by the `PaymentService`:

- **Initiating a Payment**: Payments are initiated using the bKash API.
- **Handling Callbacks**: IPN, success, failure, and cancellation callbacks are processed automatically.
- **Verifying a Payment**: Payment transactions are verified using transaction IDs.
- **Refunding a Payment**: Refunds can be initiated and their status checked automatically.
- **Checking Refund Status**: The `PaymentService` checks the status of refunds using queued jobs.

---

**Queue Jobs**
--------------

[](#queue-jobs)

The package includes a queued job (`CheckBkashRefundStatusJob`) to automatically check the status of refunds after 30 seconds. Ensure your queue worker is running:

```
php artisan queue:work
```

---

**Testing**
-----------

[](#testing)

To test the package in sandbox mode, set `BKASH_SANDBOX=true` in your `.env` file. Use the sandbox credentials provided by bKash.

---

**Contributing**
----------------

[](#contributing)

Contributions are welcome! Please follow these steps:

1. Fork the repository.
2. Create a new branch for your feature or bug fix.
3. Submit a pull request with a detailed description of your changes.

---

**Security**
------------

[](#security)

If you discover any security-related issues, please email the maintainer instead of using the issue tracker.

---

**Credits**
-----------

[](#credits)

- [Your Name](https://github.com/officialkidmax)
- Inspired by [bKash API Documentation](https://developer.bka.sh/)

---

**License**
-----------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

---

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance55

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity12

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/41998473?v=4)[Kid Max](/maintainers/officialkidmax)[@officialkidmax](https://github.com/officialkidmax)

---

Top Contributors

[![officialkidmax](https://avatars.githubusercontent.com/u/41998473?v=4)](https://github.com/officialkidmax "officialkidmax (8 commits)")

### Embed Badge

![Health badge](/badges/durrbar-payment-bkash-driver/health.svg)

```
[![Health](https://phpackages.com/badges/durrbar-payment-bkash-driver/health.svg)](https://phpackages.com/packages/durrbar-payment-bkash-driver)
```

###  Alternatives

[msilabs/bkash

bKash Payment Gateway API for Laravel Framework.

181.2k](/packages/msilabs-bkash)[binkode/laravel-paystack

A description for laravel-paystack.

112.1k](/packages/binkode-laravel-paystack)

PHPackages © 2026

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