Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fiat payment #638

Open
36 of 38 tasks
rawdaGastan opened this issue Dec 1, 2024 · 2 comments
Open
36 of 38 tasks

fiat payment #638

rawdaGastan opened this issue Dec 1, 2024 · 2 comments
Assignees
Labels
feature New feature or request
Milestone

Comments

@rawdaGastan
Copy link
Collaborator

rawdaGastan commented Dec 1, 2024

Requirements

  • Remove VMs and IPs from quota
  • Remove quota and introduce balance and voucher balance for user
  • VMs will have a state (in progress, success, failed)

Payment scenario

Vouchers

  • user model will have a voucher balance can be used to deploy
  • Voucher balanced is charged only from vouchers
  • when a voucher is applied, voucher balance should be updated
  • Once user has applied a voucher we should settle pending payments (invoices)
  • Check If voucher user has enough money to continue his/her deployment (If no we should inform her/him that we will delete the VM after x months)

Admin

  • Admin will set prices for vms and k8s
  • list all invoices

Periodic Invoices

  • User can get, pay an invoice
  • support balance, voucher and card methods to pay invoices and the ability to mix between them
  • User can list invoices
  • Every month, we should create an invoice for each user with active deployments (containing all vms consumed during the month)
  • Invoices are charged from balance
  • If no balance? invoices are paid from user default payment method - If no card balance? use another card
  • If no default card for user, check all user cards
  • Settle invoices according to their total cost (sort)

Cards

  • Each user should add valid card
  • cards should be unique
  • we should verify cards (I think stripe do?)
  • Old users should provide their credit card too, except they use vouchers
  • user cannot delete all cards while having active deployments
  • Add an option to add more than one credit card
  • User can list his cards
  • User can set default card
  • Once user has added a new card we settle pending payments (invoices)

User can deploy?

  • When user has a valid card
  • When user has enough voucher balance (excluding other active deployments)

VMs price increase

  • If an admin increased the price of a vm, old vms should be paid according to its old prices
  • new vms should be paid according to new prices
  • save prices with each deployment

Balance

  • Each user can charge his balance
  • Once user has charged his/her balance we settle pending payments (invoices)
  • Debt balance is updated every month with total usage of deployments

Delay

  • If the user didn't pay for his/her deployment - no credit (we will remove it after 3 months)
  • If the user didn't pay for his/her deployment (no credit), a reminder email will be sent every week including his invoice

Notes

  • DB will record vms/hr used per user
  • VM/K8S will have around 6 items (small/medium/larger with/without public IP)

Investigation

  • stripe usage
  • alternative API

Questions

  • should I allow user to delete Invoices? (No)
  • what if user with voucher money didn't delete the vm at the end of the month? should we delete it? (After grace period we will delete it)
  • should we add if invoice paid using voucher balance?
  • should we check debts on adding cards?
  • should we add customer support chat?
@rawdaGastan rawdaGastan added the feature New feature or request label Dec 1, 2024
@rawdaGastan rawdaGastan added this to the 1.4.0 milestone Dec 1, 2024
@rawdaGastan rawdaGastan self-assigned this Dec 1, 2024
@rawdaGastan
Copy link
Collaborator Author

For updates on this issue you can find it through the checkboxes (I check what is done). I also update it with more requirements through working

This was referenced Dec 17, 2024
@rawdaGastan
Copy link
Collaborator Author

rawdaGastan commented Jan 6, 2025

for invoices part:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant