With subscription services more popular than ever, you might want to give this revenue model a try. But how do you begin to create a subscription service?
In this article, I’m going to be talking about all the technical aspects necessary to create a subscription service, and I will list all the things you’ll need to get your service up and running.
I will reflect on my first-hand experience building Usophy’s infrastructure so that you can learn from my mistakes.
The basics of a subscription service
You offer a service to your users, in exchange for a monthly payment (or any other recurring period). So long as they keep paying, they can keep using your service.
Sounds pretty simple, so let’s see what you’ll need to do this:
- Your actual service: you have to offer some value to your users, or they simply won’t subscribe! I won’t cover this part as I assume that if you’re reading this you have something in mind!
- Authentication: you need to be able to identify your paying users in order to selectively allow them to use your service
- Payments: you need a way to charge your users on a recurring basis.
- User settings: you must allow your users to change their payment details, and update or cancel their subscription at any time.
Minimum Viable Product
So you’re still with me. Your idea seems like a winner and you’d like to try it out. The list above didn’t scare you! You’re thinking “Where do I sign up?”.
Start by building an MVP (short for “minimum viable product”). Here’s what you’ll need:
- Database: you’ll need one to store user data. And probably you’ll need it for your actual service as well.
- Backend: you should go for something simple. A NodeJS Express app that exposes a REST API will do. I recommend this boilerplate which already comes with authentication set up with Passport.js.
- Frontend: again, try to keep it standard, a React App is your best bet. I don’t have a boilerplate to suggest here. I find them all too cluttered and usually, I just set the project up myself. Maybe I’ll make one in the future.
- A server to run the backend and serve the frontend code from. More on this later!
- A payments gateway: I’ll talk about this one more in detail later on.
Where do I host my subscription service?
You could get a hosted MongoDB database for cheap (even free to begin with) at MongoDB Atlas. I’ve used it for Usophy and it’s quite comfortable, far better than running your own setup on EC2.
Backend and Frontend
Until you have significant traffic, I’d say you are best off getting a free tier machine from AWS EC2, you can have a t2.nano instance for free for the first year, and after that, it’ll cost you some 10$ per month.
In the past, I’ve made the mistake of thinking about scalability from the beginning and spent thousands on infrastructure that was way overkill. I’d start as small as possible and worry about scaling when the problem comes.
On your EC2 machine, you can host your backend. You can use pm2 for automatic deploys, even integrating it in your CI pipeline.
You should write a simple CI pipeline because that will save you a lot of time. I’ve used GitLab CI a lot in the past and find it complete and very cheap (free in fact!). It goes without saying you have to version control your code, I’d suggest you use GitLab for that as well.
Your frontend may be better off hosted on AWS S3, it’ll probably be cheaper and faster than hosting it on your EC2 instance as well. Don’t forget to use a CDN! Cloudflare or AWS Cloudfront are both great!
For accepting payments, problem #1 is which provider to choose. I’ve used Braintree in the past and while I think it’s great, allowing you to build the most complex billing logic you can imagine, it’s pretty complicated to set up compared to alternatives such as Stripe. The latter you could set up and have running in days, as opposed to weeks for the former.
If I were to make a subscription service today, I’d also consider payment services such as Recurly, which make implementation a lot simpler and handle a lot of the subscription logic for you. Depending on how complex your service is, this may be a good option.
As part of your journey to create a subscription service, you’ll need to get a domain name. There are a lot of ways to purchase domains, and I’ve tried many of them. By far the best is AWS Route 53. Pricing is the cheapest available, and there are no hidden fees, no up-selling of other “useful” products and so on.
I’ve written about the basic things you need to develop a basic subscription service. As more things come to my mind I will come back to this article and update it.
Check out my other articles to find out about mailing lists, analytics, and more! Sign up for my newsletter to keep updated.
If you need a hand, contact me!