Hey Eugenia,
If you want to bring a subscription back to active you simply need to
call the Update Subscription API [1] and pass the original plan id in
the `plan` parameter as explained on our support article [2].
For the second case though, it's a bit trickier. You can certainly
pass the old plan id to the same API but that won't completely
"reverse" the original API call. When you move a customer between
plans we usually calculate the proration for you as explained in our
subscriptions guide [3]. This means that when you move customers
between plans on the same billing cycle, you'd need to either always
pass `prorate: false` so that we never calculate the proration for you
or instead make sure to delete any pending invoice items [4] that were
created by this update if you want to clean up the state.
When you move a customer to a subscription with a different billing
cycle, such as monthly to yearly for example, we charge the customer
for the difference immediately. This means that if you moved back to
the monthly plan here, your customer would have paid for the full year
and have credit in his account balance that you might want to refund
immediately instead of letting it apply to the next invoice(s) for the
monthly plan.
I hope this helps but please do not hesitate to get back to me if you
need more details.
All the best,
Remi
[1]
https://stripe.com/docs/api#update_subscription
[2]
https://support.stripe.com/questions/how-can-i-resume-a-subscription-after-it-has-been-canceled
[3]
https://stripe.com/docs/guides/subscriptions#upgrading-or-downgrading-plans
[4]
https://stripe.com/docs/api#delete_invoiceitem
> --
> You received this message because you are subscribed to the Google Groups
> "Stripe API Discussion" group.
> To post to this group, send email to
api-d...@lists.stripe.com.
> Visit this group at
>
http://groups.google.com/a/lists.stripe.com/group/api-discuss/.
>
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
api-discuss...@lists.stripe.com.