PHPackages                             isapp/laravel-cashier-support - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. isapp/laravel-cashier-support

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

isapp/laravel-cashier-support
=============================

Provider-agnostic Laravel Cashier contracts — drop-in billing interfaces mirroring laravel/cashier-stripe API for seamless provider switching (Revolut, Adyen, Wise)

v1.0.0(today)00MITPHPPHP ^8.2CI passing

Since Jul 1Pushed todayCompare

[ Source](https://github.com/isap-ou/laravel-cashier-support)[ Packagist](https://packagist.org/packages/isapp/laravel-cashier-support)[ Docs](https://github.com/isap-ou/laravel-cashier-support)[ RSS](/packages/isapp-laravel-cashier-support/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (13)Versions (3)Used By (0)

isapp/laravel-cashier-support
=============================

[](#isapplaravel-cashier-support)

[![Latest Version on Packagist](https://camo.githubusercontent.com/45ded223b87a0da69b6b1ca0ec17696746037d4ce5aad47548e80d7a0d6883bb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f69736170702f6c61726176656c2d636173686965722d737570706f72742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/isapp/laravel-cashier-support)[![Tests](https://camo.githubusercontent.com/e3bb030e4e2416f6ff73a0437b395788e7592ddffd3d498ca52c0a5639c8d1a5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f697361702d6f752f6c61726176656c2d636173686965722d737570706f72742f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/isap-ou/laravel-cashier-support/actions/workflows/tests.yml)[![PHP Version](https://camo.githubusercontent.com/fbd36205408a3118a08ad62a04d051fc19ef58180c0af5a695bcde56ebe13ac7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f69736170702f6c61726176656c2d636173686965722d737570706f72742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/isapp/laravel-cashier-support)[![License](https://camo.githubusercontent.com/f93ff3af8757b175ad51d1c8e16ea38596a1d52df07d8812a87748379f59b32b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f69736170702f6c61726176656c2d636173686965722d737570706f72742e7376673f7374796c653d666c61742d737175617265)](LICENSE)

Provider-agnostic contracts for Laravel Cashier. This package gives your application the **same developer experience as `laravel/cashier-stripe`**(`$user->charge()`, `newSubscription()->create()`, `checkout()`, ...) while letting you **swap the payment gateway** (Revolut, Adyen, Wise, ...) without touching application code.

It contains **only** interfaces, DTOs, enums, exceptions, abstract models, traits and events — **zero business logic, zero HTTP calls**. Concrete drivers (e.g. `isapp/laravel-cashier-revolut`) implement the contracts and are drop-in replacements for each other.

> **Status — pre-release.** No version is tagged on Packagist yet. Until the first `v1.0.0` is published, require it from the VCS repository (add to your app's `composer.json`):
>
> ```
> "repositories": [
>     { "type": "vcs", "url": "https://github.com/isap-ou/laravel-cashier-support" }
> ]
> ```

Contents
--------

[](#contents)

- [Requirements](#requirements)
- [Installation](#installation)
- [How it works](#how-it-works)
- [Making a model billable](#making-a-model-billable)
- [Capabilities](#capabilities)
- [Provider-defined types](#provider-defined-types)
- [Invoices](#invoices)
- [Events](#events)
- [Localized enum labels](#localized-enum-labels)
- [Keeping in sync with Stripe Cashier](#keeping-in-sync-with-stripe-cashier)
- [Extending](#extending)
- [Quality](#quality)
- [Changelog &amp; releases](#changelog--releases)
- [License](#license)

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

[](#requirements)

PHP `^8.2` and Laravel **11, 12 or 13** (Laravel **12+ recommended**).

> **Laravel 11 is EOL.** It is supported for compatibility, but is past its security-support window — all `11.x` releases are flagged by Composer's advisory audit, so installing on Laravel 11 requires allowing insecure packages. Prefer Laravel 12 or 13 for production.

> **UUID note:** the local models use `HasUuids`. On Laravel 12+ that yields UUIDv7 primary keys; on Laravel 11 it falls back to ordered UUIDs (v4), which is Laravel 11's `HasUuids` default. Both are valid UUIDs — only the version differs.

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

[](#installation)

```
composer require isapp/laravel-cashier-support
```

Publish the config if you need to customise it:

```
php artisan vendor:publish --tag=cashier-support-config
```

`config/cashier-support.php` exposes the default `driver`, the default `currency`, the concrete `models` bindings, and `invoices` (view, paper size, seller details).

The abstract `Subscription`, `SubscriptionItem` and `Invoice` models are optional local records. If you want to persist them, publish and run the provider-agnostic migrations (tables `cashier_subscriptions`, `cashier_subscription_items`, `cashier_invoices`):

```
php artisan vendor:publish --tag=cashier-support-migrations
php artisan migrate
```

How it works
------------

[](#how-it-works)

```
App  ──uses──►  Billable trait  ──delegates──►  CashierManager (driver registry)
                                                       │
                                     resolves the configured GatewayProvider driver
                                                       │
                          isapp/laravel-cashier-revolut, -adyen, -wise, ...

```

A concrete provider package registers itself as a driver:

```
use Isapp\CashierSupport\Facades\Cashier;

Cashier::extend('revolut', fn ($app) => $app->make(RevolutGateway::class));
```

Select the default driver in `config/cashier-support.php` (or via the `CASHIER_DRIVER` env var):

```
'default' => env('CASHIER_DRIVER', 'revolut'),
```

Making a model billable
-----------------------

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

```
use Illuminate\Database\Eloquent\Model;
use Isapp\CashierSupport\Billable;

class User extends Model
{
    use Billable;
}
```

```
$user->charge(1500, 'pm_visa', ['currency' => 'eur']);
$user->refund('pay_123');
$user->newSubscription('default', 'price_monthly')->trialDays(14)->create();
$user->cancelSubscription('default');
$user->checkout('price_monthly', ['success_url' => '...', 'cancel_url' => '...']);
$user->addPaymentMethod('pm_visa');
$user->invoices();
```

Money is always **integer minor units** (cents) plus a `Currency` enum.

### Per-model driver

[](#per-model-driver)

Override `cashierDriver()` to bill a model through a non-default gateway:

```
class Vendor extends Model
{
    use Billable;

    public function cashierDriver(): ?string
    {
        return 'adyen';
    }
}
```

Capabilities
------------

[](#capabilities)

Providers declare which features they support. Concerns check the capability before delegating; unsupported operations throw `UnsupportedOperationException`— there are **no local workarounds**.

```
use Isapp\CashierSupport\Enums\Capability;
use Isapp\CashierSupport\Facades\Cashier;

if (Cashier::supports(Capability::SubscriptionPause)) {
    $user->pauseSubscription('default');
}
```

Provider-defined types
----------------------

[](#provider-defined-types)

Some shapes are provider-specific and are expressed as **contracts**, so each driver returns its own implementation:

- `Contracts\PaymentMethodType` — a string-backed enum of the provider's payment method types (`card`, `sepa`, `revolut_pay`, ...). `DTO\PaymentMethod::$type`type-hints this contract.
- `Contracts\CheckoutSession` — a hosted checkout session (redirect URL, widget token, ...) returned by `checkout()`. A driver may also implement `Illuminate\Contracts\Support\Responsable`, so you can `return $user->checkout(...)`straight from a controller.

Invoices
--------

[](#invoices)

Invoices are generated **locally** from stored data — a shared feature, not a provider call:

```
use Isapp\CashierSupport\Enums\Currency;
use Isapp\CashierSupport\Invoice\InvoiceBuilder;
use Isapp\CashierSupport\Invoice\InvoiceRenderer;

$invoice = InvoiceBuilder::make()
    ->id('in_1')->currency(Currency::EUR)
    ->addLine('Pro plan', 1000)
    ->build();

return app(InvoiceRenderer::class)->render($invoice)->download('invoice.pdf');
```

Rendering uses `spatie/laravel-pdf`; the PDF engine is your application's choice.

Events
------

[](#events)

`WebhookReceived`, `WebhookHandled`, `SubscriptionCreated`, `SubscriptionUpdated`, `SubscriptionCanceled`, `PaymentSucceeded`, `PaymentFailed`, `RefundProcessed`. Dispatch them from your driver via `event(...)`.

Localized enum labels
---------------------

[](#localized-enum-labels)

User-facing enums (`PaymentStatus`, `SubscriptionStatus`, `RefundReason`) use `isap-ou/laravel-enum-helpers` for translatable labels:

```
PaymentStatus::Succeeded->getLabel(); // "Succeeded" (translatable)
```

Translations live under the `cashier-support` namespace; publish them with `--tag=cashier-support-lang`.

Keeping in sync with Stripe Cashier
-----------------------------------

[](#keeping-in-sync-with-stripe-cashier)

The `track-cashier` skill (`.claude/skills/track-cashier`) detects API changes in `laravel/cashier-stripe` since a pinned baseline and maps them onto this package's contracts, so parity can be maintained on a cadence.

Extending
---------

[](#extending)

**Custom or overridden driver.** Drivers are plain `Cashier::extend()`registrations. Your application's service providers boot after the package ones, so re-registering a name replaces the driver — subclass a concrete gateway (or implement `GatewayProvider` from scratch) and register it:

```
// AppServiceProvider::boot()
Cashier::extend('revolut', fn ($app) => $app->make(MyRevolutGateway::class));

// or side-by-side under its own name, selected per model via cashierDriver()
Cashier::extend('revolut-b2b', fn ($app) => $app->make(B2bRevolutGateway::class));
```

**Macros.** `CashierManager` is macroable, so you can attach helpers to the `Cashier` facade without subclassing. Non-macro calls still forward to the default driver:

```
Cashier::macro('chargeInCents', function (Model $billable, int $amount): Payment {
    return $this->provider()->charge($billable, $amount, 'pm_default');
});
```

Methods a custom gateway exposes beyond the `GatewayProvider` contract are not visible through the `Billable` trait — call them via `Cashier::provider()` (or `Cashier::driver('name')`) and narrow the type.

Quality
-------

[](#quality)

```
composer test      # phpunit
composer analyse   # phpstan (larastan) level 8
composer deptrac   # architecture boundary rules (deptrac)
composer format    # laravel pint
```

`deptrac` enforces the layering (DTO/Contracts/Enums stay free of Models, Concerns and the Manager) and the "zero HTTP" rule — see `deptrac.yaml`.

Changelog &amp; releases
------------------------

[](#changelog--releases)

See [CHANGELOG.md](CHANGELOG.md) for what changed between versions, and [RELEASING.md](RELEASING.md) for the release process. This package follows [Semantic Versioning](https://semver.org).

License
-------

[](#license)

Released under the MIT License. See [LICENSE](LICENSE).

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

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

0d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9bfb1eae1e3e43813da6740e5eaa39307a95db7561c2d27e7e8aa24233cdcbeb?d=identicon)[andrii-trush](/maintainers/andrii-trush)

---

Top Contributors

[![andrii-trush](https://avatars.githubusercontent.com/u/14265776?v=4)](https://github.com/andrii-trush "andrii-trush (9 commits)")

---

Tags

contractslaravelbillingpaymentssubscriptionsadyencashierrevolutWise

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/isapp-laravel-cashier-support/health.svg)

```
[![Health](https://phpackages.com/badges/isapp-laravel-cashier-support/health.svg)](https://phpackages.com/packages/isapp-laravel-cashier-support)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k95.4M294](/packages/laravel-horizon)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M129](/packages/laravel-pulse)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M184](/packages/laravel-ai)[laravel/cashier

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

2.5k28.4M142](/packages/laravel-cashier)[laravel/cashier-paddle

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

268934.9k4](/packages/laravel-cashier-paddle)

PHPackages © 2026

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