#WhySoAsync-expand-invoice
1 messages · Page 1 of 1 (latest)
Hello
What do you mean by next invoice?
I want to get the price of the next invoice from that call, to show the user the next payment
Without making too much calls to stripe so i won't get limited
I can get the subscriptionId and get the upcoming invoice with another call
But i want to see if i can get it from stripe.subscriptions.list, i'm thinking if i'm getting latest_invoice i can get the upcoming invoice also
So you want the second invoice of a Subscription that hasn't been created yet?
Or after it has been created?
You won't see any upcoming invoice from listing subscriptions
You would have to preview it
The coupon method worked as you said.
But now i can't show the user the old price, i need to show it with discount
I'm sorry, I don't understand...
You want to show them the price of the invoice itself that they paid?
The initial invoice that includes the discount?
I want to show them the upcoming invoice with the discount, the coupon is already applied and it should be for the next month
Is this invoice not getting paid immediately? Like how is it upcoming for the next month but already created?
I'm sorry. Maybe an example would help?
So if the subscription is created now i can't know yet the next invoice and the price the user will need to pay next month
Because an invoice wasn't created yet
Correct, unless you use the preview upcoming invoice endpoint.
You can pass in the Subscription ID to https://stripe.com/docs/api/invoices/upcoming
That will give you the upcoming invoice