PHPackages                             ib/ib-wallet - 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. ib/ib-wallet

ActiveLibrary[Payment Processing](/categories/payments)

ib/ib-wallet
============

Complete package for all types of payment gateways for Nepal

3.0(10mo ago)016MITPHPPHP ^7.2 || ^8.0

Since Apr 4Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/kingindraib/ib-wallet)[ Packagist](https://packagist.org/packages/ib/ib-wallet)[ Docs](https://github.com/kingindraib/ib-wallet)[ RSS](/packages/ib-ib-wallet/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)DependenciesVersions (6)Used By (0)

IbWallet
========

[](#ibwallet)

This Laravel Package facilitates creating payments across multiple Nepalese wallets such as Khalti, eSewa, and more, offering versatile payment options in Nepal. This support latest version of any package

### How to contribute

[](#how-to-contribute)

If you want to contribute this project.

- email:

Support Wallet
==============

[](#support-wallet)

- Khalti : working
- Esewa : working
- Parbhu Pay : coming
- Ime Pay : coming
- My Pay : coming

Using Example
=============

[](#using-example)

### Using Composer

[](#using-composer)

```
composer require ib/ib-wallet
```

### Publish Vendor File

[](#publish-vendor-file)

```
php artisan vendor:publish --provider="Ib\IbWallet\IbWalletServiceProvider"

```

or

```
php artisan vendor:publish

```

### using

[](#using)

```
use IbWallet;
or
use Ib\IbWallet\IbWallet;

```

paste in the controller

#### for Khalti

[](#for-khalti)

set env file (Here is a sample example)

- mode 0 for development
- mode 1 for production

```
KHALTI_CALLBACK_URL=http://127.0.0.1:8000/khalti-callback
KHALTI_MODE=0
KHALTI_SECRET_KEY=

```

for khalti marchent

- marchent url :
- use valid information.
- use otp: 987654 (this only for testing purpose)

```
 // if you have amount in rs, then you can use IbWallet::Khaltiamount('amount in rs'), this will response in paisa.
$payload = [
'amount' => 1000, // in paisa
'purchase_order_id' => '123456710', // most in unique
'purchase_order_name'=> 'test prod', // unique but not mendotary
'name'=> 'test bahadur',
'phone'=> '01912345678',
'email'=> 'test@gmail.com',
'callback_url' => "http://127.0.0.1:8000/khalti-callback" // optional if you wnat to redirect custom url
];
// initate the payment to process the khalti payment
$initate_payment = IbWallet::khalti($payload);
// after initate payment. call checkout method to hit the checkout method
$checkout = IbWallet::KhaltiCheckout($initate_payment);
// this will redirect to khalti checkout section to fullfill the payment
return $checkout;
//if your payment success then you auto redirect in callback url which you already set in env file.

```

if you have amount in rs, then you can use IbWallet::Khaltiamount('amount in rs'), this will response in paisa.

```
$amount = IbWallet::Khaltiamount('amount in rs');

```

after successful payment and redirect on callback url which you already set in env file. then you can use get metod to print response or ib wallet provide a function for it. for print response

```
   //print khalti response after redirect success payment.
   // here you can autometic redirect
   $response = IbWallet::KhaltiResponse();

```

#### for esewa

[](#for-esewa)

set the env file as seen

- mode 0 for development
- mode 1 for production
- this secret key and product code only used on development, for production you need to contact with esewa

```
ESEWA_PRODUCT_CODE=EPAYTEST
ESEWA_MODE=0
ESEWA_FAILURE_URL=http://127.0.0.1:8000/esewa-fail
ESEWA_SUCCESS_URL=http://127.0.0.1:8000/esewa-success
ESEWA_SECRET_KEY=8gBm/:&EnhH.1/q

```

in controller

- DO not change the signature field.

```
$paylod =[
       'amount' => 1000, // in amount
       'product_delivery_charge' => 0,
       'product_service_charge' => 0,
       'signed_field_names' =>"total_amount,transaction_uuid,product_code", // set signature field name, signature field auto generate
       'tax_amount' =>0,
       'total_amount' => 1000,
       // 'failure_url' =>"http://127.0.0.1:8000/esewa-fail" , // optional if you want to redirect to other page
       // 'success_url' =>"http://127.0.0.1:8000/esewa-success", // optional if you want to redirect to other page
       'transaction_uuid' => Str::random(20), // must be unique
   ];
return IbWallet::Esewa($paylod);

```

after success and falure payment you will auto redierect success and failure url which is set on .env file. Define the method like this

```
public function esewa_success(Request $request){
    // print your response
    // save your work on database or continue your work
    //dd($request->all());
     $response = IbWallet::EsewaResponse($request->all());
        // dd($response);
       print_r($response);
}

public function esewa_fail(Request $request){
    // print your response
    dd($request->all());
}

```

### Lisence

[](#lisence)

MIT

### Author

[](#author)

- Indra Basnet

### Support and FeedBack

[](#support-and-feedback)

email :

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance54

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Total

5

Last Release

322d ago

Major Versions

1.4.0 → 2.02024-12-17

2.0 → 3.02025-06-30

### Community

Maintainers

![](https://www.gravatar.com/avatar/5322106a389e60864ec573abfe0ba7d0129598c5efb86a13ea735335cb527799?d=identicon)[kingindraib](/maintainers/kingindraib)

---

Top Contributors

[![kingindraib](https://avatars.githubusercontent.com/u/97373724?v=4)](https://github.com/kingindraib "kingindraib (21 commits)")

---

Tags

laravelpaymentgatewaypayment gatewaykhaltiesewanepallaravel-paymentesewa-laravelkhalti-laravelib-walletindrabasnetlaravel payment getaway

### Embed Badge

![Health badge](/badges/ib-ib-wallet/health.svg)

```
[![Health](https://phpackages.com/badges/ib-ib-wallet/health.svg)](https://phpackages.com/packages/ib-ib-wallet)
```

###  Alternatives

[dena-a/iran-payment

a Laravel package to handle Internet Payment Gateways for Iran Banking System

312.4k1](/packages/dena-a-iran-payment)

PHPackages © 2026

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