#5C3P73R-MRR
1 messages · Page 1 of 1 (latest)
Hi there!
MRR is really complicated to calculate yourself. We do provide MRR via the Dashboard. Mostly you will want to list your Subscriptions/Invoices for MRR but then you would have to work out exactly how you want to calculate this.
thanks @vast vale , but is there any way i can fetch the mrr directly via python code ?
thank you
to fetch the invoice data is ok, but how can i fetch teh 'amount_due' of this particular query
i cant find in the documentation
When you list invoices, the returned list data will have each invoice which will have an amount_due property: https://stripe.com/docs/api/invoices/object#invoice_object-amount_due
I'm a bit confused why you are setting your customer variable to a general list of invoices?
You would want to pass the customer ID as a parameter in your list request if you want the invoices for a specific customer?
sorry i just forgot to rename my variable, nevermind that. Im trying to retrieve only the amount_due, thats all
here im retrieving the whole invoice, but all i need is the amount_due thats inside the invoice.
thats all i need
you're retrieving multiple Invoices in that call. Is that intended? Or do you only want one invoice?
Okay, so you would just iterate through each of the objects in the JSON blob that gets sent back to you and pull out the amount. Your current code just prints everything.
yes
thats exactly what i need
i tought there was a method for fetching just this value, but thanks
Unfortunately not. You just have to work with the JSON blob to extract the info you want