PHPackages                             aniket/laravel-wallet-system - 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. aniket/laravel-wallet-system

ActiveLibrary

aniket/laravel-wallet-system
============================

A Laravel Wallet System for managing user balances, deposits, withdrawals, and transactions in Laravel applications.

v1.0.0(9mo ago)5812MITPHPPHP ^8.0

Since Jul 18Pushed 7mo agoCompare

[ Source](https://github.com/Aniket11prajapati/laravel-wallet)[ Packagist](https://packagist.org/packages/aniket/laravel-wallet-system)[ RSS](/packages/aniket-laravel-wallet-system/feed)WikiDiscussions main Synced 1mo ago

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

Laravel Wallet System
=====================

[](#laravel-wallet-system)

A **Laravel Wallet System** package for managing user balances, deposits, withdrawals, credits, debits, and refunds inside any Laravel application.
This package makes it simple to implement a **wallet system in Laravel** for e-commerce, SaaS platforms, financial apps, or any system requiring digital wallet functionality.

[![Packagist](https://camo.githubusercontent.com/8b4bc7f617102528ccb38e0b16e427a66d8bfd75b79961655fdd9213814359dc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616e696b65742f6c61726176656c2d77616c6c65742d73797374656d2e737667)](https://packagist.org/packages/aniket/laravel-wallet-system)[![License: MIT](https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667)](LICENSE)

---

🚀 Features of Laravel Wallet
----------------------------

[](#-features-of-laravel-wallet)

- 💳 **Credit, debit, and refund support** out of the box
- 📄 Tracks all **transactions and transaction history**
- 🔐 Uses **Laravel Cache locks** for safe concurrent updates
- ⚙️ Fully configurable (tables, balance column, lock duration)
- 🧱 Extendable schema: modify the `transactions` table if needed
- 💾 Works with relational &amp; non-relational databases
- 🧪 Easy integration with existing `users` table

---

- 💳 Credit, debit, and refund support
- 📄 Tracks transactions and transaction history
- 🔐 Uses Laravel Cache locks for safe concurrent updates
- ⚙️ Fully configurable
- 🧱 Extendable schema: you can modify the `transactions` table
- 💾 Compatible with relational and non-relational DBs
- 🧪 Easy integration with existing `users` table

---

📦 Installation
--------------

[](#-installation)

```
composer require aniket/laravel-wallet-system
```

---

⚙️ Wallet Configuration
=======================

[](#️-wallet-configuration)

You can edit the configuration in `config/wallet.php`:

```
return [
    'users_table' => 'users',                    // Table name for users
    'wallet_balance_column' => 'wallet_balance',// Column for storing wallet balance
    'lock_duration' => 10,                       // Cache lock duration in seconds
    'default_balance' => 0.00,                   // Default balance for new users
];
```

⚙️ Configuration Options
------------------------

[](#️-configuration-options)

- **users\_table**
    Specify your users table name.
- **wallet\_balance\_column**
    Column in the users table for wallet balance.
- **lock\_duration**
    Time in seconds to lock a wallet during updates (prevents race conditions).
- **default\_balance**
    Initial balance for new users.

---

👨‍💻 Usage Example
-----------------

[](#‍-usage-example)

For migrating the tables.

```
php artisan migrate
```

### In `User.php`:

[](#in-userphp)

```
use Aniket\LaravelWalletSystem\Traits\HasWallet;

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

💳 Wallet Operations
-------------------

[](#-wallet-operations)

---

### ✅ Credit Wallet

[](#-credit-wallet)

Credits money to the user's wallet.

```
$user = User::find(1);
$user->credit(1000, 'Signup Bonus');
```

### 🛒 Debit Wallet

[](#-debit-wallet)

Debits money from the user's wallet if sufficient balance is available.

```
$user = User::find(1);
$user->debit(250, 'Purchase');
```

### 💸 Refund Wallet

[](#-refund-wallet)

Refunds money back into the wallet (acts like a credit, but marked with metadata).

```
$user = User::find(1);
$user->refund(100, 'Failed order refund');
```

---

🚀 Why Use Laravel Wallet System?
--------------------------------

[](#-why-use-laravel-wallet-system)

- Simplifies wallet implementation in Laravel applications
- Prevents race conditions with cache-based locks
- Easy setup with migrations &amp; configuration
- Works seamlessly for:
    - Multi-vendor systems
    - Fintech applications
    - E-commerce platforms
    - Gaming credits
    - Loyalty programs

---

🔗 Links
-------

[](#-links)

- [Packagist: aniket/laravel-wallet-system](https://packagist.org/packages/aniket/laravel-wallet-system)
- [GitHub: Laravel Wallet System Repository](https://github.com/Aniket11prajapati/laravel-wallet)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance59

Moderate activity, may be stable

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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

299d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/14e4b40f4cbedebcae7bce9f82591817694c5901cd59fb3ebccb1e32e0020b77?d=identicon)[Aniket11prajapati](/maintainers/Aniket11prajapati)

---

Top Contributors

[![Aniket11prajapati](https://avatars.githubusercontent.com/u/140104514?v=4)](https://github.com/Aniket11prajapati "Aniket11prajapati (34 commits)")

### Embed Badge

![Health badge](/badges/aniket-laravel-wallet-system/health.svg)

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

PHPackages © 2026

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