PHPackages                             marjose123/pitaka - 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. marjose123/pitaka

ActiveLibrary[Payment Processing](/categories/payments)

marjose123/pitaka
=================

A Simple Virtual Wallet for Laravel.

1.0.0(1y ago)01[4 PRs](https://github.com/MarJose123/Pitaka/pulls)MITPHPPHP ^8.3|^8.4CI passing

Since Mar 31Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/MarJose123/Pitaka)[ Packagist](https://packagist.org/packages/marjose123/pitaka)[ Docs](https://github.com/marjose123/pitaka)[ GitHub Sponsors](https://github.com/MarJose123)[ RSS](/packages/marjose123-pitaka/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (11)Versions (6)Used By (0)

A Simple Virtual Wallet for Laravel.
====================================

[](#a-simple-virtual-wallet-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8351e45a516de9af3ca1958eb38f2d572e999c125a18074b368873889ab6ac7b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d61726a6f73653132332f706974616b612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/marjose123/pitaka)[![GitHub Tests Action Status](https://camo.githubusercontent.com/25f5fec4f7c1b1db2d42c0ae151015c04b6f36947941b0297da68db407a89f05/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d61726a6f73653132332f706974616b612f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/marjose123/pitaka/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/950e6a6aa65d02b75e6348cd0d4a2a33869d8be1826fe10421279098fc7affa4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d61726a6f73653132332f706974616b612f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/marjose123/pitaka/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/aca28865ac9dd9addfd27c77f7b4c6750d2099376520074770ca8fc5cca63888/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d61726a6f73653132332f706974616b612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/marjose123/pitaka)

"Pitaka" is a term commonly used in the Philippines that translates to "wallet" in English.

Easy creation of Wallets and its transactions.

```
 $wallet = $user->wallets()->create([
        'name' => 'Peso Wallet',
        'slug' => 'peso-wallet',
        'raw_balance' => 0,
        'decimal_places' => 2,
        'metadata' => [
            'Currency' => 'PHP',
        ],
    ]);

    $wallet->deposit(1000.58);
```

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

[](#installation)

You can install the package via composer:

```
composer require marjose123/pitaka
composer dump-autoload
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="pitaka-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="pitaka-config"
```

This is the contents of the published config file:

```
return [
 /**
     * --------------------------------------------------------------
     *  Wallet Migration
     * --------------------------------------------------------------
     * This will be used for the Wallet Table.
     */
    'wallet_table' => [
        'default_decimal_places' => 2,
    ],

    /**
     *  -------------------------------------------------------------------
     *  Default User Wallet
     *  -------------------------------------------------------------------
     */
    'user' => [
        'wallet' => null, // Add your default wallet name here. This will be used if you don't provide a wallet name when calling `$user->wallet()`
    ],
];
```

Usage
-----

[](#usage)

You can do a transaction in your wallet by using user `relationship` or through model class.

Caution

Changing your wallet `decimal_places` value may affect your wallet balance result.

### Wallet balance check against Transaction amount

[](#wallet-balance-check-against-transaction-amount)

Check if the wallet balance is enough to do a transaction

```
$user->wallet('peso-wallet')->check(500) // will return true/false depending on how much amount left in the wallet
```

*or*

```
$product = Product::find(1);
$user->wallet('peso-wallet')->check($product)
```

Implement `WalletTransaction` contract to your `Product` class.

### Wallet Deposit Transaction

[](#wallet-deposit-transaction)

Creating a wallet transaction by depositing an amount. You can also use the `Wallet` model class instead.

```
 $wallet = $user->wallets()->create([
        'name' => 'Peso Wallet',
        'slug' => 'peso-wallet',
        'raw_balance' => 0,
        'decimal_places' => 2,
        'metadata' => [
            'Currency' => 'PHP',
        ],
    ]);

    $wallet->deposit(1000.58);
```

### Wallet Pay

[](#wallet-pay)

Creating a wallet transaction by paying an item/shop amount using your wallet.

```
$user->wallet('peso-wallet')->pay(500);
```

*or*

```
$product = Product::find(1);
$user->wallet('peso-wallet')->pay($product);
```

### Wallet Deduction/Withdraw

[](#wallet-deductionwithdraw)

You can deduct or do a withdrawal from the wallet with/out fee.

```
 $wallet->withdraw(amount: 900, feeAmount: 100);
```

*or*

```
  $wallet->withdraw(1000);
```

### Transfer money to other wallet

[](#transfer-money-to-other-wallet)

You can transfer money to other wallets.

```
$wallet1->transfer(amount: 50, wallet: $wallet2, feeAmount: 50);
```

*or*

```
$wallet1->transfer(amount: 50, wallet: $wallet2);
```

### Retrieve Wallet Balance

[](#retrieve-wallet-balance)

```
$user->wallet('peso-wallet')->balance;
```

Return wallet balance in decimal format.

```
$user->wallet('peso-wallet')->balance_float;
```

Testing
-------

[](#testing)

```
composer package:test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [MarJose123](https://github.com/MarJose123)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance70

Regular maintenance activity

Popularity1

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.7% 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

414d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2fe4f462400792289dae3a62fc6af21c37ff3c59f80d108ffa436b7eaf1b7a90?d=identicon)[marjose](/maintainers/marjose)

---

Top Contributors

[![MarJose123](https://avatars.githubusercontent.com/u/18107626?v=4)](https://github.com/MarJose123 "MarJose123 (52 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")

---

Tags

laravelMarJose123pitaka

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[lemonsqueezy/laravel

A package to easily integrate your Laravel application with Lemon Squeezy.

58596.1k](/packages/lemonsqueezy-laravel)[danestves/laravel-polar

A package to easily integrate your Laravel application with Polar.sh

7812.3k](/packages/danestves-laravel-polar)[tsaiyihua/laravel-ecpay

ecpay library for laravel

6416.3k](/packages/tsaiyihua-laravel-ecpay)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[tsaiyihua/laravel-linepay

linepay library for laravel

102.9k](/packages/tsaiyihua-laravel-linepay)

PHPackages © 2026

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