Suppose a user wants to cancel their subscription, so I issue a command like this:
stripe_subscription.delete(at_period_end: true)
Later, though—before the period ends—the user changes their mind. Is there a call I can issue to undo the scheduled cancellation?
If not, what's the best way to implement this? My best guess looks like this:
new_subscription = stripe_customer.subscriptions.create(plan: stripe_subscription.plan.id, trial_end: stripe_subscription.current_period_end)
stripe_subscription.delete() # if permitted
self.stripe_subscription = new_subscription
save!
Is there something better I can do?
On your Android device, go to your subscriptions in Google Play. Select the subscription you want to cancel. Tap Cancel subscription. Follow the instructions.
You can not reactivate the subscription. You need to create a new subscription for the user.
It's just people that didn't finish the checkout. Errors on payment. Some merchants have been worried by errors that appear in the logs when we're communicating with Stripe. These errors are normal and are Stripe's way of responding to bad data like misspelled emails or when the card couldn't be charged.
Failed payments If automatic payment fails, the subscription updates to past_due and Stripe attempts to recover payment based on your retry rules. If payment recovery fails, you can set the subscription status to canceled , unpaid , or leave it past_due .
If the subscription is still active, you just have to update the current subscription and pass the plan id once again and it would resume the subscription.
In PHP you would do:
$customer = Stripe_Customer::retrieve("cus_XXX");
$subscription = $customer->subscriptions->retrieve("sub_YYY");
$subscription->plan = "myPlanId";
$subscription->save();
This is covered in one of Stripe's support article in more details here.
Not sure if the accepted answer is an old one, but for the latest version of Stripe you have to do this (in PHP):
$sub->cancel_at_period_end = false;
return $sub->save();
From the dashboard. Go to your Subscription details and click Edit Details
top corner right. A modal untitled "Reactivate subscription" should pop saying
This subscription is set to cancel at the end of the period. You can reactivate the subscription and it'll continue as usual.
Click Reactivate
EDIT
It seems that the actions now appear on mouse over the remaining days before cancellation:
Note that it wont show if the subscription is already canceled.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With