Most of the people use Bitcoin as an investment, but it is also a currency !
If you want to accept payment in BTC on your website, there are mainly two ways:
- Using a dedicated service
- simple, but has fee on each transaction
- Doing all yourself
- complicated, but no transaction fee
Dedicated services
- https://www.opennode.com/
- Transaction fee: 1%
- https://bitpay.com/
- Transaction fee: 1%
- https://commerce.coinbase.com/
- Transaction fee: 1%
(Image from: https://bitpay.com/online-payments)
Doing yourself
Main steps are:
- Generating bill
- Creating a specific BTC address if needed
- Waiting client to send money
- Checking address transaction
- Generating a receipt
- Sending the product
- Converting BTC in another currency (USD, EUR,...) if needed
Checking address transaction
Two main methods:
- Using an API
- Using your own node
- Bitcoin Core: https://bitcoin.org/en/download
- Bitcore https://github.com/bitpay/bitcore
Using your own node
We only want to follow transaction's events, so we can use a pruned node (a node which does not save the full blockchain (400Gb)).
Bitcoin Core provide below JSON-RPC API:
Bitcore has some library to connect to it:
Β