#Eranga

1 messages ยท Page 1 of 1 (latest)

drifting spireBOT
scarlet cliff
#

๐Ÿ‘‹ Thanks for reaching out
Can you share an example subsciprtion Id ?

leaden nebula
#

Sorry for the late reply. sub_1LhqFjC8JGuaUdU6Ni9X686v

#

I'm checking using upcoming invoice API changing price from price_1K7BEcC8JGuaUdU6yY47xcIW to price_1K7BEYC8JGuaUdU6cgluxg0K

scarlet cliff
leaden nebula
#

This one is without changing the price, right?

#

How about a way to see the amount once the price is changed ?

scarlet cliff
scarlet cliff
leaden nebula
#

Oh, wait, let me check it again

leaden nebula
#

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? ๐Ÿ‘ผ

dusk wagon
#

๐Ÿ‘‹ 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

leaden nebula
#

Take your time

#

If it helps you, I can send you the API call I have been trying upto now

dusk wagon
#

yes sure

leaden nebula
#
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
leaden nebula
#

@dusk wagon Are you still with me? ๐Ÿ‘ผ

dusk wagon
#

I'm still working on it, I'm terribly sorry

leaden nebula
#

Ah no, thank you so much for taking your time ๐Ÿฅฐ

#

I'm here as well

dusk wagon
#

I'm sorry it's a bit busy and it takes a bit of time to run tests and keep discord at bay ๐Ÿ˜Š

dusk wagon
#

I'm here for you @leaden nebula

leaden nebula
#

No worries, any luck?

dusk wagon
#

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

leaden nebula
#

Sure, but does changing prices in other subscriptions result in amounts greater than 0?

dusk wagon
#

could you please paste the response to that upcoming call?

#

yes based on this

leaden nebula
#

I could only send it as a JSON, because the content is too big

dusk wagon
#

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.

leaden nebula
#

Great, I will do it. Thank you for your time @dusk wagon

dusk wagon
#

Let me know when you do