PHPackages                             vanthao03596/walletly - 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. vanthao03596/walletly

ActiveLibrary[Payment Processing](/categories/payments)

vanthao03596/walletly
=====================

A flexible, feature-rich wallet library for Laravel with multi-currency support

v1.0.0(3mo ago)00MITPHPPHP ^8.1CI passing

Since Mar 26Pushed 3mo agoCompare

[ Source](https://github.com/vanthao03596/walletly)[ Packagist](https://packagist.org/packages/vanthao03596/walletly)[ RSS](/packages/vanthao03596-walletly/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (8)Versions (2)Used By (0)

Walletly
========

[](#walletly)

A flexible, feature-rich wallet library for Laravel with multi-currency support.

[![Latest Version on Packagist](https://camo.githubusercontent.com/d6468377970b946af77106e4122c663b526cf4489d58105de3e5df9f1959d4bf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f76616e7468616f30333539362f77616c6c65746c792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vanthao03596/walletly)[![Total Downloads](https://camo.githubusercontent.com/89ea8b1967fec49bc071ef945fd8d03f6c5a3a74262d65fecade330c8f3f3bef/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f76616e7468616f30333539362f77616c6c65746c792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vanthao03596/walletly)[![License](https://camo.githubusercontent.com/0c8930f2160640a211cdd4d379b928b5d9a8a6da9f2d4193e0b7fc91e45e1b93/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f76616e7468616f30333539362f77616c6c65746c792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vanthao03596/walletly)

Features
--------

[](#features)

- **Multiple Wallets** - Support multiple wallet types per user (main, bonus, credit)
- **Multi-Currency Support** - Handle different currencies with ease
- **Transaction History** - Complete audit trail of all transactions
- **Flexible Operations** - Deposit, withdraw, transfer between wallets
- **Event-Driven Architecture** - Hooks into every wallet operation
- **Balance Calculations** - Real-time balance with pending transactions support
- **Comprehensive Testing Utilities** - Fake mode, assertions, and factories

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

[](#requirements)

- PHP 8.1+
- Laravel 10.0, 11.0 or 12.0

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

[](#installation)

```
composer require vanthao03596/walletly
```

The package uses Laravel's auto-discovery, so the service provider and facade are registered automatically.

### Publish Configuration

[](#publish-configuration)

```
php artisan vendor:publish --provider="Wallet\WalletServiceProvider" --tag="config"
```

### Database Setup

[](#database-setup)

```
php artisan vendor:publish --provider="Wallet\WalletServiceProvider" --tag="migrations"
php artisan migrate
```

Quick Start
-----------

[](#quick-start)

### Basic Usage

[](#basic-usage)

```
use Wallet\Wallet;

// Get user's wallet
$wallet = Wallet::of($user);

// Deposit funds
$transaction = $wallet->deposit(10000); // 100.00 in cents

// Withdraw funds
$transaction = $wallet->withdraw(5000); // 50.00 in cents

// Get balance (in cents)
$balance = $wallet->balance(); // 5000

// Transfer between wallets
$wallet->transfer($anotherWallet, 2500);
```

### Using HasWallet Trait

[](#using-haswallet-trait)

Add the `HasWallet` trait to your User model:

```
use Wallet\Traits\HasWallet;

class User extends Model
{
    use HasWallet;
}
```

Then you can use:

```
$user->deposit(10000);
$user->withdraw(5000);
$user->balance();
$user->transfer($anotherUser, 2500);
```

### Multiple Wallets

[](#multiple-wallets)

```
// Work with different wallet types
$mainWallet = Wallet::of($user)->wallet('main');
$bonusWallet = Wallet::of($user)->wallet('bonus');

// Deposit to bonus wallet
$bonusWallet->deposit(5000, ['reason' => 'Welcome bonus']);

// Transfer from bonus to main
$bonusWallet->transfer($mainWallet, 2500);
```

### Transaction Metadata

[](#transaction-metadata)

```
// Add metadata to transactions
$wallet->deposit(10000, [
    'description' => 'Order payment',
    'order_id' => 12345,
    'source' => 'stripe',
]);

// Get transactions with metadata
$transactions = $wallet->transactions()
    ->where('meta->order_id', 12345)
    ->get();
```

Documentation
-------------

[](#documentation)

For complete documentation, see the [docs](docs/index.md) folder:

- [Installation](docs/installation.md)
- [Configuration](docs/configuration.md)
- [Basic Usage](docs/usage/basic-usage.md)
- [Multiple Wallets](docs/usage/multiple-wallets.md)
- [Transactions](docs/usage/transactions.md)
- [Events](docs/events.md)
- [Exceptions](docs/exceptions.md)
- [Testing](docs/testing.md)
- [API Reference](docs/api-reference/wallet-facade.md)

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

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

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance82

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

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

91d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/34786441?v=4)[Pham Thao](/maintainers/vanthao03596)[@vanthao03596](https://github.com/vanthao03596)

---

Top Contributors

[![vanthao03596](https://avatars.githubusercontent.com/u/34786441?v=4)](https://github.com/vanthao03596 "vanthao03596 (10 commits)")

---

Tags

laravelpaymenttransactionswalletbalance

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/vanthao03596-walletly/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[021/laravel-wallet

Reliable and flexible wallet system for Laravel

2775.8k](/packages/021-laravel-wallet)[laravel/ai

The official AI SDK for Laravel.

9782.1M161](/packages/laravel-ai)[spatie/laravel-health

Monitor the health of a Laravel application

87411.3M153](/packages/spatie-laravel-health)[watson/validating

Eloquent model validating trait.

9733.4M53](/packages/watson-validating)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45344.0k1](/packages/pressbooks-pressbooks)

PHPackages © 2026

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