Canceling Subscriptions
TheCancelSubscription action cancels a subscription at the gateway and updates the local record. All cancellation logic runs inside a database transaction and fires SubscriptionCanceled on success.
Cancel at period end (default)
The default cancel policy leaves the subscription active until the current billing period ends:Grace status. The user retains full access until ends_at, after which the subscription transitions to Canceled. The number of grace period days is configured globally:
Cancel immediately
Passtrue as the second argument to cancel without a grace period:
Canceled. The user loses access immediately.
Per-plan cancel policy
Set acancel_policy on individual plans to override the global default:
| Policy | Behaviour |
|---|---|
at_period_end | Grace period then canceled (default) |
immediately | Canceled instantly, no grace period |
immediately_with_refund | Canceled instantly; prorated refund issued |
$immediately is false, the per-plan policy is honoured. When $immediately is true, the subscription is always canceled instantly regardless of the plan policy.
Checking cancellation status
ManagesBilling trait also provides:
Resuming a canceled subscription
A subscription inGrace status can be un-canceled before ends_at:
canceled_at and ends_at dates, and sets the status back to Active.
Listening to cancellation events
Canceling all subscriptions on account deletion
The SubscriptionManager Livewire component
Thesubscription-manager component includes a cancel flow with an optional confirmation modal and resume button for grace-period subscriptions:
Next steps
- Pausing — Pause billing without canceling
- Dunning — Retry failed payments before a subscription is canceled
- Hooks and Events — Full event reference