#blede_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/1473807743558357162
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
This is the timeline of events if it helps
We essentially want to only upgrade subscriptions that have been paid. Are we missing something?
Hi there
Hi!
Can I have the id of the exact Subscription in question?
sub_1T2EP30635aV53Nr7IdwbsJ2
The actual production sub is
sub_1SdBJI0635aV53NrNjh10mdB
Thank you!
Okay, so here is where they tried to upgrade to yearly, and then the payment failed:
https://dashboard.stripe.com/acct_1Q5pEA0635aV53Nr/logs/req_iZXYdBMJpvw11z
and then after that you have this request:
https://dashboard.stripe.com/acct_1Q5pEA0635aV53Nr/logs/req_DlpQFpIyCstB7C
and it immediately causes a proration invoice to be cut
and then another request upgrading to yearly:
https://dashboard.stripe.com/acct_1Q5pEA0635aV53Nr/logs/req_BL9gh1s6fCRlbs
So which part of this catches you by surprise? Or, what did you want to happen?
If you change a Subscription to a price with a different interval, we always cut an Invoice: https://docs.stripe.com/billing/subscriptions/billing-cycle#changing
So going back.
Assuming you disable proration on the subscription with a latest invoice that is unpaid.
- Customer pays for a subscription
- They later upgrade to yearly and payment fails
- The invoice is generated as you said, this invoice contains the proration but is set to failed.
- Customer adds funds to their card or solved the problem with their payment method
- They downgrade back to monthly
They are charged again the full amount for the monthly subscription for the current period and the proration is essentially lost.
Assuming you disable proration on the subscription with a latest invoice that is unpaid.
Just to be clear, this isn't something you can do. You can only disable prorations on a particular request. And even then there are situations where prorations can't be entirely avoided
Gotcha, when performing the subscription update (upgrading or downgrading), I'm setting the proration behaviour to none if the latest invoice of the subscription is unpaid.
That specific requests is what I'm setting the proration behaviour to none
Okay, I think I see what you're getting at now. So after the failed update, and then moving them back to a monthly price, your question is something like 'how do I reset the billing cycle date and account for the fact that they just paid an Invoice for the month on 2/11, right?
I think what you wanted here is in this request where they update back to monthly after the failed attempt to do yearly, then you need to give them a trial period that lasts until 3/11
Ohhh
that could work
I... think I need to test this a bit more, I will try doing the trial period
Thanks for the help!
I think that's the parameter you need; you want it to line up with when they would've been billed again anyway
Yep, you're welcome!
also @sterile holly I highly recommend using Test Clocks for this and it looks like you weren't https://docs.stripe.com/billing/testing/test-clocks