Skip to main content
Subscribd registers a set of Artisan commands that cover the full lifecycle of your billing data — from initial setup to day-to-day plan and subscription management. You can run these commands locally, in deployment scripts, or as part of scheduled tasks. The sections below describe each command, what it does, and when to use it.

Installation

subscribd:install

Publishes the package config file, migrations, and views, then runs the migrations automatically. Run this once when you first add Subscribd to your project.
php artisan subscribd:install

Plan management

subscribd:plan list

Prints a table of all plans currently stored in the database, including their key, name, pricing rule, price, currency, interval, and active status.
php artisan subscribd:plan list

subscribd:plan sync

Reads the plans array from config/subscribd.php and syncs it to the subscribd_plans table. New plans are inserted, existing plans are updated, and plans removed from config are marked inactive. Run this whenever you add, edit, or remove a plan definition.
php artisan subscribd:plan sync
Add subscribd:plan sync to your deployment script so plan definitions stay in sync with config every time you deploy.

subscribd:plan deactivate {key}

Marks a single plan as inactive by its config key. Existing subscribers on this plan are not affected, but the plan will no longer appear in the plan picker or be available for new subscriptions.
php artisan subscribd:plan deactivate starter
Deactivating a plan does not cancel existing subscriptions. Subscribers on a deactivated plan continue to be billed at their current rate until they cancel or are migrated to another plan.

Subscription management

subscribd:subscription list

Lists all subscriptions in the database with their ID, billable, plan, gateway, status, and renewal date.
php artisan subscribd:subscription list

subscribd:subscription list --status

Filters the subscription list by status. Any value from the SubscriptionStatus enum is accepted: active, trialing, past_due, grace, paused, or canceled.
php artisan subscribd:subscription list --status=past_due
Use --status=past_due as part of a monitoring script to alert you when subscriptions are in a failed payment state.

subscribd:subscription cancel {id}

Cancels a specific subscription by its database ID. By default, the subscription is canceled at the end of the current billing period (grace period). The subscriber retains access until the period ends.
php artisan subscribd:subscription cancel 42
To cancel immediately from code instead of the CLI, use Subscribd::for($user)->cancel('default', immediately: true). The Artisan command always cancels at period end.

Webhook management

subscribd:webhook replay {webhook_event_id}

Re-processes a previously received webhook event by its ID from the subscribd_webhook_events table. The handler runs directly in the console process — no HTTP request is made, so no signature verification is required. Use this to recover from processing failures without waiting for the gateway to redeliver the event.
php artisan subscribd:webhook replay 8f3a1c2d-4e5b-6789-abcd-ef0123456789
Subscribd’s webhook processing is idempotent. Replaying an event that was already processed successfully is safe — the handler detects the duplicate and exits without making changes.

Command reference summary

CommandDescription
subscribd:installPublish config, migrations, and views; run migrations
subscribd:plan listList all plans from the database
subscribd:plan syncSync plan definitions from config to the database
subscribd:plan deactivate {key}Deactivate a plan by its key
subscribd:subscription listList all subscriptions
subscribd:subscription list --status=past_dueFilter subscriptions by status
subscribd:subscription cancel {id}Cancel a subscription at period end
subscribd:webhook replay {webhook_event_id}Replay a webhook event by ID