I want to create a website where users can pay with Bitcoin. However I want to create my own payment gateway because I do not want to rely on services like BitPay. I want a unique BTC address for every user where the users can send money to this wallet and then spend the coins on the site. I heard that it is possible with bitcoin-cli/bitcoind. I also have high skills in PHP and Linux so this isn’t a problem.
You can write your own php software that does RPC calls to your bitcoin node, see bitcoincore.org/en/doc/0.18.0 for more info– JBaczukJun 6, 2019 at 22:45
There are several solutions out there and currently the most hyped one is probably BTC-Pay. It also supports lightning, so you should be pretty future-ready.
If you're new to Bitcoin, I would advise you to play around btc wallet on testnet you could check mycelium for instance and get some btc via faucet. You need to understand that you don't need any third party for interacting with bitcoins, you just require a wallet. A wallet is a program that handle UTXOs, craft transactions and broadcast them to bitcoind nodes (or other compliant full node implementation), waiting for them to be mine. As you're developper, I highly recommend you to buy Mastering Bitcoin from Andreas M. Antonopoulos.
After than, you will simply design you're backend so that you can accept bitcoin payment, there is many open source project for your needs as btcpayserver or bitcore. I would suggest btcpayserver on your case, but both are "basically" bitcoind wrapper on steroids tailored for enabling applications on top of Bitcoin.
I am not new to Bitcoin. I know that I do not need Bitpay to accept them. However all tutorials I find only rely on Bitpay. I want a more technical answer which explains the steps I need to do to accept Bitcoin Jun 6, 2019 at 15:20
Did you check btcpayserver then ? It describes exactly what you need "Start Accepting Bitcoin Payments With 0% Fees & No Third-party" and this is basically an API you will interact with in PHP. Your goal is to accept bitcoin payment, not building a wallet.– onepixJun 6, 2019 at 15:31
I solved it by getting into the Bitcoin Core RPC interface.
I also did a talk about it in German here. My solution is completely independent of any 3rd party software.
Video looks interesting. Do you have this php code on github?– user103136Aug 18, 2020 at 23:09
1@Prayank Not all parts of it, only the wrapper. See the comments section in the video but as I said I only started with a PHP website that has a startpage, a login page and a secured page that only logged in users can view. Keep in mind that the wrapper I used in the video is not 100% complete, nor up-to date. Please use something that is actively maintained. For example Bitcoin.php Aug 19, 2020 at 11:35