karpovigorok / subkit
A Laravel package for subscription and billing orchestration.
Fund package maintenance!
Requires
- php: ^8.4
- filament/filament: ^5.0
- illuminate/contracts: ^12.0||^13.0
- laravel/cashier: ^16.5
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.8
- orchestra/testbench: ^11.0||^10.0.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-arch: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Laravel subscriptions with a ready-to-use Filament UI.
Replace days of custom billing logic with a working setup on top of Stripe (Cashier).
- Skip custom subscription logic
- Skip building pricing UI
- Skip wiring Stripe webhooks manually
SubKit provides a Filament admin panel to manage plans and plan sets, themeable Blade components for your pricing page and subscription dashboard, and a clean PHP API for subscription lifecycle operations.
Why use SubKit? While Laravel Cashier is incredibly powerful, building the actual UI and admin panel for subscriptions takes days. SubKit bridges this gap by providing a "Lickable UI" out of the box and a powerful Filament admin to manage it all without writing boilerplate code.
What it does
- Integrates with Stripe via Laravel Cashier (webhooks, checkout sessions, billing portal)
- Provides a Filament admin panel to manage Plans, Plan Sets, Provider Prices, Features, Limits, and Top-ups
- Provides Blade components: a pricing table, a subscription management UI, personal offers, and Top-up snippets, with multiple themes
- Exposes a PHP facade and REST API for subscription operations (checkout, cancel, resume, billing portal)
- Exposes runtime plan limits (e.g.
max_locations,max_users) via aHasCapabilitiestrait with built-in caching - Supports private plans assigned to specific users, and free ($0) plans that activate without Stripe Checkout
- Sells one-off Top-ups (credit packs, consumables) through the provider's hosted checkout and fires a
TopUpPurchasedevent - Lets you attach metadata and Stripe Connect options (
transfer_data,application_fee_percent) to checkouts through a server-side checkout hook
Live Demo
Try it in action: subkit.noxls.net
- Register a test account to explore the customer billing flow.
- Once registered, navigate to
/adminto check out the Filament control panel.
What it does NOT do
- Process payments or store card data
- Replace Stripe or Laravel Cashier — it orchestrates on top of them
- Handle invoicing, taxes, or compliance
- Track balances or credits for Top-ups (your app owns the balance)
- Manage user authentication or access control (your app's policies decide who may use the admin, see Access control)
Requirements
- PHP 8.4+, Laravel 12+
- Laravel Cashier (
laravel/cashier^16.5) and Filament (filament/filament^5.0) - MySQL 8+ (or MariaDB 10.5+)
- A Stripe account
Quick start
composer require karpovigorok/subkit php artisan vendor:publish --tag=subkit-config php artisan vendor:publish --tag=subkit-migrations php artisan migrate
Register the plugin in your Filament panel provider, make your User use Cashier's Billable trait, and set STRIPE_KEY, STRIPE_SECRET and STRIPE_WEBHOOK_SECRET:
->plugin(\SubKit\Filament\SubKitPlugin::make());
Create a plan in the admin panel (/admin), then drop the pricing table into any Blade view:
<x-subkit::pricing-table success-url="{{ route('dashboard') }}" cancel-url="{{ route('pricing') }}" />
Documentation
Full docs: subkit.noxls.net/docs (Markdown sources also live in docs/ on GitHub).
| Installation and configuration | Stripe setup |
| Usage | Plans, features and limits |
| Private plans | B2B / team billing |
| Checkout hook | Top-ups |
| Access control | Themes |
| REST API | Events |
| Upgrading | Changelog |
Testing
composer test
License
MIT
