#aarti-schedule-upcoming

1 messages · Page 1 of 1 (latest)

coral cometBOT
vapid bramble
#

Just to make sure I understand - you already have a subscriptoin, but no schedule. You want to use the upcoming invoice API to see what the upcomign invoice would look like as if you added a schedule and made changes?

simple bloom
#

Yes exactly!

vapid bramble
#

Gotcha - so as far as I know this just isn't something that's supported right now

simple bloom
#

Can you think of a workaround I can use?

#

Basically - I want to show an upcoming invoice to the customer before they can "true-up" additional licenses. This is in case of an annual subscription where I want to show the upcoming invoice "IF" the customer chooses to true-up some licenses. In this case, the upcoming invoice should reflect the prorated amount from the start date of the schedule.

vapid bramble
#

The only workaround I can think of would be to try and get as close as possible by using subscription_proration_date + subscription_items and whatever else you need

simple bloom
#

I think I tried doing that yesterday, but that did not work. Let me try again. I will reference this thread in a new message if this thread is closed. Thank you for the pointer!

vapid bramble
#

👍

simple bloom
#

I am not able to "add" subscription items for the same priceID.

#

And I cannot update a subscription quantity w/o the priceID either. almost feels like a circular dependency here.

coral cometBOT
vapid bramble
#

For some reason that request ID doesn't seem to be working for me, but you shouldn't need to provide the price ID if you don't want to change it. If you want to preview changing the quantity of a subscription item that already exists you need to provide the Subscription Item ID, not the Price ID

simple bloom
#

you mean the subscription item ID?

vapid bramble
#

ah! oops - yes, I meant the subscription item ID

simple bloom
#

Okay, let me check!

granite geyser
#

aarti-schedule-upcoming

simple bloom
#

I think I have what I needed. I am using a query as follows:

stripe invoices upcoming --customer="cus_Ono3CCgaGbjvvo" --subscription-proration-date="1699689600" --subscription-proration-behavior="always_invoice" --subscription="sub_1O0CTAIp6MB4p4mqNCXqm3Kn" -d "subscription_items[0][quantity]=7" -d "subscription_items[0][id]=si_Ono5YFgkxAGsCk" 
#

thank you so much @granite geyser and @vapid bramble for your help, I really appreciate it!