Get Started
Installation
Install the package using Composer. Once installed, run the installation command to publish the configuration file and prepare the package for use in your Laravel application.
Requirements
- PHP 7.6 or higher
- Laravel 5.6 or higher, 6.x, 7.x, 8.x, 9.x, 10.x, 11.x & 12.x, 13.x +
- Composer
- An active Bkash Account
- Bkash Sandbox or Live Store Credentials
Terminal
The fastest way to start is the official scaffolding tool:
composer require syedmahamudul/laravel-bkashphp artisan bkash:installThe installation command automatically publishes the package configuration file to: config/bkash.php.
Configuration
The package supports Laravel Package Discovery, so there is no need to manually register the service provider or facade in your config/app.php file.
Add the following lines to your .env file:
Sandbox/Test Mode :
BKASH_SANDBOX=true
BKASH_APP_KEY=bkash_app_key
BKASH_APP_SECRET=bkash_app_secret
BKASH_USERNAME=bkash_sandbox_username
BKASH_PASSWORD=bkash_sandbox_password
BKASH_CALLBACK_URL=bkash_sandbox_callback_urlLive/Production Mode :
BKASH_SANDBOX=false
BKASH_APP_KEY=bkash_app_key
BKASH_APP_SECRET=bkash_app_secret
BKASH_USERNAME=bkash_live_username
BKASH_PASSWORD=bkash_live_password
BKASH_CALLBACK_URL=bkash_live_callback_urlPackage size
The core runtime is 35kb gzipped and has zero dependencies. The compiler and devtools packages are optional and installed separately.
Verify the install
Run php artisan bkash:install to automatically publish the Bkash configuration file, register the service provider, and set up the required payment routes for your application.