#codelearner1188
1 messages · Page 1 of 1 (latest)
We don't have a direct API for that. One way I can think of is to use List Invoice API with subscription set: https://stripe.com/docs/api/invoices/list#list_invoices-subscription
Then iterate the the invoices to calculate the sum yourself
Yeah I know this API but we have a scenario where we would need to get the amount for like lieftime amount of that customer sub with us if suppose they were with us for 45 weeks then i have to loop through all of it and its not efficient enough
Stripe doesn't have an API for this purpose. I'd recommend saving the payment/invoice history of a subscription in your own database and calculate from there