#syed7280_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/1263677545493172277
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
For clarifying, you do not want to modify the coupon to the specific discount amount instead of 20%? ie. a fixed coupon of $24 * 9 months = $216 ?
I could, but the date it will be valid until can be dynamic. E.g it might be 3 months in the future, it can be 2 years in the future
Its based of a students graduation date, so the discount I am providing is for students. They need to provide an Enrolment Confirmation Letter from their uni so we can 1) ensure they are a student, and 2) see when they will be a student until, to determin when the discount should be applied until
I do have one solution, but not sure if there is something more simpler:
I can add an invoice item, for the remaining amount to the Subscription via a subscription schedule phase, and get it to be invoiced immediately
Okie, but what happen if in Sep30 you just make an Update Subscription API to unset the coupons
(or the Subscription Schedule to unset it at the time)
I am not sure what behaviour that causes, will it cause a proration?
You can turn proration_behavior off. (Let's just try it in Test mode, and using Test clock to advance the time)
yeah I might quickly test it in the dashboard now
yeah it didnt work as expected
I tried both with no proration, and charge immediately
It didnt generate an invoice for the remaining undiscounted amount
Thanks for trying, and yeah I suppose it's not that straighforward :/ I guess the only option is to manually generate an additional invoice item as you mentioned there. This is trickly because API-wise it's an annual Sub, while actually you want to calculate by monthly
lol yeah, the issue only comes above when when the user chooses annual subscription over monthly. because with monthly, I can just remove the discount and the next invoice will get generated accordinly