My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

How to implement hourly billing in a SaaS application?

Mhe's photo
Mhe
·May 23, 2018

I'm working on a SaaS application with NodeJS. Its pricing model is similar to DigitalOcean's. Each user in my app has a balance. They will add credit to their balance before subscribing to plans.

I want to implement a cronjob, maybe with Agenda, to check the status of subscriptions, every minute and then decrease the balance.

Is my approach correct or not? What are the best practices?