#Last-subscription

1 messages · Page 1 of 1 (latest)

main marsh
forest anchor
#

I don't want to change the overall behaviour, I just want to allow the user to cancel the subscription if their card fails and they want to cancel it.

#

So what's the way to "end it now" when calling cancel subscription?

#

For that one specific subscription?

main marsh
#

cancelling the subscription is ending it , I'm not sure I follow you or what the distinction would be

forest anchor
#

Well this is what happened in my case:

  1. User was in trial period 20th May - 20th June 2022
  2. At the end of the trial period the card charge failed
  3. The subscription now says it's active until 20th June 2023 (yearly plan) but it's past_due
  4. Canceling that subscription cancels it but it's still active until 20th June 2023 and the card is retried
#

But if I cancel it immediately through a button in Stripe Dashboard it does what I expect - no more charge attempts

main marsh
#

Canceling that subscription cancels it but it's still active until 20th June 2023 and the card is retried
that feels like you didn't cancel it with that API then

#

sounds more like you updated cancel_at_period_end:true for example. What's the sub_xxx subscription ID where this happened?

forest anchor
#

I think it was this one sub_JVvrCnITlV6fco

#

This was the cancellation attempt through the API evt_1LFYebEsLWYRGjLPNQTKQTRq

#

And this was my manual immediate cancellation through the dashboard evt_1LFYhzEsLWYRGjLPesdoNs1N

#

So how should I call the API to achieve the same thing?

main marsh
main marsh
#

you use Lavarel so probably whatever function wrapper they have for cancelling the subscription uses cancel_at_period_end:true by default instead of actually cancelling it

#

you should check their docs for their library to see how you can make it cancel instantly(basically how you make it use that Stripe Subscription Cancel API)