#noah-malmed_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/1359278816018829393
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi! Is this to update prices for ~everyone, or to be able to set someone up to switch prices upon renewal?
For everyone. Essentially, we are raising the price on a product that our customer subscribe to on a yearly basis. We want their subscriptions prices to increase at the end of their current term
Gotcha. This should be pretty straightforward; let me just remember how to do it. ๐
haha thanks
Annual plan, ya? Paid ... ... annually? So if you changed the price of everyone today, when that actually impacted folks would vary based on when they signed up, ya?
correct. Some people may at the begining of their cycle, some at the end.
some in the middle
You should just be able to update the Subscription objects to the new price with proration_behaviour: none and that should work.
That switches them now, but doesn't generate any proration items for 'time used' and 'unused time'.
I think that's not quite what I want. I want everyone to pay the old price this cycle, but when they renew, pay the new price
Are you talking about existing customers, or future customers? Or both?
existing customers
new customers I want to pay the new
Maybe I could update with no proration and give a discount?
For new customers,
for current customer
Sorry, my cats found a bee. ๐
You can update the current customers' price to the new one, with proration_behavour: none, and they will be on the new price for when they renew.
it won't affect their current invoice?
What do you mean when you say 'current invoice'?
If an invoice has been created and finalized, it would not be affected by this change. Future invoices will, but that's the behaviour you want, right?
yes! Okay, I think that question was stemming from a misunderstanding on my part
So a change today will only affect invoices going forward, never issued invoices - so it should do exactly what you want here.
That said I would highly recommend you try this in test mode while you build out your migration code.
thank you! I think the proration flag will do the trick
I have to update that on the subscription?
No, you include it in the 'update subscription' API call: https://docs.stripe.com/api/subscriptions/update#update_subscription-proration_behavior
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
...as part of the API call that changes the price.