#bugkiller.
1 messages ยท Page 1 of 1 (latest)
Hello! We'll be with you shortly. 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.
- bugkiller., 6 days ago, 18 messages
You can preview changes to a subscription using the Upcoming Invoice API as described here:
https://stripe.com/docs/billing/subscriptions/prorations#preview-proration
what I'm saying is
let's say user is on subscription for $27 / month now
user wants to upgrade the subscription for $40 / month
then how much money user will pay at this time
Once user tries to upgrade, we wanted to display how much will be paid today (due to subscription upgrade or downgrade)
Yes, that's what you can do using the information i shared
Ok, thanks for your help. let me try it out ๐
The amount depends on the price difference, the remaining time for proration, etc
from this invoice object
which field should I consider to see how much will be paid at the moment
'total' ?
or 'amount_paid' ?
Not amount paid, since there is no payment here
then which field should I check to get how much will be paid due to subscription update
maybe 'amount_due' ?
It depends what you want to show, probably total or amount_due for example
what's the difference between those 2 fields?
amount due might be reduced by a customer credit balance, for example
if they have previous prorated credit
they might have an invoice for total 20 USD but a 15 USD credit makes amount due 5 USD
so amount_due is what user will pay at the moment for the subscription change ?
Correct -- you might also want to use proration_date to control for specific timing for both the preview and actual change, ie set it to the start of the next day
proration date must be now cuz user is upgrading now
Sure, thats fine, but you can set it even 15 min in future
I think enough to use the amount_due then for my purpose as I guess
Because if you don't set it at all the previews and actual payment could be different by a small amount due to the time difference
if you happen to roll over the edge of some rounding
let's say another scenario
you have now subscriptoin for $27 / month but it's cancelled
but you still in a cancellation period
I mean you made subscription on 2nd/Dec and cancelled on 10th/Dec
then you will have right access until (2nd/Jan cuz monthly )
now 13th/Dec, you're making subscription for $40 / month
you will still have proration?
Hi there ๐ taking over, as my colleague needs to step away
Give me a few minutes to get caught up.
I would recommend testing this on your end with a Test Clock so you can feel out these different scenarios. There's a lot of nuance to each of the different billing models you're describing.
Test Clocks: https://stripe.com/docs/billing/testing/test-clocks