#JackS
1 messages · Page 1 of 1 (latest)
hi! well you can call https://stripe.com/docs/api/invoices/upcoming#upcoming_invoice-subscription and that returns a preview of what the next invoice will look like. Does that do what you want?
I would want the invoice after the next one, so in our example the next invoice is an invoice for 0 because it is free trial for the entire period. I would want the invoice after the next peiod.
so we can inform the customer the next time they will be charged
you can't get the next-next invoice directly; you could try passing parameters to override the preview so e.g.
https://stripe.com/docs/api/invoices/upcoming?lang=node#upcoming_invoice-subscription
const invoice = await stripe.invoices.retrieveUpcoming({
subscription:subscription.id, subscription_trial_end:"now"
});
the upcoming invoice endpoint lets you preview what an Invoice would look like with certain params/fields changed