Sirwin
Sirwin
Money

How to accept BTC as payment on your site (outline)

By Aruno14 | aruno14 | 16 Dec 2021


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://bitpay.com/online-payments

(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 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:

 

How do you rate this article?

5



aruno14
aruno14

Some articles about crypto, mining and maybe stacking.

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.