PHPackages                             ideacrafters/eloquent-payable - 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. [Database &amp; ORM](/categories/database)
4. /
5. ideacrafters/eloquent-payable

ActiveLibrary[Database &amp; ORM](/categories/database)

ideacrafters/eloquent-payable
=============================

A Laravel package that enables any Eloquent model to accept payments by adding a simple trait

v2.3.0(2w ago)1636[1 issues](https://github.com/IdeaCraftersHQ/eloquent-payable/issues)[1 PRs](https://github.com/IdeaCraftersHQ/eloquent-payable/pulls)MITPHPPHP ^8.0

Since Oct 14Pushed 2w agoCompare

[ Source](https://github.com/IdeaCraftersHQ/eloquent-payable)[ Packagist](https://packagist.org/packages/ideacrafters/eloquent-payable)[ RSS](/packages/ideacrafters-eloquent-payable/feed)WikiDiscussions main Synced today

READMEChangelog (5)Dependencies (40)Versions (26)Used By (0)

Eloquent Payable
================

[](#eloquent-payable)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f4cd3c897504fc65356a99e561168a0446db7350bd6a47fbdc2d8f1bf29b2e6d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6964656163726166746572732f656c6f7175656e742d70617961626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ideacrafters/eloquent-payable)[![Total Downloads](https://camo.githubusercontent.com/b04a2fbed3995fcbd133284ab41d8ef7740e6938fec145938351ef78fe5f4bc1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6964656163726166746572732f656c6f7175656e742d70617961626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ideacrafters/eloquent-payable)[![License](https://camo.githubusercontent.com/9f3b94513d9e65779a335709bdd07cff06e8b2a9954c10159bedbe2179693ffd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6964656163726166746572732f656c6f7175656e742d70617961626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ideacrafters/eloquent-payable)

A Laravel package that enables any Eloquent model to accept payments by adding a simple trait. Perfect for invoices, products, subscriptions, fees, donations, and any other payment scenarios.

> **📋 Upgrading?** If you're upgrading from version 1.x, please check the [Migration Guide](MIGRATION-GUIDE.md) for breaking changes and required updates.
> **📝 Changelog:** See [CHANGELOG.md](CHANGELOG.md) for a complete list of changes in version 2.0.0.

Features
--------

[](#features)

- 🚀 **One-line integration** - Add payment capabilities to any model with a single trait
- 💳 **Multiple processors** - Stripe, offline payments, and free items out of the box
- 🔄 **Swappable processors** - Switch payment providers without changing your code
- 📊 **Complete payment history** - Track all payments with detailed metadata
- 🎯 **Flexible scenarios** - Works for products, invoices, subscriptions, fees, donations
- 🔒 **Secure** - Webhook signature verification and PCI compliance through tokenization
- 📈 **Event-driven** - Comprehensive event system for payment lifecycle
- ⚡ **Performance optimized** - Efficient queries with proper indexing
- 🧪 **Well tested** - Comprehensive test suite included

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

[](#installation)

You can install the package via Composer:

```
composer require ideacrafters/eloquent-payable
```

Publish the configuration file:

```
php artisan vendor:publish --provider="Ideacrafters\EloquentPayable\PayableServiceProvider" --tag="config"
```

Run the migrations:

```
php artisan migrate
```

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

[](#quick-start)

### 1. Make your model payable

[](#1-make-your-model-payable)

```
