#brel_unexpected
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/1390331254565765150
đ 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.
- brel_unexpected, 22 hours ago, 203 messages
Hello, thanks for the info, taking a look
Still looking in to this. The subscription's status is based on the status of its latest invoice. I think we didn't create a new invoice specifically because there was no payment involved here and I am trying to think of what the easiest way to generate that invoice would be. Will reach out to my colleagues and get back with what we can find.
The strange thing is that I have done the same process in sandbox and I got active status when I updated to free
Interesting can you send me the ID of that sandbox subscription?
Thank you!
Downgrade event: evt_1RgnCaARjJ1na9ElFU0Y1Tm7
Is the same flow, so subscribtion was unpaid and then was updated to free
Ah there we go! The difference between those two requests is that you passed proration_behavior: 'none' in the sandbox one. That parameter is why the new $0 invoice was created there (and was then immediately considered paid because it is $0)
Is not related to that. Is just that I used that on my last test, but are other examples without specifying proration_behavioir
free plan is always 0, does not have to do with proration_behavior
Correct, this is more that proration_behavior: 'none' created a new invoice
I want to know why in the live env, the subscribtion was not transitioned to "active"
While on other cases it has done
Without passing proration_behavior
Here is an example:
Subscribtion: sub_1RgkP6ARjJ1na9ElwtycAupw
Update to free event: evt_1RgkSZARjJ1na9El0cdVgDRB
Here I hvae not passed any proration_behavior, like in live mode
hey there, stepping in for pompey as they need to step away
Cutting to the chase: returning to active from unpaid is achieved by paying the most recent open invoice
Paying the most recent non-voided invoice before its due date updates the subscription status to active.
On your live subscription, the latest invoice is still open/unpaid: in_1Rb20pARjJ1na9ElZUXM7OHE
You switched to a free price, but without any immediate invoice generation that change will be prorated at the next billing cycle rollover / renewal, with a prorated amount for the free/non-free prices
Until then, the unpaid invoice remains the latest invoice
But have been the same situation in test environment
The latest invoice was open
and I was able to pass to free subscribtion with active status
Please double check that
Is this the test one you're comparing to?
Just want to make sure i inspect the right example
Yes both:
Subscribtion: sub_1Rgn8lARjJ1na9ElAS45rO8S
Downgrade event: evt_1RgnCaARjJ1na9ElFU0Y1Tm7
Subscribtion: sub_1RgkP6ARjJ1na9ElwtycAupw
Update to free event: evt_1RgkSZARjJ1na9El0cdVgDRB
OK, got it
so this is a subtle thing, but its because the test example does force an invoice ($0) which satisfies the "pay the latest invoice" condition to return the unpaid subscription to active
the reason this happened in the test example you shared is because you switched from a paid monthly plan to a free yearly plan, and changing billing intervals always forces immediaite invoice/payment:
https://docs.stripe.com/billing/subscriptions/change-price#immediate-payment
Stripe immediately attempts payment for these subscription changes:
- When the billing period changes
Your live mode subscription did not have the same switch
it was going from a paid yearly to free yearly, there was no interval change
so there was no forced invoice
so there was no paid $0 invoice, and the unpaid subscription remains that way
For this scenario, you can modify your request to additional set billing_cycle_anchor=now to manual force a renewal/cycle
Along with proration_behavior=nonethis should produce a $0 invoice immediately that will get paid automatically (no payment needed), and move the subscription back to active
Does this happen even if user downgrades from a higher price plan to a lower one?
That's somewhat orthogonal to the unpaid-> active question here
The key for unpaid to active is paying the latest invoice
That happened in the test example because the billing interval change forced the new invoice, which was for $0 and paid automatically
the live example didnt have the interval change, so it had no forced invoice/payment, and the latest invoice remained unpaid
This means that if customer is in Professional plan paying 100$ and downgrading to Pro plan that costs 50$ will not have a new invoice created if interval is the same?
What is the logic around that?
That's what's explained here
Unless you specify different behaviour, if those are the same interval i'd expect a prorated credit for the original price and a prorated debit for the new price.
You can disable prorations and/or force the invoice or billing cycle to change, but that is not default behaviour
ok thank you
Can I ask you another strange thing please
On this customer: cus_SbyK2JiUbJvr8m
As you can see he has downgraded to free plan, he has not paid the invoice: in_1RgkPqARjJ1na9ElkHUc7UOm
And plus he is added balance
Why is this default behaviour like this? A customer that did not pay and plus gets balance that he can use on next generated invoices
Smart retries have also finished, so this customer will never get charged for that invoice, and plus he gets balance.
Right, so this is because when you updated the subscription to the free plan, you did not disable proration: https://dashboard.stripe.com/test/logs/req_FJIUNJ2Z3Kl4xW
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
As a result, they get a credit for the unused period of the paid price thats replaced by the free price
It's expected that you'll continue to try to collect payment on the open invoice for what they owe you, but that payment status is irrelevant to the proration
The proration is based on the state of the subscription, not the payments
So what you might want to do before initiating these downgrades is check the latest invoice payment state