PHPackages                             walletable/walletable - 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. walletable/walletable

ActiveLibrary[Payment Processing](/categories/payments)

walletable/walletable
=====================

A package to create e-wallets for managing and analysing digital financial assets per entity in your laravel application.

v0.0.6(1y ago)114.3k5[1 PRs](https://github.com/walletable/walletable/pulls)MITPHPPHP &gt;=7.1CI passing

Since Jul 17Pushed 1mo agoCompare

[ Source](https://github.com/walletable/walletable)[ Packagist](https://packagist.org/packages/walletable/walletable)[ Docs](https://github.com/walletable/walletable)[ RSS](/packages/walletable-walletable/feed)WikiDiscussions main Synced yesterday

READMEChangelog (6)Dependencies (8)Versions (15)Used By (0)

[![Github](https://github.com/walletable/walletable/actions/workflows/tests.yml/badge.svg)](https://github.com/walletable/walletable)[![Total Downloads](https://camo.githubusercontent.com/cd6c02cfa219939a6ec1c9f58935a1f1879587d1767697b816ea2a83906da16c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f77616c6c657461626c652f77616c6c657461626c65)](https://packagist.org/packages/walletable/walletable)[![Latest Stable Version](https://camo.githubusercontent.com/e6a42fae58927175b34888a985fa543eebed0dff0165f0c6073c03fbc36803d2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77616c6c657461626c652f77616c6c657461626c65)](https://packagist.org/packages/walletable/walletable)[![License](https://camo.githubusercontent.com/fa580a3fa801703c46709b124685757fb0720610888dc3051dbe4d4f46e515bc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f77616c6c657461626c652f77616c6c657461626c65)](https://packagist.org/packages/walletable/walletable)

Walletable
==========

[](#walletable)

> A robust Laravel package for creating e-wallets to manage and analyze digital financial assets per entity in your Laravel application.

Table of Contents
-----------------

[](#table-of-contents)

- Features
- Requirements
- Installation
- Configuration
- Basic Usage
- Advanced Usage
- Architecture (Docs WIP)
- Database Schema (Docs WIP)
- Events (Docs WIP)
- Exception Handling (Docs WIP)
- Testing (Docs WIP)
- Security (Docs WIP)
- Contributing (Docs WIP)
- License (Docs WIP)

Features
--------

[](#features)

- Multiple wallets per entity with polymorphic relations
- Multi-currency support with proper money handling
- Secure transaction processing with optimistic locking
- Flexible transaction actions system
- Event-driven architecture
- Support for both auto-increment and UUID primary keys
- Comprehensive exception handling
- Transaction history and balance tracking
- Detailed meta information for transactions
- Transaction reversal capabilities

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

[](#requirements)

- PHP 7.1+
- Laravel 7.0+ | 8.0+ | 9.0+ | 10.0+ | 11.0+
- PHP ext-intl extension

### Via Composer

[](#via-composer)

```
composer require walletable/walletable
```

Post-Installation
-----------------

[](#post-installation)

Run the installation command:

```
php artisan walletable:install
```

This will
---------

[](#this-will)

- Publish the configuration file to `config/walletable.php`
- Publish migration files to `database/migrations`
- Publish model files to `app/Models`
- Optionally configure UUID support

Configuration
-------------

[](#configuration)

### Basic Configuration

[](#basic-configuration)

```
// config/walletable.php
return [
    'locker' => env('WALLETABLE_LOCKER', 'optimistic'),
    'models' => [
        'wallet' => \App\Models\Wallet::class,
        'transaction' => \App\Models\Transaction::class,
    ],
    'model_uuids' => false,
];
```

Basic Usage
-----------

[](#basic-usage)

### Making a Model Walletable

[](#making-a-model-walletable)

```
use Walletable\Contracts\Walletable;

class User extends Model implements Walletable
{
    public function getOwnerName()
    {
        return $this->name;
    }

    public function getOwnerEmail()
    {
        return $this->email;
    }

    public function getOwnerID()
    {
        return $this->id;
    }

    public function getOwnerMorphName()
    {
        return 'user';
    }
}
```

### Creating a Wallet

[](#creating-a-wallet)

```
use Walletable\Facades\Walletable;

$wallet = Walletable::create(
    $user,         // Walletable entity
    'Main Wallet', // Label
    'main',        // Tag
    'USD'          // Currency
);
```

### Basic Transactions

[](#basic-transactions)

```
// Credit transaction
$wallet->action('credit_debit')->credit(
    1000,                      // Amount
    new ActionData('payment'), // Transaction data
    'Payment received'         // Remarks
);

// Debit transaction
$wallet->action('credit_debit')->debit(
    Money::USD(500),          // Amount as Money object
    new ActionData('withdrawal'),
    'ATM withdrawal'
);
```

### Checking Balances

[](#checking-balances)

```
// Get raw amount
$balance = $wallet->amount;

// Get Money object
$money = $wallet->money();

// Formatted balance
$formatted = $wallet->money()->format(); // "$100.00"

// Check sufficient balance
$isEnough = $wallet->money()->greaterThanOrEqual(
    Money::USD(1000)
);
```

### Advanced Usage

[](#advanced-usage)

Custom Transaction Actions
--------------------------

[](#custom-transaction-actions)

```
use Walletable\Internals\Actions\ActionInterface;
use Walletable\Models\Transaction;
use Walletable\Internals\Actions\ActionData;

class PaymentAction implements ActionInterface
{
    public function apply(Transaction $transaction, ActionData $data)
    {
        $transaction->meta = [
            'payment_type' => $data->argument(0)->getValue(),
            'reference' => $data->argument(1)->getValue()
        ];
    }

    public function title(Transaction $transaction)
    {
        return "Payment via {$transaction->meta['payment_type']}";
    }

    public function image(Transaction $transaction)
    {
        return "/images/payment-icon.png";
    }

    public function supportDebit(): bool
    {
        return true;
    }

    public function supportCredit(): bool
    {
        return true;
    }

    public function reversable(Transaction $transaction): bool
    {
        return true;
    }

    public function reverse(Transaction $transaction, Transaction $new): ActionInterface
    {
        $new->meta = [
            'original_transaction_id' => $transaction->id,
            'reversal_reason' => 'customer_request'
        ];
        return $this;
    }

    public function methodResource(Transaction $transaction)
    {
        return $transaction->method;
    }
}

// Register the action
Walletable::action('payment', PaymentAction::class);
```

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance72

Regular maintenance activity

Popularity30

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.6% 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 ~214 days

Recently: every ~261 days

Total

6

Last Release

376d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4cdd5ab20a519718723a826066fab0fcb28bf76bd8fd68a4220d82545ef494e7?d=identicon)[mane\_olawale](/maintainers/mane_olawale)

---

Top Contributors

[![Mane-Olawale](https://avatars.githubusercontent.com/u/47121750?v=4)](https://github.com/Mane-Olawale "Mane-Olawale (219 commits)")[![iamprincesly](https://avatars.githubusercontent.com/u/64446276?v=4)](https://github.com/iamprincesly "iamprincesly (6 commits)")[![theafolayan](https://avatars.githubusercontent.com/u/44205918?v=4)](https://github.com/theafolayan "theafolayan (2 commits)")[![abdulsalamIshaq](https://avatars.githubusercontent.com/u/52103163?v=4)](https://github.com/abdulsalamIshaq "abdulsalamIshaq (1 commits)")[![damilareonifade](https://avatars.githubusercontent.com/u/105763385?v=4)](https://github.com/damilareonifade "damilareonifade (1 commits)")

---

Tags

currencyfinancialfinancial-analysislaravelmoneyphpwallet-service

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3416.6k](/packages/duncanmcclean-statamic-cargo)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)[glennraya/xendivel

A Laravel package to easily integrate Xendit payment gateway. It supports credit and debit cards, and e-wallet payments and custom invoices, queued notifications, webhook listeners and more.

442.7k](/packages/glennraya-xendivel)

PHPackages © 2026

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