Open AbhiAgarwal opened 7 years ago
stripe has a way of getting current balance of a user. we can display it and mark the user as having a downgraded plan until the credits expire? just a little too complicated.
we can have a webhook coming from stripe to give us updates on when these values update?
OR we can try and see what the balance of the user is and try calculate how many months they'll use it for. Then we can just email them to say how many months will be free for them. Either case would work...
--
Ideally not store anything. We can get details from stripe as need be. Get the stripe balance as the user visits the billing page
let stripe handle all the arithmetic and keeping track of balance when switch is made. either when plan is larger or smaller. but, will have to get some kind of quote for the user about what happens going forward.
the amount probably can be generated ourselves (with rough estimates of change).
issue with switching from monthly to yearly or yearly to monthly (not possible without cancelling...)
probably have to write own balance / invoice generator. a script to take current plan, and new plan. it has to split out what they'll save (depending on what plans they switch to monthly -> yearly or yearly -> monthly). We could just ban switching from yearly -> monthly. Since we don't give them money back?
if plan == yearly
you can only show yearly plans to switch to
if plan == monthly
show all plans that you can upgrade to
we don't refund. you'll get the credits for next month