Lifecycle
A failed renewal moves the subscription to
past_due and fires subscription.past_due. Paying recovers it. If the card never recovers, the subscription is revoked and its benefits and license keys are removed.
Change a subscription from your backend
subscriptions:write scope. Customers can also cancel and resume from their portal, and buyers can switch plans themselves where you allow it.
Free trials
Set trial days on a recurring product: $0 today, first charge when the trial ends.reminder.trial_ending fires before it does.
Plan changes
Change plans from Dashboard > Subscriptions > Change plan. Proration options areprorated_immediately, difference_immediately, full_immediately and do_not_bill. A downgrade never refunds. Seats carry over and must fit the new plan’s range.
Events to listen for
subscription.created, subscription.active, subscription.cycled (renewed), subscription.past_due, subscription.paused, subscription.resumed, subscription.canceled, subscription.uncanceled, subscription.revoked, subscription.updated. See Webhooks.