Calculation of MRR in Stripe

1,263 views
Skip to first unread message

Pinky

unread,
Aug 20, 2015, 9:00:15 AM8/20/15
to Stripe API Discussion

Hi,

I want the total number of customers in Stripe, and also the MRR (Monthly Recurring Revenue). Is there anyway that we can get this data from Stripe?

Thanks in advance

Remi J.

unread,
Aug 20, 2015, 9:07:12 AM8/20/15
to api-d...@lists.stripe.com
Hey Pinky,

You can go through the list of customers in your account using the List Customers API [1]. If you also want the total number, you can pass `include[]=total_count` in your request. In PHP, your code would look like this:

$customers = \Stripe\Customer::all(array("limit" => 1, "include[]" => "total_count"));
$nbCustomers = $customers->total_count;

As for the MRR that's not something we offer directly through the API at the moment. You'd need to calculate those numbers yourself using the List Charges API [2] to go through all the charges in your account and pass the `created` hash to limit the list to a specific month. You could also use the List All balance History API [3] to get a number that also includes refunds and such and not just the charges.

I hope this helps!
All the best,
Remi


--
You received this message because you are subscribed to the Google Groups "Stripe API Discussion" group.
To post to this group, send email to api-d...@lists.stripe.com.
Visit this group at http://groups.google.com/a/lists.stripe.com/group/api-discuss/.

To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss...@lists.stripe.com.

Ramya Poojari

unread,
Aug 20, 2015, 9:15:29 AM8/20/15
to api-d...@lists.stripe.com
Hi Remi,

Thanks for your immediate reply, I will try using above mentioned suggestions. Thanks a lot.

Peter Legierski

unread,
Aug 20, 2015, 1:02:22 PM8/20/15
to Stripe API Discussion
Hi Pinky,

Calculating MRR is actually a bit more complex than that. Remi's answer is really a Net Revenue calculation, not MRR - If you had just a single customer who paid $120 up front for a yearly subscription, your Net Revenue for that month would be $120 as seen in Charges API / Balance history API, but the correct MRR value is $10 (yearly $120 divided by 12 months).

There are services who can automatically calculate MRR for you [1], but if you want to do it yourself, here are the steps:
  • Fetch all currently active subscriptions
  • Normalise each subscription value to a month, so yearly are divided by 12, monthly stay as-is, weekly are multiplied by 4.3333
  • Make sure to apply any discounts
  • Sum up all the subscriptions
The resulting number will be your current MRR.

It's important to note that you should not include one-off charges in your MRR calculations, as they are not recurring in their nature. You should also not count trials into MRR as they don't generate any revenue yet. Overdue payments are up to you, but I would still count them in as long as the subscription is not expired.

Best,
Peter

Reply all
Reply to author
Forward
0 new messages