How We Implemented Freemium for MMS Backup Using Stripe

Meghan Gill

#MMS#Business

We recently launched a free usage tier for MMS Backup, our online backup service for MongoDB. We bill for backups on a monthly basis via credit card using Stripe, a MongoDB-powered service that makes it easy for developers to build applications that accept payments on the web.

We wanted to offer a free usage tier so that customers could sample our backup service. To accomplish that, we decided to make any bill less than $5 complimentary. $5 would be enough to back up roughly 5GB with 100MB of oplog data. Once the bill exceeded $5, the customer would be charged the regular pay-as-you-go rate.

Our backup service uses Stripe’s subscription billing capabilities. We couldn’t find any documentation or case studies on companies using Stripe to offer a freemium product. With some help from Stripe’s engineering team (thanks Michael Schade!), we were able to find a solution that satisfied our requirements.

We investigated a few approaches before settling on using webhooks. At the completion of an invoice period, Stripe creates the invoice for the customer. We then receive an webhook for an "invoice created" event. When we receive this webhook notification from Stripe, we inspect the invoice. If the total bill is less than $5, we apply a negative invoice item in the amount of the invoice.

This approach enabled us to quickly launch our free usage tier and we hope that it will be helpful to others looking to do the same.

For more information, check out Stripe for your next app or start backing up your MongoDB deployment with MongoDB Management Service.