Written by Nicholas Brown.
You can accept Bitcoin payments easily, and you can do it without a middleman. There are two simple steps to accepting Bitcoin as a payment method without a centralized payment processor or bank:
- Create a Bitcoin wallet.
- Copy your wallet address and paste it on your donation or payment page. Usually, it is in the form of a ‘copy address’ button or some form of copy icon that looks like two sheets of paper. If not, then select the address and right click copy yourself.
A Bitcoin wallet address looks something like this: bc1qajv8up0208m2pf9tkkmx3ule7vqaffzkfeppxy.
You can use any of the following three options to make it easier for users to pay you with BTC:
- Copy and paste the address where it is needed.
- Create a QR code and place that where it is needed. Your wallet app may already create a QR code for you, and will let you copy it. Thankfully, Bitcoin Core wallet does all this for you and even provides a ‘Save Image’ option to save your QR code to an image file that you can upload to your website. Alternatively, screenshot the QR code from your wallet app, crop it, and upload it to your website or app.
- Create a payment link that will load the user’s wallet app and fill out your address and amount to be paid automatically.
How To Create A Bitcoin Payment Link
Example payment link: Pay With Bitcoin
The XDG link above is structured as follows:
bitcoin:address to pay to
The demo link above uses the following code:
<a href="bitcoin:bc1qajv8up0208m2pf9tkkmx3ule7vqaffzkfeppxy">Pay With Bitcoin</a>
That link will load a Bitcoin wallet and fill out the address only. The user can then fill out the amount they want to send in the wallet themselves. Now, let us try creating a payment link that fills out your wallet address and the amount automatically. This is useful if the user chooses to click a donation link such as ‘Donate 0.001 BTC’ so they don’t have to fill out anything themselves, or if they are buying something and that is the exact amount due:
The structure of the link above is as follows:
‘amount’ is the parameter for the amount of BTC you want to send (not the dollar amount). Here is the code used above:
<a href="bitcoin:bc1qajv8up0208m2pf9tkkmx3ule7vqaffzkfeppxy?amount=0.001">Pay 0.001 BTC</a>
You can also add a label to the transaction if the user uses Bitcoin Core or other wallets that support that parameter. Just add the following to the end of the link:
&label=description of payment
Example usage for a Bitcoin donation link:
<a href="bitcoin:bc1qajv8up0208m2pf9tkkmx3ule7vqaffzkfeppxy?amount=0.001&label=Donation to charity name">Pay 0.001 BTC</a>
You’ll see the label show up in the description or label field of your wallet if you click it: Donate
Create a Bitcoin Payment Button
If you want to create a Bitcoin donate button, or Bitcoin payment button, you can use the standard HTML button code, but using the same URL structure above.
Here’s an example of a Bitcoin payment button that will fill out the address the user would pay to:
If you want to use a payment processor that converts BTC to dollars automatically, you can use a centralized payment processor such as BitPay that will deposit the money to your bank account. If you’d like to use a payment processor that doesn’t involve a middleman, there is BTCPay.