Post
Topic
Board Development & Technical Discussion
Re: How to accept crypto coins on my website
by
lightningslotmachine
on 11/10/2018, 13:46:30 UTC
Just wondering, wouldn't be the cheaper to code a rather simple solution like this:

  • generate a new receiving address for the customer, which he can use to pay (the private key can be hashed and stored)
  • have a background process in the server which checks the amount paid received enough confirmations
  • send payment confirmation to the customer

Or there is some problem with it / not so easy as it seems?

A lot of third party sites keep your private keys and charge you fees. I would recommend that you set up a virtual machine with btcPayServer yourself.
Check it out here:

https://github.com/btcpayserver/btcpayserver

Its open source, it's free, you hold your own private keys (can use a hardware wallet and just set the xpub exported from trezor for example).
It also support the lightning network.

You can deploy it on azure with just one click here:

https://github.com/btcpayserver/btcpayserver-doc/blob/master/AzureDeployment.md

Don't let anyone else handle your payments or private keys!

well, this seems to be something quite a neat solution

It works quite well. I have used it myself on my site: https://www.lightningslotmachine.com/, if you click on one of the "buy spins" buttons you can see how it looks like.

I have only set up bitcoin lightning payments, but you can also accept on-chain payments of course.