#skammerens-datter_api
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/1263791712107761856
๐ 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.
- skammerens-datter_api, 19 minutes ago, 13 messages
- skammerens-datter_api, 18 hours ago, 10 messages
- datter_paymentelement-subscription, 1 day ago, 41 messages
My previous thread: #1263791712107761856 message
๐ happy to help
hi tarzan, great ๐ not sure if my link works properly, but I just had a thread that I unfortunately lost that is referenced above 19 minutes ago
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
no worries
can i pass the proration_date when updating the subscription as the unix timestamp from a property of the current subscriptions cycle? i am not sure if such a property exists, what it'd be named, or if i should perform math somehow to determine when the subscription ends...
i want to ensure that the subscription's product is only changed (if downgrade) when the current cycle is over. Upgrades should be instant, like they are working in my integration now per the previous thread
can i pass the proration_date when updating the subscription as the unix timestamp from a property of the current subscriptions cycle?
yes any timestamp work (it needs to be in seconds not milliseconds)
in that case why not just use a subscription schedule
could you elaborate? ๐
following this guide, I should create a subscriptionsSchedules: https://docs.stripe.com/billing/subscriptions/subscription-schedules
from my use case what should I keep in mind to make it act in such a way where downgrading only "releases" when the cycle is over? (monthly or yearly subscription)
yes give me a second I'll share the exact doc
thank you
and this is more accurate for what you are doing https://docs.stripe.com/billing/subscriptions/subscription-schedules/use-cases#changing-subscriptions
thank you, I'll read it and do my best to implement it ๐
let me know if you need any more help
i am implementing it now, but i have another question. If i wish to upgrade a subscription, how can i charge the proration immediately rather than on the upcoming invoice?
you would pass proration_behavior:"always_invoice"
thank you
would it then invoice the proration plus the next month, or just the proration? with the current behaviour it adds the proration to the upcoming invoice and naturally also the subscription price of that month. if it were to invoice immediately, it just only be the proration, so that next month's invoice is the new price without the proration
it's just for the proration amounts
okay, noted ๐
when I create the subscription schedule, if the customer chooses to downgrade, will no product change be made, and i instead listen on a webhook to downgrade them when stripe runs the schedule phase change?
I don't really understand the question. The point of using a Schedule is it makes change to the Subscription automatically at times indicated by the phases you pass.
okay, i understand what you mean. to be certain, the assigned product/price on the subscription will be changed when the biling cycle is over if we follow this section of the docs: https://docs.stripe.com/billing/subscriptions/subscription-schedules/use-cases?lang=php#changing-subscriptions
in that specific example yes, since the code is creating a second phase that starts at the end of the current phase(which is aligned with the current billing period), and that phase changes the subscription item to use the new Price PRICE_PRINT_BASIC
I'd suggest testing all this in test mode with TestClocks to see how it works in practise
thank you once again