Laravel Soulbscription logo

Laravel Soulbscription

Subscription and feature consumption management for Laravel applications

A Laravel package providing a straightforward interface to manage subscriptions, consumable features, quotas, and usage limits with flexible periodicity and grace periods.

Laravel Soulbscription banner

Overview

Manage Subscriptions with Ease

Laravel Soulbscription provides a clean, trait-based interface for adding subscription and feature consumption logic to any Eloquent model. Whether you're building a SaaS platform, API service, or multi-tier application, this package handles the complexity of tracking usage, renewals, and access control.

Flexible Feature Types

Define consumable features (API calls, deploy minutes, credits) with configurable periodicity—daily, weekly, or monthly resets. Create non-consumable features (custom domains, premium support) that act as simple access flags. Use quota features for resources like storage that grow and shrink dynamically. Support postpaid scenarios where users can exceed limits and settle later.

Plan Management

Create plans with custom periodicities, grace periods, and feature allocations. Attach multiple features to each plan with specific charge limits. Support permanent "free" plans without expiration, or time-bound subscriptions with automatic renewal tracking.

Developer-Friendly

Add the HasSubscriptions trait to your User model and start managing subscriptions immediately. Migrations load automatically, and upgrade paths between versions are clearly documented. The package integrates naturally with Laravel's ecosystem, requiring minimal configuration.

Highlights

Consumable, non-consumable, quota, and postpaid feature types
Flexible plan periodicity with daily, weekly, monthly, or permanent options
Grace period support for delayed access suspension on expiration
Trait-based integration with any Eloquent model

Pros

  • Simple trait-based setup with minimal configuration required
  • Supports diverse feature types including quotas and postpaid consumption
  • Flexible periodicity at both plan and feature levels
  • Automatic migration loading with clear upgrade paths

Considerations

  • Limited documentation on payment gateway integration patterns
  • No built-in billing or invoice generation features
  • Requires manual seeding of features and plans
  • Grace period logic may need custom handling for complex scenarios

Managed products teams compare with

When teams consider Laravel Soulbscription, these hosted platforms usually appear on the same shortlist.

Chargebee logo

Chargebee

Subscription billing and revenue management for recurring businesses

ChargeOver logo

ChargeOver

Recurring billing and subscription management with invoicing and dunning

Maxio logo

Maxio

Subscription billing & revenue operations platform for B2B SaaS

Looking for a hosted option? These are the services engineering teams benchmark against before choosing open source.

Fit guide

Great for

  • SaaS applications with tiered subscription models
  • API platforms tracking usage limits and quotas
  • Multi-tenant systems requiring per-user feature access control
  • Applications needing flexible consumption tracking with periodic resets

Not ideal when

  • Projects requiring integrated payment processing and invoicing
  • Simple applications with only binary access control needs
  • Systems needing real-time usage metering at scale
  • Applications requiring complex proration or mid-cycle plan changes

How teams use it

Deploy Minutes Tracking

Users receive monthly deploy time allocations that reset automatically, with silver tier getting 15 minutes and gold tier receiving 25 minutes per period.

Storage Quota Management

Track file storage consumption dynamically as users upload and delete files, enforcing plan-based storage limits without periodic resets.

Feature Gating by Plan

Control access to premium features like custom domains by attaching non-consumable features to higher-tier plans.

Postpaid API Usage

Allow users to exceed their API call limits during a billing period, then calculate overage charges at period end for reconciliation.

Tech snapshot

PHP100%
Dockerfile1%

Tags

hacktoberfestlaravelsubscriptions

Frequently asked questions

Can features have different renewal periods than their parent plan?

Yes, consumable features define their own periodicity independently. A monthly plan can include weekly-resetting features.

How do grace periods work?

Grace periods delay access suspension after plan expiration. A plan with 7 grace days allows continued feature access for one week past the expiration date.

What are quota features used for?

Quota features track cumulative usage without expiration, ideal for resources like storage where consumption increases and decreases rather than resetting periodically.

Does the package handle payment processing?

No, Laravel Soulbscription manages subscriptions and feature consumption only. You must integrate your own payment gateway and trigger subscriptions after payment approval.

Can I create free or permanent plans?

Yes, set periodicity_type and periodicity to null to create plans without expiration that remain active until manually canceled.

Project at a glance

Active
Stars
701
Watchers
701
Forks
93
LicenseMIT
Repo age3 years old
Last commit2 weeks ago
Primary languagePHP

Last synced yesterday