Plans
Plans are the foundation of Subscribd’s billing model. They’re defined inconfig/subscribd.php and synced to the subscribd_plans database table via php artisan subscribd:install. Version-controlling your plan definitions in config means plan changes are code-reviewed and deployable like any other application change.
Defining a plan
Required fields
Optional fields
Pricing rules
Therule field maps to a pricing class that controls how charges are calculated.
Flat rate
A single recurring charge regardless of usage or quantity:Per unit
Charge per seat, user, or any countable unit:Tiered
Price changes at volume breakpoints:Metered
Charge based on actual usage reported at the end of each billing period:Plan items
PlanItems are composable add-ons that attach to a plan. Each item has akey, an included_quantity, and a unit_price for overages. They’re defined in the database via the Filament admin panel or via the plan:item Artisan command, and sync to subscribd_plan_items.
When a subscription is created, Subscribd hydrates one SubscriptionItem record per active PlanItem on the plan. Customers can select per-item quantities at checkout via the PlanPicker Livewire component.
Free plans
Setamount to 0 to create a free plan. Subscribd automatically routes zero-cost subscriptions through the null gateway — no payment method is required and no gateway API call is made:
Lifetime plans
Setis_recurring to false for one-time charges that never renew. Lifetime plans are excluded from MRR and ARR calculations:
Syncing plans to the database
After modifyingconfig/subscribd.php, run:
subscribd_plans table from config. Existing subscriptions are unaffected — the plan record is updated in place, not replaced.
You can also manage plans directly in the Filament admin panel at /subscribd/admin.
Next steps
- Creating Subscriptions — Subscribe a billable to a plan
- Billing Scenarios — Deep dives for each pricing rule
- Components — The PlanPicker and Checkout Livewire components