#5C3P73R-MRR

1 messages · Page 1 of 1 (latest)

vast vale
#

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.

scenic star
#

thanks @vast vale , but is there any way i can fetch the mrr directly via python code ?

vast vale
#

Nope that's not possible

#

We don't expose MRR directly in our API

scenic star
#

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

vast vale
#

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?

scenic star
#

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

simple sinew
#

you're retrieving multiple Invoices in that call. Is that intended? Or do you only want one invoice?

scenic star
#

only the "amount_due" value that is inside the invoices

simple sinew
#

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.

scenic star
#

yes

#

thats exactly what i need

#

i tought there was a method for fetching just this value, but thanks

simple sinew
#

Unfortunately not. You just have to work with the JSON blob to extract the info you want

scenic star
#

thank you for being so patient

#

have a good day 🙂