PHPackages                             marshmallow/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. [Payment Processing](/categories/payments)
4. /
5. marshmallow/payable

ActiveLibrary[Payment Processing](/categories/payments)

marshmallow/payable
===================

This package will make it possible to accept payments on all our laravel resources. This was orignaly build for our e-commerce package but can be used on anything.

v3.0.0(3w ago)07.8k↓59.4%1[1 PRs](https://github.com/marshmallow-packages/payable/pulls)1MITPHPPHP ^8.2CI failing

Since Apr 7Pushed 2w ago1 watchersCompare

[ Source](https://github.com/marshmallow-packages/payable)[ Packagist](https://packagist.org/packages/marshmallow/payable)[ Docs](https://github.com/Marshmallow-Development/)[ RSS](/packages/marshmallow-payable/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (19)Versions (81)Used By (1)

[![alt text](https://camo.githubusercontent.com/f5450f299f5713ce2f04dd5a1ba7ce9960ed4568b3574e4c4ee3cddc75477253/68747470733a2f2f6d617273686d616c6c6f772e6465762f63646e2f6d656469612f6c6f676f2d7265642d3233377834362e706e67 "marshmallow.")](https://camo.githubusercontent.com/f5450f299f5713ce2f04dd5a1ba7ce9960ed4568b3574e4c4ee3cddc75477253/68747470733a2f2f6d617273686d616c6c6f772e6465762f63646e2f6d656469612f6c6f676f2d7265642d3233377834362e706e67)

Marshmallow Payable
===================

[](#marshmallow-payable)

[![Latest Version on Packagist](https://camo.githubusercontent.com/eb9ca03d7e3ec94bb2b1f0a790db48f849e172013af05ddc0fffac511f4a7f9f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d617273686d616c6c6f772f70617961626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/marshmallow/payable)[![Total Downloads](https://camo.githubusercontent.com/fbf9f47fcc51083ca1987c4e663b09ab0a6c8d39143fec171c295d2beb5e083b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d617273686d616c6c6f772f70617961626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/marshmallow/payable)[![PHP Syntax Checker](https://github.com/marshmallow-packages/payable/actions/workflows/php-syntax-checker.yml/badge.svg?branch=main)](https://github.com/marshmallow-packages/payable/actions/workflows/php-syntax-checker.yml)

This package will make it possible to accept payments on all our laravel resources. This was orignaly build for our e-commerce package but can be used on anything.

It ships integrations for **Mollie**, **MultiSafepay**, **Stripe** and **Buckaroo**, a set of payment models and Laravel Nova resources, payment status events, and a callback/webhook handler.

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

[](#requirements)

- PHP `^8.2`
- Laravel (provider auto-discovered via package discovery)

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

[](#installation)

### Composer

[](#composer)

You can install the package via composer:

```
composer require marshmallow/payable
```

The service provider is auto-discovered. Migrations are loaded automatically from the package.

### Publish the config

[](#publish-the-config)

```
php artisan vendor:publish --provider="Marshmallow\Payable\PayableServiceProvider"
```

This publishes `config/payable.php`.

### Publish Nova Resources

[](#publish-nova-resources)

```
php artisan marshmallow:resource Payment Payable
php artisan marshmallow:resource PaymentProvider Payable
php artisan marshmallow:resource PaymentType Payable
```

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

[](#configuration)

After publishing you can tweak `config/payable.php`. The most relevant keys:

KeyDefaultDescription`test_payments``env('PAYABLE_TEST_PAYMENTS', false)`Run payments in test mode.`use_order_payments``false`Send full order/item information to the payment provider (requires the `PayableWithItems` trait).`shared_with_expose``env('SHARED_WITH_EXPOSE', false)`Set when sharing the app through Expose so callback/webhook URLs resolve correctly.`mollie.capture_mode``env('PAYABLE_MOLLIE_CAPTURE_MODE')`Set to `manual` for the authorize → capture flow used by pay-later methods (klarna, billie, in3, riverty). Leave `null` for immediate capture.`routes.*``payment.open`, `payment.paid`, ...Named routes a payment status redirects to (`payment_open`, `payment_paid`, `payment_failed`, `payment_canceled`, `payment_expired`, `payment_unknown`).`locale``env('CASHIER_CURRENCY_LOCALE', 'nl_NL')`Currency locale.`locale_iso_639``env('CASHIER_CURRENCY_LOCALE_ISO_639', 'nl')`ISO 639 language code.`models.*`Package modelsOverride the `payment`, `payment_provider`, `payment_type`, `payment_webhook`, `payment_status` and `user` models.`nova.resources.*`Package Nova resourcesOverride the Nova resources used for `payment`, `payment_provider` and `payment_type`.`actions.prepare_callback``PrepareForCallback::class`Action invoked when preparing a payment callback.`stripe.*`env-drivenStripe `key`, `secret`, `webhook` secret and the subscribed Stripe event types.`multisafepay.key``env('MULTI_SAFE_PAY_KEY')`MultiSafepay API key.`buckaroo.*`env-drivenBuckaroo `website_key` and `secret`.### Environment variables

[](#environment-variables)

```
MOLLIE_KEY="test_*****"
MULTI_SAFE_PAY_KEY="*****"
PAYABLE_TEST_PAYMENTS=true
```

Usage
-----

[](#usage)

### Prepare your models

[](#prepare-your-models)

Add the `Payable` trait to the model that should support payments and implement the required abstract methods:

```
use Marshmallow\Payable\Traits\Payable;

class Order extends Model
{
    use Payable;

    public function getTotalAmount(): int
    {
        return $this->total_in_cents;
    }

    public function getPayableDescription(): string
    {
        return "Order #{$this->id}";
    }

    public function getCustomerName(): ?string
    {
        return $this->customer?->name;
    }

    public function getCustomerEmail(): ?string
    {
        return $this->customer?->email;
    }

    public function getCustomer(): ?\Illuminate\Database\Eloquent\Model
    {
        return $this->customer;
    }
}
```

### Start a payment

[](#start-a-payment)

```
use Marshmallow\Payable\Models\PaymentType;

$paymentType = PaymentType::first();

$order->startPayment($paymentType);

// Recurring payment
$order->startRecurringPayment($paymentType);
```

The payments related to a model are available through the `payments()` morph relation.

### Use order information

[](#use-order-information)

First let the payable package know we want to sent order information to the payment provider.

```
return [
    'use_order_payments' => true,
]
```

Add the trait `PayableWithItems` to your Payable model.

Implements the following methods on your Payable model.

```
getBillingOrganizationName(),
getBillingTitle(),
getBillingGivenName(), //required
getBillingFamilyName(), //required
getBillingEmailaddress(), //required
getBillingPhonenumber(),
getBillingStreetAndNumber(), //required
getBillingStreetAdditional(),
getBillingPostalCode(),
getBillingCity(), //required
getBillingRegion(),
getBillingCountry(), //required
```

Events
------

[](#events)

The package dispatches the following events as a payment moves through its lifecycle:

```
PaymentStatusOpen::class
PaymentStatusPaid::class
PaymentStatusFailed::class
PaymentStatusCanceled::class
PaymentStatusExpired::class
PaymentStatusRefunded::class
PaymentStatusUnknown::class
ExternalCustomerModified::class
```

Providers
---------

[](#providers)

### Multisafe pay

[](#multisafe-pay)

- Simple checkout
- Complex checkout

### Mollie

[](#mollie)

- Simple checkout
- Complex checkout

### Tests

[](#tests)

Test mollie simple checkout

```
\Marshmallow\Payable\Facades\PayableTest::mollie($test = false, $api_key = 'live_xxxx');
```

Changelog
---------

[](#changelog)

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

Upgrading
---------

[](#upgrading)

Please see [UPGRADE](UPGRADE.md) for details on upgrading between versions.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Stef](https://marshmallow.dev)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance97

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 78.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

Every ~25 days

Recently: every ~5 days

Total

75

Last Release

4d ago

Major Versions

v1.6.1 → v2.0.02022-05-10

v1.15.1 → v2.7.12022-10-21

v1.16.1 → v2.1.02022-10-31

v1.16.2 → v3.x-dev2025-08-01

v1.x-dev → v3.0.02026-06-09

PHP version history (4 changes)v1.0.0PHP ^7.4|^8.0

v2.0.0PHP ^8.0

v2.8.0PHP ^8.1

v3.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/be33d2624e24c516e73892b0929447cc762f3622c024ab8d0d2a59042e5d2c7f?d=identicon)[marshmallow](/maintainers/marshmallow)

---

Top Contributors

[![stefvanesch](https://avatars.githubusercontent.com/u/46725619?v=4)](https://github.com/stefvanesch "stefvanesch (148 commits)")[![LTKort](https://avatars.githubusercontent.com/u/2412670?v=4)](https://github.com/LTKort "LTKort (35 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")

---

Tags

laravelpaymentsmarshmallowpayable

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[mollie/laravel-cashier-mollie

Laravel Cashier provides an expressive, fluent interface to Mollie's subscription billing services.

178204.3k1](/packages/mollie-laravel-cashier-mollie)[duncanmcclean/statamic-cargo

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

3416.7k](/packages/duncanmcclean-statamic-cargo)[tomatophp/filament-payments

Manage your payments inside FilamentPHP app with multi payment gateway integration

542.5k](/packages/tomatophp-filament-payments)[musahmusah/laravel-multipayment-gateways

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

882.2k1](/packages/musahmusah-laravel-multipayment-gateways)[threesquared/laravel-paymill

Laravel wrapper for the Paymill API

121.3k](/packages/threesquared-laravel-paymill)

PHPackages © 2026

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