Skip to main content
A plan is the central pricing configuration in Subscribd. You define plans as named entries under the plans key in config/subscribd.php, then sync them to the database with an Artisan command. Plans drive what a subscriber pays, how they are billed, and which features their subscription unlocks.

Plan definition structure

Every plan is identified by a string key (e.g., 'starter') and supports the following fields:
FieldTypeDescription
namestringDisplay name shown in UI components
descriptionstringOptional human-readable description
rulestringPricing rule: flat, per_unit, tiered, or metered
priceintPrice in minor currency units (e.g., cents for USD)
currencystringISO 4217 currency code (e.g., 'USD')
intervalstringBilling interval: 'month' or 'year'
interval_countintNumber of intervals per cycle (e.g., 1 for monthly)
trial_daysintDays of free trial before billing starts
featuresarrayMap of feature keys to their values (see below)
rule_configarrayExtra config required by tiered and metered rules

Complete example

The following config defines two flat-rate plans with feature limits:
'plans' => [
    'starter' => [
        'name'           => 'Starter',
        'description'    => 'Full product access for individuals.',
        'rule'           => 'flat',
        'price'          => 1900,       // $19.00/month
        'currency'       => 'USD',
        'interval'       => 'month',
        'interval_count' => 1,
        'trial_days'     => 14,
        'features'       => [
            'projects'   => 5,
            'api_access' => true,
            'support'    => 'email',
        ],
    ],
    'pro' => [
        'name'           => 'Pro',
        'description'    => 'Everything in Starter, plus priority support.',
        'rule'           => 'flat',
        'price'          => 4900,       // $49.00/month
        'currency'       => 'USD',
        'interval'       => 'month',
        'interval_count' => 1,
        'trial_days'     => 14,
        'features'       => [
            'projects'   => null,       // unlimited
            'api_access' => true,
            'support'    => 'priority',
        ],
    ],
],

Syncing plans to the database

After editing your plan config, run the sync command to upsert records in the subscribd_plans table:
php artisan subscribd:plan sync
Other plan management commands:
php artisan subscribd:plan list
php artisan subscribd:plan deactivate starter
Plans are resolved by their config key. Renaming a key creates a new plan record and orphans the old one — existing subscriptions retain a reference to the old plan. Add a new migration or manually migrate subscriptions if you need to rename a key.

The four pricing rules

A fixed price billed each cycle regardless of usage or seat count. Use this for standard SaaS memberships.
'rule'  => 'flat',
'price' => 1900,   // $19.00/month

The features map

The features array on a plan is stored as JSON and drives the entitlement system. Three value types are supported:
ValueMeaning
trueFeature is enabled; binary access check passes
falseFeature is explicitly disabled
nullFeature is available with no numeric limit (unlimited)
integerFeature is available up to this numeric limit
stringFeature has a named value (e.g., 'priority' support tier)
'features' => [
    'projects'   => 5,        // limited to 5
    'api_access' => true,     // boolean access
    'exports'    => null,     // unlimited
    'support'    => 'email',  // named value
],
See Entitlements for how to check these values at runtime.