#oleg-codaio_api

1 messages ¡ Page 1 of 1 (latest)

random tokenBOT
#

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

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

storm ridgeBOT
#

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.

wheat solstice
#

So yeah, I was wondering if it's be possible to use subscription schedules to only schedule the discount without affecting subscription items.

drifting pecan
#

We'd like to apply a coupon to start when a subscription renews, without affecting any of the items in the subscription.
I don't quite understand this part. The discount will be applied to entire subscription including the items. What do you mean by not affecting any of the items?

wheat solstice
#

So to give some context, we have Stripe subscriptions for a SaaS product where customers are charged based on the number of seats. Over time, the subscription quantity can grow or shrink as seats are added or removed.

Separately, we would like to be able to schedule coupons to take effect upon renewal. For instance, if a customer goes to cancel their subscription, we might offer a retention discount like "Get 50% off your next month" and this coupon should take effect when the subscription renews.

#

However, creating the subscription schedule requires us to specify items, so we would need to also specify the quantity and item in addition to the discount that should take effect next renewal. That also would require additional work when growing/shrinking the subscription since we'd need to update both phases of the subscription.

#

I was hoping there's a simpler way to achieve the result, i.e., "Apply coupon XYZ at timestamp 12345" (or at current period end)

drifting pecan
#

Thanks for sharing the context. This is very helpful for me to understand what you would to achieve.

In https://docs.stripe.com/billing/subscriptions/subscription-schedules#updating:

You need to pass in all current and future phases when you update a subscription schedule. You also need to pass in any previously set parameters that you want to keep. Any parameters that were previously set are unset for the existing phase unless you pass those in the update request. You still receive information in the response about past phases.

Setting phases.items is required for Subscription Schedule. When your system updates the quantity, the quantity in the subsequent phases should also be updated

Learn how to use subscription schedules to automate changes to subscriptions over time.

wheat solstice
#

I see. Sounds like when using subscription schedules for this we'd need to update all phases with desired updates (there's no way to have "partial" settings take effect)