#sk10y
1 messages · Page 1 of 1 (latest)
but if there is a schedule I see upcoming invoice for this schedule, in my example when user changes to qty=7 they will see monthly total for qty=5.
Here I believe you already update to qty = 7?
It's a preview, so I send UpcomingInvoice with subscription_items=[{..., qty: 7}]
The actual subscription still has qty=10 + schedule to change qty=5
Here is an actual example, user asked to change qty from 20 to 15. This change is requested at this point and schedule is set.
But then decides to change from 20 to 25. So I make this call to show users new total next, err := invoice.Upcoming(&stripe.InvoiceUpcomingParams{ Subscription: stripe.String("sub_..."), SubscriptionProrationBehavior: stripe.String("none"), SubscriptionItems: []*stripe.SubscriptionItemsParams{ { ID: stripe.String("si_..."), Price: stripe.String("price_..."), Quantity: stripe.Int64(int64(25)), }, }, })
What I want to show to the user is the total price of 25 * 3 EUR = 75 EUR. But what i get is 45 EUR (15 * 3 EUR).
If I release schedule upcoming invoice API will correctly return 75 EUR.
I see, so technically the passing quantity doesn't override schedule
it's expected though, but sure I hear your use case
Yep, I agree, it makes sense, I wonder if there is a way to disregard schedule with a parameter or something
How about passing the new schedule here https://stripe.com/docs/api/invoices/upcoming#upcoming_invoice-schedule
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
create a schedule w qty = 25, then pass it in
But wouldn't it "commit" changes?
I want to get new total without making any changes
I understand to create a new schedule I would use create schedule API passing "from_subscription" parameter. But then I will actually apply changes during preview step.
Um right. I think it's a limitation for now...
Ok, thanks
If you could push this use case somewhere internally so the team would consider it, I would appreciate it.
hi! I'm taking over this thread.