Reputation: 3787
If a stripe subscription is cancelled and at_period_end is set to true, then the subscription will not be renewed and the customer will not be billed. After the date has passed the renewal date. What happens if I try to update the ended subscription? i am being lazy and do not want to first check if the subscription is active. I am hoping stripe will just reactivate the cancelled and expired subscription. here is the flow
Upvotes: 2
Views: 2856
Reputation: 411
Reactivating canceled subscriptions
a customer’s subscription is canceled with at_period_end set to true and it has not yet reached the end of the billing period, it can be reactivated. (Subscriptions canceled immediately cannot be.) To reactive the subscription, update the subscription, setting the plan to the same ID as the current plan.
\Stripe\Stripe::setApiKey("api_key");
$subscription = \Stripe\Subscription::retrieve("subscription_id");
$subscription->plan = "plan_name";
$subscription->save();
If the cancellation has already been processed and the subscription is no longer active, a new subscription is needed for the customer. Keep in mind that Stripe immediately starts your customer’s subscription under a new billing cycle, so this action results in a new charge. You can override this behavior using the trial_end parameter so the customer isn’t immediately billed
Upvotes: 1