#Eranga
1 messages ยท Page 1 of 1 (latest)
๐ Thanks for reaching out
Can you share an example subsciprtion Id ?
Sorry for the late reply. sub_1LhqFjC8JGuaUdU6Ni9X686v
I'm checking using upcoming invoice API changing price from price_1K7BEcC8JGuaUdU6yY47xcIW to price_1K7BEYC8JGuaUdU6cgluxg0K
Thanks for sharing, I'm seeing that you've set a trial period, so the first invoice(s) of the trial period will have 0 as total amount, then for the next invoice after the trial, you'll have the updated price:
https://dashboard.stripe.com/test/customers/cus_MQhcFAptBm5gZK/upcoming_invoice/sub_1LhqFjC8JGuaUdU6Ni9X686v
This one is without changing the price, right?
How about a way to see the amount once the price is changed ?
This is the upcoming invoice of the subscription that you shared above
it looks like you already did a price update on the subscription you've shared:
https://dashboard-admin.stripe.com/test/events/evt_1LhqKTC8JGuaUdU6HiSSkf1o
You can see the amount once the price is changed in the upcoming invoice, even from the dashboard
https://dashboard.stripe.com/test/customers/cus_MQhcFAptBm5gZK/upcoming_invoice/sub_1LhqFjC8JGuaUdU6Ni9X686v
Or using Stripe API:
https://stripe.com/docs/api/invoices/upcoming_invoice_lines
Oh, wait, let me check it again
Cool, I see that we did update the price
But, when updating the price, I get upcoming invoice amount as 0$ all the time (when the subscription is on trial)
What I would like to show our user is how much they would have to pay after the trial if they do that price modification
How can I achieve this? ๐ผ
๐ taking over for my colleague. Let me catch up.
let me double check this for you
sorry for keeping you waiting, I'm still trying to replicate this, it would take me a couple more minutes
Take your time
If it helps you, I can send you the API call I have been trying upto now
yes sure
stripe invoices upcoming \
--customer=cus_MQhcFAptBm5gZK \
--subscription=sub_1LhqFjC8JGuaUdU6Ni9X686v \
--subscription-proration-behavior="create_prorations" \
--data "subscription_items[0][id]"=si_MQhf8p7MaoldY7 \
--data "subscription_items[0][quantity]"=4 \
--data "subscription_items[0][price]"=price_1K7BEYC8JGuaUdU6cgluxg0K
@dusk wagon Are you still with me? ๐ผ
I'm still working on it, I'm terribly sorry
I'm sorry it's a bit busy and it takes a bit of time to run tests and keep discord at bay ๐
I'm here for you @leaden nebula
No worries, any luck?
I couldn't reproduce it tbh
I'm trying to take another look at your subscription and see what's wrong
When I tried to replicate I always got an Amount different than 0
Sure, but does changing prices in other subscriptions result in amounts greater than 0?
could you please paste the response to that upcoming call?
yes based on this
yes no worries
Oh I see now, I was able to reproduce it
when you're updating the price you're also changing the billing cycle from monthly to yearly
right?
I'm not sure if this is intended or if this is a bug but if you can see
"period_start": 1663584314,```
are the same value
which means that the billing cycle is 0 days that's why you're getting 0 as the amount
I'm going to investigate this further
Ok so let me tell you my findings, for some reason when you try to change the price from a billing interval (e.g. monthly) to another (e.g. yearly) the upcoming invoices API is considering that you are still in trial and it's not really calculating the right invoice amount, the only workaround that I could find is to use subscription_trial_end: "now", which will force ending the subscription trial (only in preview mode) and calculate the right invoice
I would strongly recommend you send us an email to support@stripe.com and mention that you were speaking to tarzan on discord about it and I will take that ticket and follow up when I do have more info to give you about this.
Great, I will do it. Thank you for your time @dusk wagon
Let me know when you do