Search by

alfasix / alfakit-billing

faizanakbar10

Subscription billing for AlfaKit panels: Stripe (Laravel Cashier), Paddle (Cashier Paddle) and Laravel Spark providers, a plans page and subscription middleware, for tenants or users.

Package info

github.com/alfasixbh/alfakit-billing

Homepage

Issues

pkg:composer/alfasix/alfakit-billing

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

v0.1.0 2026-10-18 13:05 UTC

This package is auto-updated.

Last update: 2026-10-18 14:00:33 UTC


README

by Alfa Six

Subscription billing for AlfaKit panels: Stripe (Laravel Cashier), Paddle (Cashier Paddle) and Laravel Spark providers, a plans page and subscription middleware. Tenancy panels bill the tenant; other panels bill the signed-in user.

Installation

composer require alfasix/alfakit-billing

Set up Laravel Cashier (migrations, keys, webhook) and add Laravel\Cashier\Billable to the model that pays.

Registering

use AlfaSix\AlfakitBilling\BillingPlugin;
use AlfaSix\AlfakitBilling\Plan;
use AlfaSix\AlfakitBilling\Providers\StripeBillingProvider;

$panel->plugin(
    BillingPlugin::make()
        ->provider(
            StripeBillingProvider::make()
                ->plans([
                    Plan::make('pro')->price('price_123')->label('Pro')
                        ->amount(29, 'usd')->monthly()
                        ->features(['Unlimited projects', 'Priority support']),
                ])
                ->trialDays(14),
        )
        ->requiresSubscription(),
);
  • /{tenant}/billing (or /billing) opens the Stripe Billing Portal for subscribers and the plans page for everyone else; ?plan=pro starts Stripe Checkout.
  • A Billing entry is added to the tenant menu (or the user menu without tenancy).
  • requiresSubscription() sends unsubscribed tenants or users to the plans page.

PaddleBillingProvider (needs laravel/cashier-paddle; it requires Guzzle 7, which Laravel 13 supports) and SparkBillingProvider (needs Laravel Spark) work the same way and throw a clear exception until their package is installed.

See the documentation for every option.

Testing

vendor/bin/pest --test-directory=packages/plugins packages/plugins/billing

License

MIT. See LICENSE.md.