#lil-nasty_best-practices

1 messages ¡ Page 1 of 1 (latest)

umbral waveBOT
tacit thicketBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

umbral waveBOT
#

👋 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/1262885004589924425

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

naive flame
#

Hi there

lilac pelican
#

Hello

naive flame
#

You can "schedule" a change to an existing Subscription at the end of the current billing cycle or after X iterations of a cycle at a specific price, etc.

lilac pelican
#

Hmm interesting

#

So I could use this in downgrade scenarios, and then simply update with proration in the upgrade scenarios

naive flame
#

Yep!

lilac pelican
#

Just to confirm this would resolve any concerns/considerations of proration logic in the downgrade scenario, right?

naive flame
#

Correct, since the downgrade wouldn't happen in the middle of a billing period

#

The Subscription would just transition into a phase with the new price at the next billing period (or after the # of iterations you've configured at the higher price)

lilac pelican
#

So when I'm creating one based off a pre-existing subscription I pass in from_subscription, then would I pass 2 phases (representing current phase and new phase to begin at end of current period) or pass in 1 phase that would simply begin at the end of the current period and then charge on the new price indefinitely?

#

This may be answered in the docs, but asking here jic

naive flame
#

You'd pass in the current and any future phases so, in this case, at least two phases

lilac pelican
#

What's with the iterations? If I wanted to switch and have the user billed indefinitely would I just not pass iterations to the new phase representing the different price?

naive flame
#

Correct, you'd just omit iterations

#

Let's say you have a Subscription for a monthly recurring Price A. If you want to charge that customer for 3 months at Price A and then switch to Price B indefinitely, you'd have a phase with Price A and iterations: 3, then a phase with Price B

lilac pelican
#

I see and because the default end_behavior is release it will just stay at price B when all is said and done

#

Right?

naive flame
#

Correct

#

I recommend playing with a combination of Schedules and Test Clocks so you can "advance time" and see Subscriptions move across phases

lilac pelican
#

Will do! Thanks for all the info!