Last active
August 29, 2015 14:12
-
-
Save vikhyat/ec0f4c27ed21b092ca12 to your computer and use it in GitHub Desktop.
Hummingbird Recurring Billing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here's how it's going to look like from the end user perspective: | |
1 hour before my PRO membership ends, if I am on a recurring plan | |
Hummingbird will try to charge my credit card. If it succeeds | |
everything is good. If it fails my subscription will run out and | |
Hummingbird will try to charge my credit card again tomorrow, 3 | |
days from now and 5 days from now. I will receive an email from | |
Hummingbird if the charge is successful, and a different email | |
every time charging my card fails. | |
If I am not on a recurring plan I will get an email 1 day before | |
my subscription runs out urging me to get on a recurring plan. | |
From an implementation point of view: | |
We will be adding Sidetiq for recurring jobs. There will be a | |
number of jobs to handle this logic. | |
1. Hourly job that extends the subscription of every user whose | |
subscription runs out in the next hour. | |
2. Daily job that will handle credit card processing failure. It | |
will pick up users whose subscription ran out 1 day ago, 3 days | |
ago and 5 days ago. | |
3. Daily job that sends an email to all PRO members who are not | |
on a recurring plan, and whose subscription runs out in the next | |
24 hours. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks good, I still sort of feel like we should be relying on Stripe for this however.