#Eranga-subscription
1 messages ยท Page 1 of 1 (latest)
Sure, I'll send it
Give me a sec, I'll send a new request and send the request ID
I'm using NodeJS SDK and the call is done like this
const upcomingInvoice = await this.stripe.invoices.retrieveUpcoming(stripeInvoiceParams);
I couldn't find a request ID from this response
Would you be able to provide the response please (omitting the information not required)?
You mean the line items?
the response from the code you ran above ๐
The reason why you are observing multiple line items within the subscription is because you are providing the subscription_items , if this is provided you will update the subscription with these items, therefore adding the additional invoice line items.
You can get the upcoming invoice directly with the customer and subscription via the API https://stripe.com/docs/api/invoices/upcoming
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yeah, I am trying to use this to get the proration as well
Assume the customer wants to update quantity
My goal is to use the same logic and get the prorated invoice, as well as the upcoming invoice without proration
How can we do this?
In subscription_items I haven't changed anything in this scenario. That is why I expected that nothing would change.
This is not possible to update the quantity with this same logic and get both the prorated invoice and the upcoming invoice without proration
Oh, okay. Thank you
I have another question
Assume I have only one product in the subscription
And there is a coupon applied to the subscription
In my upcoming invoice request, I am going to remove this coupon by passing an empty string `` in discounts
I change nothing else in upcoming invoice parameters (the one I sent earlier)
Now in my upcoming invoice, will there be any discount_amounts ?
Okay, disregard my last question. I tested it