Filament Integration
Subscribd ships a first-party Filament plugin —pixelworxio/subscribd-filament — that adds a complete billing admin panel to your Filament application. It includes resources, relation managers, dashboard widgets, and bulk operations out of the box.
Installation
1. Install the plugin package
2. Register the plugin with your Filament panel
Resources
The plugin registers four resources:| Resource | Model | Pages |
|---|---|---|
PlanResource | Plan | List, Create, Edit |
SubscriptionResource | Subscription | List, View |
InvoiceResource | Invoice | List, View |
CouponResource | Coupon | List, Create, Edit |
PlanResource
Manage plans and their PlanItems from a single resource:- Plan table — key (copyable), name, rule, amount, interval, active status, subscription count
- Plan form — all plan fields plus a live
PlanItemsRelationManagerfor managing composable add-ons - PlanItemsRelationManager — inline CRUD for PlanItems with cap behaviour, ceiling, included quantity, overage price, and sort order
SubscriptionResource
The subscription list provides search, status filter, plan filter, and gateway filter. The view page shows all subscription fields and exposes the following header actions:| Action | Visible when |
|---|---|
| Swap plan | Active, Trialing, Past Due, or Grace |
| Cancel subscription | Active, Trialing, Past Due, or Grace |
| Resume subscription | Grace status |
| Extend trial | Trialing |
| Convert trial to active | Trialing |
| Cancel trial | Trialing |
| Transfer subscription | Active, Trialing, Past Due, or Grace |
SubscriptionItemsRelationManager showing per-item quantities, cap behaviour badges, effective prices, and a quantity-update action with cap enforcement.
InvoiceResource
Read-only invoice view with all invoice fields and anInvoiceLinesRelationManager showing line items. Header action to issue a refund when the invoice is paid.
CouponResource
Full CRUD for coupons with a Deactivate table action that setsexpires_at = now() on any valid coupon.
Dashboard widgets
The plugin registers the followingStatsOverviewWidget classes:
| Widget | Shows |
|---|---|
ActiveSubscriptionsWidget | Active count, Trialing count, Past Due count |
MrrWidget | Monthly Recurring Revenue normalised across billing intervals; multi-currency |
ArrWidget | Annual Recurring Revenue from the latest ArrSnapshot; “as of” date |
FailedPaymentsWidget | Failed payment count and recent failed payment list; configurable lookback days |
TrialWidget | Active trial count, average days remaining, 30-day conversion rate |
TrialConversionWidget | Conversion rate over a configurable window (monthly/quarterly/annual) |
SeatsWidget | Seats in use, at-capacity items, items with overages |
SubscribdFilamentPlugin::make().
Bulk operations
TheBulkOperationsWidget provides a three-stage confirmation UI for batch operations across subscriptions:
- Cancel subscriptions in bulk
- Resume subscriptions in bulk
- Extend trials in bulk
- Apply coupons in bulk
- Transfer subscriptions in bulk
- Retry failed payments in bulk
Subscription price overrides
TheSubscriptionPriceOverride Livewire component is composed into the Subscription view page. It lists all SubscriptionItems with their current effective prices and override status, and provides a form to:
- Set a permanent per-item price override
- Set a time-limited override with an expiry date
- Clear an existing override
Admin panel access
The built-in admin panel (without Filament) is available atsubscribd/admin and is gated by the can:manage-billing policy. If you prefer to use the Filament plugin as your admin interface, disable the built-in panel:
Authorization
Protect Filament resources with standard Filament authorization. Register a policy for any Subscribd model:Next steps
- Testing — Test billing flows with the FakeGateway
- Webhooks — Handle gateway events
- Hooks and Events — React to billing milestones