#jclusso
1 messages · Page 1 of 1 (latest)
Hi there!
What do you mean by "the total amount of a subscription"? Subscriptions create Invoices, and you can find the total amount of the invoice.
like if you want to display to your end user the subscription amount
displaying the last invoice isn't really a good way to go about that
When do you want to display the amount? Before the subscripton is created or after?
right now i'm dealing with after, but curious to know what your answer for before is as well.
outside using stripe's custom portal
And do you want the price they paid in the last invoice, the price they'll pay in the nex invoice, or just the price set on the subscription itself?
the price of the subscription itself
Then you'll need to look at the items in the subscription: https://stripe.com/docs/api/subscriptions/object#subscription_object-items
so the answer is no without doing a bunch of math
you have to then look at the price, determine the type of pricing, figure out the tier if it's tier based or volume, etc
Yes that's true
exposing the subscription item amount would be very valuable
If you don't want to do "a bunch of math", you could simply check the latest_invoice or the upcoming invoice, and display the total https://stripe.com/docs/api/invoices/object#invoice_object-total