#dr.schuego
1 messages · Page 1 of 1 (latest)
This endpoint lets you preview invoices, not sure if you can preview metered usage. Consulting my colleagueshttps://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.
If a subscription exists, and it has an item with metered usage where some is already reported, then the upcoming invoice preview works fine.
Yep, but you are trying to preview the usage itself it sounds like?
Not the usage itself, but what it would cost if a customer would be subscribed to a usage based product with usage x.
Gotcha, that was what I meant but I see how that was phrased strangely
Checking in to this and will get back to you
Great, thanks 👍
Apologies for the delay, unfortunately it looks like we currently do not offer this in our API at the moment but I will put in feedback about it.
If you have calculations on top of your base price like tax, you may be able to do something like calculate the base price of all the items and then preview the upcoming invoice with a one-off invoice item of that value, but I don't think we have a good solution for this today unfortunately.