fereydooni / laravel-wallet
A Laravel backend package for immutable double-entry wallets, multi-asset balances, verified gateways, reservations, payouts, refunds, transfers, and reconciliation.
Requires
- php: ^8.2
- illuminate/contracts: ^11.0|^12.0
- illuminate/database: ^11.0|^12.0
- illuminate/events: ^11.0|^12.0
- illuminate/http: ^11.0|^12.0
- illuminate/queue: ^11.0|^12.0
- illuminate/routing: ^11.0|^12.0
- illuminate/support: ^11.0|^12.0
- illuminate/validation: ^11.0|^12.0
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.18
- orchestra/testbench: ^9.0|^10.0
- pestphp/pest: ^3.0|^4.0
- pestphp/pest-plugin-laravel: ^3.0|^4.0
- phpunit/phpunit: ^11.0|^12.0
This package is auto-updated.
Last update: 2026-05-01 11:18:36 UTC
README
fereydooni/laravel-wallet is a Laravel 11+ backend package for one wallet per configured User model, multi-asset accounts, immutable double-entry ledger records, verified gateway deposits, reservations, withdrawals, refunds, optional transfers, transaction history, and rebuildable balance snapshots.
The package does not ship a UI or admin panel. Host applications interact with PHP services, contracts, facades, migrations, optional routes, jobs, and events.
Basic Usage
use Fereydooni\LaravelWallet\Contracts\Services\WalletService; $wallet = app(WalletService::class)->walletForUser($user);
IRR is enabled by default as the canonical settlement asset for Iranian gateways. IRT/Toman aliases are disabled unless the host application explicitly configures an input or display alias that normalizes to IRR before settlement or ledger recording.
Package callback routes are disabled by default and only register when wallet.routes.enabled is set to true.
Wallet Operations
The package exposes backend services for deposits, reservations, capture/release, withdrawals, refunds, transfers, exchanges, reconciliation, gateway registration, and policy replacement. Routes are disabled by default, transfers are disabled by default, Activitylog is disabled by default, and cached balances are changed only by ledger posting or reconciliation rebuilds.
See docs/usage.md for examples and MySQL/PostgreSQL compatibility notes.