#mehdi_api

1 messages ¡ Page 1 of 1 (latest)

proven sableBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1293723067071205407

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

runic lintel
#

hello! To make sure i'm understanding things correctly, at the end of all the subscription schedule phases, you want to cancel the subscription?

lunar vortex
#

no, we want to prevent the schedule from advancing into further phases

#

in our case, we have a subscription schedule where the first phase has a 11 month interval, and the second phase has a a yearly interval

#

(we use this so that we can bill the user 1 month before the "yearly" mark)

#

but we want to bill a "renew" toggle

#

right now, it seems like if the user sets to not renew, we will have to release it from the schedule and then set the subscription to not renew

#

but then if they toggle renew back on, we will have to rebuild the schedule

#

which is brittle

runic lintel
#

i see....hmm, there isn't really a better way unfortunately than what you essentially described I'm afraid. The only thing I can suggest here is to make sure you save the original schedule in your DB so that it's easy to (re)update the subscription schedule, but you're probably currently already doing that

lunar vortex
#

ahh yeah okay, we'll go with that approach then

runic lintel
#

to add a bit more detail though - if the user toggles to not renew, I would update the subscription schedule to remove phase 2 and then release at phase 1. Subsequently, if the user toggles (renews) again, then update the subscription schedule back to what it originally was

lunar vortex
#

ahhh yeah, i think i'll go with that

#

will make it easier than creating new schedules

#

it's okay to have a subscription schedule with just a single phase?

runic lintel
lunar vortex
#

ah awesome, will do