hackerschoice / segfault

357 stars 41 forks source link

payment gateway #61

Closed SkyperTHC closed 1 year ago

SkyperTHC commented 1 year ago

Leonart/M1ndb0ggling are working on this.

Requirements:

  1. User has 'money on account' and SF deducts micro-payments or subscription fee from 'money on account'.
  2. Various payable services might be offered. We start with the 'normal' annual subscription but later may expand to charge for traffic, FOB deployemnt, dns usage, ...anything if we want.
  3. Money does not drive this. If we break-even then thats great. Otherwise it's fun to design something that works and is easy for the user.
  4. We are not going to download the blockchain. The preference is to use a service or bloom-filters.
  5. The hard work is fiddeling with nginx/cgi breakouts and the backend-server that charges the user's account and disables / enables the feature if and when cost occurs or the account runs out. SQLite is my choice for DB.
  6. Should be able to add 1 account to multiple servers (e.g. 1 user can have multiple servers and they are all charged to the same account).

A few random ideas about design (please update):

BTC will be the prime payment method (not my choice but we are at the mercy of the users). This should be the focus. All other cryptos are optional but let's hope we can extend this to ETH and XMR.

The user shall be able to pay only from his already running root shell. By that he will request curl http://1/pay (or something).

There is an ngingx running at http://1 (which is 0.0.0.1) with various cgi breakouts to other API requests (we are using the same ngingx method not just for payments).

It's what AWS and most cloud providers use. This is what the user is used to: using CURL to make a local request. ANyting else (ssh, web page) can be build on that API.

The requested webpage contains:

  1. Crypto Address where to pay to (including ascii QR code?)
  2. Current balance of account

A user can request more details and we can break this out like: curl http://1/pay/btc curl http://1/pay/stats ...

Misc:

  1. tiplink.io
SkyperTHC commented 1 year ago

We suck with money. Managing money is distracting. We want exciting projects and inspire clever thinking. Donations are welcome.