#ziracmo

1 messages · Page 1 of 1 (latest)

unreal jackalBOT
little gate
#

But if I have a new phase for a decrease in quantity planned for the next billing cycle. How can I remove this phase from the Subscription if the user wants to come back to the former state?
You'd just add a new phase that reverts back to the previous quantity

#

Or just remove the phase if they change their mind before it has started

lime magnet
#

Using the stripe.subscriptionSchedules.update(subscriptionScheduleId, updateParams); I don't achieve to remove the scheduled phase. First, how can I know the current phase? (cause it asks me every time I have to update)

little gate
#

Can you share the ID of an API request (req_xxx) you've tried?

#

Or one that errors?

lime magnet
#

I'm trying to reproduce a clean request, i'll come back ASAP

lime magnet
#

I'm using stripe Webhook and I'm Listening on the subscription_schedule.updated here is an event ID for example (evt_1NOGWpLSiv3HYh2YL1gYncAE). How can I find the current phase and the next phase in this massive list of phases ?

little gate
#

Looking

#

To understand, you want to just remove the phase?

lime magnet
#

Yes. I want to remove/cancel a scheduled phase. If the user decreases the quantity, it has to schedule an update to the next billing cycle (ex: going from 10 to 5).

#

During the remaining time, he also can decrease or increase if he wants to. So, if he increases it has to remove the scheduled update. (Knowing the increase of the product must be done immediately not like the decrease that must be applied on the next billing cycle)

little gate
#

The phases are seemingly ordered chronologically by end_date, so the upcoming phase would be the last in the index

#

You can confirm that by checking the timestamps in the current_phase hash