#cody_best-practices
1 messages ¡ Page 1 of 1 (latest)
đ 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/1359580745617772625
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- cody_subscription-schedule-coupons, 2 days ago, 16 messages
Hi, you can pass the discounts on each phases: https://docs.stripe.com/api/subscription_schedules/create#create_subscription_schedule-phases-discounts
Can you try that?
I'm attempting to make a complex subscription schedule, with 3 phases. The first phase is a student discount, valid for 2 years. The second phase is a "step-up" price discount, valid for 1 year. Finally, the third phase is a full price phase.
So at each phase, you should be able to pass the discount desired.
It's not about applying the discount, but rather how long the phase lasts. I need some sort of method of deriving the phase's length from the discount.
For example, if the discount lasts 2 years, then the phase should be 2 years. By default, it only lasts 1 year (inferring duration from the subscription item's price).
Yeah, you pass the discount - which you'd know how long you'd want to offer. Then, you set the phase lenght: https://docs.stripe.com/billing/subscriptions/subscription-schedules#phase-length. You can control this on your end.
We won't look at the discount duration, https://docs.stripe.com/api/coupons/create#create_coupon-duration and the set the phase lenght for you automatically. You'd pass those on the subscription schedules creation on your end.