recurring payment #29
Labels
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Total Time Spent: 5 hours 24 minutes
Due Date
realaravinth
5 hours 24 minutes
No due date set.
Dependencies
No dependencies set.
Reference: Hostea/dashboard#29
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
the payment must be set to be monthly instead of one shot
It is difficult to implement this feature within the MVP timeframe. I couldn't find any documentation related to recurring payments in
django-payments
docs, so I'll either have to write Stripe code myself or set up a cron job --- both difficult to implement within MVP timeframe.That said, the primitives for setting up monthly payments exist within the Dashboard.
Can't Stripe be instructed to do monthly payment, even if django-payment is unaware? Not having recurring payment is going to be problematic very quickly.
Not having feedback about recurring payment on the dashboard is less problematic: the customer will see the amounts are withdrawn monthly. And if the Gitea instance is terminated and django-payment does not know how to cancel a recurring payment, it can be done manually.
A contrario, requiring the users to make payment monthly will be inconvenient to them and it will also require work on the dashboard because it will be necessary to implement a "renew" workflow in addition to the "create" workflow that already exists.
What do you think?
Stripe does support recurring payments but instructing stripe is implemented within
django-payments
. I estimate I will require at least two more weeks to setup recurring payments.I found a related issue on
django-payments
and it looks like it will be a while before the library will have support for recurring payments.Agreed
The primitives to generate invoices for a billing cycle exist in the Dashboard. The easiest way to support recurring payments within the MVP timeframe will be implementing a management command, which can be scheduled to run on a daily basis using cronjob.
The command will:
i) Generate invoice, if one doesn't exist and send email reminder
ii) Compute overdue period and compare with overdue period tolerance(how late is late enough to terminate instance) and terminate if beyond tolerance
Good find. And indeed, looks like it is non trivial.
IIRC https://git.cyberia.club/cyberia/capsul-flask/ implements recuring payment and has support for stripe.
Ah, no it does not. It provisions in advance which is a simple workaround.
Sound good to me.
Generates invoices for VMs which enter a new billing cycle and sends notification email to VM owners.
This command can be run as many times as desirable but running at least once in a day is advisable.
Documentation and minimal tests are included.