#Fake Drew
1 messages · Page 1 of 1 (latest)
Is the goal to check current usage on the subscription to see what tier they're at?
No, just to display what the subscription will cost once it is renewed. It looks like I have to pull the associated price for each line_item in the subscription using the subscription's items.data.price.id while expanding the tiers for each pulled price, then correlating those tiers to the quantity in the subscription's items.data.quantity to sum up the cost of the subscription when it renews. Then manually factoring in the subscriptions discounts
Surely there must be an easier way?
You could use this endpoint: 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.
That allows you to see what the next subscription invoice will be for