PHPackages                             aimeos/pagible-cashier - 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. aimeos/pagible-cashier

ActiveLibrary[Payment Processing](/categories/payments)

aimeos/pagible-cashier
======================

Pagible CMS - Payment integration via Laravel Cashier

0.11.4(1mo ago)113LGPL-3.0-onlyPHPPHP ^8.2

Since May 3Pushed 3w agoCompare

[ Source](https://github.com/aimeos/pagible-cashier)[ Packagist](https://packagist.org/packages/aimeos/pagible-cashier)[ Docs](https://pagible.com)[ RSS](/packages/aimeos-pagible-cashier/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (1)Versions (7)Used By (0)

Pagible Cashier
===============

[](#pagible-cashier)

Payment integration for [Pagible CMS](https://pagible.com) via Laravel Cashier. Supports Stripe, Paddle, and Mollie payment providers.

This package is part of the [Pagible CMS monorepo](https://github.com/aimeos/pagible).

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

[](#installation)

```
composer require aimeos/pagible-cashier
```

Run the interactive installer to configure your payment provider:

```
php artisan cms:install:cashier
```

The installer will:

- Publish the configuration file
- Prompt for your payment provider (Stripe, Paddle, or Mollie)
- Collect API credentials and write them to `.env`
- Install the required Cashier package
- Add the `Billable` trait to your User model
- Print webhook setup instructions

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

[](#configuration)

After installation, the configuration is available in `config/cms/cashier.php`:

```
return [
    'provider' => env('CMS_CASHIER_PROVIDER'),       // 'stripe', 'paddle', or 'mollie'
    'products' => [
        'price_xxx' => ['once' => true, 'action' => 'course_access', 'course_id' => '123'],
        'price_yyy' => ['action' => 'premium'],
    ],
];
```

The `products` array maps payment provider price IDs to server-side metadata. Set `once` to `true` for one-time payments; omit it for subscriptions. Only price IDs listed here are accepted by the checkout endpoint. The full product array is forwarded to the payment provider as metadata and available in webhook events.

Each provider requires its own Cashier package:

ProviderPackageStripe`laravel/cashier`Paddle`laravel/cashier-paddle`Mollie`mollie/laravel-cashier-mollie`### Environment Variables

[](#environment-variables)

VariableDescriptionRequired`CMS_CASHIER_PROVIDER`Payment provider: `stripe`, `paddle`, or `mollie`Yes`STRIPE_KEY`Stripe publishable keyStripe`STRIPE_SECRET`Stripe secret keyStripe`STRIPE_WEBHOOK_SECRET`Stripe webhook signing secretStripe`PADDLE_SELLER_ID`Paddle seller IDPaddle`PADDLE_AUTH_CODE`Paddle API auth codePaddle`PADDLE_RETAIN_KEY`Paddle Retain keyNo`PADDLE_SANDBOX`Use Paddle sandbox: `true` or `false`No`PADDLE_WEBHOOK_SECRET`Paddle webhook secretPaddle`MOLLIE_KEY`Mollie API keyMollieCheckout Form
-------------

[](#checkout-form)

The checkout form only needs the price ID. Payment type and metadata are resolved server-side from the `products` config:

```

    @csrf

    Buy Course

```

Guest users are automatically redirected to the login page. After login or registration, they are redirected back to complete the checkout.

Webhook Events
--------------

[](#webhook-events)

Each payment provider confirms payments via webhooks. Listen to these events in a service provider to perform actions on successful payments. Use the metadata from the `products` config to dispatch different actions per product.

### Stripe

[](#stripe)

```
use Laravel\Cashier\Events\WebhookHandled;

Event::listen(WebhookHandled::class, function ($event) {
    $payload = $event->payload;

    // One-time payment completed
    if (($payload['type'] ?? '') === 'checkout.session.completed') {
        $session = $payload['data']['object'] ?? [];
        $userId = $session['customer'] ?? null;
        $items = \Laravel\Cashier\Cashier::stripe()->checkout->sessions->allLineItems($session['id'] ?? '');
        $priceId = $items->data[0]->price->id ?? null;
        $product = config('cms.cashier.products')[$priceId] ?? [];

        if ($userId && $user = User::where('stripe_id', $userId)->first()) {
            // grant access based on $product config
        }
    }

    // Recurring payment succeeded
    if (($payload['type'] ?? '') === 'invoice.payment_succeeded') {
        $userId = $payload['data']['object']['customer'] ?? null;
        $priceId = $payload['data']['object']['lines']['data'][0]['price']['id'] ?? null;
        $product = config('cms.cashier.products')[$priceId] ?? [];

        if ($userId && $user = User::where('stripe_id', $userId)->first()) {
            // grant access based on $product config
        }
    }
});
```

### Paddle

[](#paddle)

```
use Laravel\Paddle\Events\WebhookHandled;

Event::listen(WebhookHandled::class, function ($event) {
    $payload = $event->payload;

    // One-time payment completed
    if (($payload['event_type'] ?? '') === 'transaction.completed') {
        $data = $payload['data'] ?? [];
        $userId = $data['customer_id'] ?? null;
        $priceId = $data['items'][0]['price']['id'] ?? null;
        $product = config('cms.cashier.products')[$priceId] ?? [];

        if ($userId && $user = User::where('paddle_id', $userId)->first()) {
            // grant access based on $product config
        }
    }

    // Recurring subscription activated
    if (($payload['event_type'] ?? '') === 'subscription.activated') {
        $data = $payload['data'] ?? [];
        $userId = $data['customer_id'] ?? null;
        $priceId = $data['items'][0]['price']['id'] ?? null;
        $product = config('cms.cashier.products')[$priceId] ?? [];

        if ($userId && $user = User::where('paddle_id', $userId)->first()) {
            // grant access based on $product config
        }
    }
});
```

### Mollie

[](#mollie)

```
use Laravel\CashierMollie\Events\OrderPaymentPaid;
use Laravel\CashierMollie\Events\FirstPaymentPaid;

// One-time payment completed
Event::listen(OrderPaymentPaid::class, function ($event) {
    if ($user = $event->order?->owner) {
        $priceId = $event->order->orderItems->first()?->orderable_id;
        $product = config('cms.cashier.products')[$priceId] ?? [];

        // grant access based on $product config
    }
});

// First recurring payment completed
Event::listen(FirstPaymentPaid::class, function ($event) {
    if ($user = $event->payment?->owner) {
        $priceId = $event->payment->orderItems->first()?->orderable_id;
        $product = config('cms.cashier.products')[$priceId] ?? [];

        // grant access based on $product config
    }
});
```

License
-------

[](#license)

MIT

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance94

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

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

Every ~8 days

Recently: every ~2 days

Total

6

Last Release

39d ago

### Community

Maintainers

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

---

Top Contributors

[![aimeos](https://avatars.githubusercontent.com/u/8647429?v=4)](https://github.com/aimeos "aimeos (16 commits)")

---

Tags

laravelstripecmspaymentsmolliecashierpaddle

### Embed Badge

![Health badge](/badges/aimeos-pagible-cashier/health.svg)

```
[![Health](https://phpackages.com/badges/aimeos-pagible-cashier/health.svg)](https://phpackages.com/packages/aimeos-pagible-cashier)
```

###  Alternatives

[mmanos/laravel-billing

A billing package for Laravel 4.

461.3k](/packages/mmanos-laravel-billing)[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)[tomatophp/filament-payments

Manage your payments inside FilamentPHP app with multi payment gateway integration

542.5k](/packages/tomatophp-filament-payments)[opcodesio/spike

Easy user billing for Laravel projects

301.2k](/packages/opcodesio-spike)

PHPackages © 2026

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