vendredi 24 février 2017

Implement billing email reminders

I would like to implement automatic email notification system for recurring billing in Nodejs. E.g. when subscription is about to expire in 5 days or in 24 hours I want to send an email reminder for a user.

I am using Sendgrid as mailing service. Sending an email is a easy task. Question is what is the best practice for implementing such workflow.

I imagine that cronjob could be setup to run every hour or so. Script is executed that finds all the users with subscriptions which expires in 5 days or 24 hours. Doing so would lead to sending notification every time cronjob is run. I have to track which users are notified already to avoid duplicated emails.




Aucun commentaire:

Enregistrer un commentaire