sagemathinc / cocalc

CoCalc: Collaborative Calculation in the Cloud
https://CoCalc.com
Other
1.14k stars 207 forks source link

Implement target balance #7630

Open novoselt opened 2 weeks ago

novoselt commented 2 weeks ago

This is "the other direction" of minimum allowed balance and also related to automatic payments whenever balance falls below some user-set amount, but a bit different.

If I have a subscription and also use compute servers or paid LLMs, I probably do NOT want my balance to be completely used up by subscriptions and perhaps during any checkout at the store. So if I have a subscription for $10/month and my current balance is $5, but I set target balance to $20, then at the closing date I should be charged $25 - $10 goes to pay for the subscription and $15 to top up my balance.

The main point here is that automatic payments for subscriptions should not lead to exactly $0 balance in which case my disks are potentially going to be deleted. The scale may be different - I have $200 on the account, but my yearly subscription is $300, and it renews while I am on vacation...