#siv_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/1361749182746202133
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
apiVersion: '2024-09-30.acacia'
Hi! Sorry for the delay. So you're just adding a new item, not updating the existing one.
Hey no worries. I currently am adding a new item but yeah I want to replace the subscription
Not sure if stripe checkout can handle all this
hiya! fyi i'm taking over for timebox - just wanted to let you know that there are several open threads atm but i will get back to you asap!
Hey, thank you! No rush, as long as this thread doesn't go into read only mode I don't mind
have you looked into the customer portal? i think you want that rather than checkout sessions for cases where customers are changing between plans:
https://docs.stripe.com/customer-management/configure-portal
I have, but can you link people right to the correct upgrade place? I am worried people will get lost. Also we wont be able to track analytics. Finally the business plan is a multi seat plan so quantity is a factor as well
have you tried setting up the portal yet? the UI is pretty straightforward - it takes people straight to a page where they see their subscriptions, and if you've configured it so they can change their plan there's a big "update subscription" button
but yeah regarding analytics etc, you are losing that if you send them to a stripe hosted page
Yeah I set it up in staging let me check again
outside of that you'll need to update the subscription via the API, we have a pretty good guide on that here:
https://docs.stripe.com/billing/subscriptions/change-price
Thank you! I did read that doc. So my only worry with that is free trial behavior.
If you start a business trial and I update your subscription from pro to business via webhooks What happens after the trial. When you successfully finish your trial it should be all good with proration and everything.
But what happens if they cancel their trial? Would they automatically go back to pro?
a subscription doesn't really have an automatic memory like that - it has a Price / Product, and it can either be in trial or it isn't. so if you update the Price in the subscription while putting it into trial mode, and the trial ends, they will stay in the Price that you updated them to
So when should I update them? So say I am a pro user and I start a 7 day free trial for business. Lets say I have 6 months left on my pro subscription I should be prorated like 50 dollars.
If I switch them on day 1 of their trial and they don't convert on their free trial do they go to having no active subscription at all? What about the amount they paid for?
Or I could wait until the trial is over but then they wouldn't get their 50 dollar proration they would be charged the full $400 business price
when a trial period ends, it automatically starts the billing period on whatever price they're on - so in this case not converting would mean they are either
- cancelling the subscription
- changing the subscription back to the previous price
any time you cancel or change a subscription you can handle whether prorations are created, and typically the easiest approach is just to update the subscription immediately, generate prorations, and then they're on the new plan right away
for cases like this it can be really helpful to just build a test integration using test clocks to see how things behave with different parameters - have you tried using test clocks yet?
I have used test clocks before and it would definitely help test a solution once implemented but just want get my head around the solution before implementing
i honestly think they can be really useful in figuring out the particulars of how things work - i have a scripts repo locally where i will create test subscriptions with various settings and just progress them along using test clocks to see what happens
if you immediately update the customer to the trial + new subscription mode, we generate prorations by default, so whatever "credit" they had left on the subscription will either go to their next invoice, or to their customer invoice balance
https://docs.stripe.com/billing/customer/balance
if someone ends up in a situation where they have a leftover balance because they paid for a subscription that they haven't used all of the way, you can either leave the balance for future subscriptions or refund it
https://support.stripe.com/questions/refunding-credit-balance-to-customer-after-subscription-downgrade-or-cancellation