Payment Tools

Payment Tools

How to Add a Bitcoin Payment Button to Your Website

A practical guide for U.S. businesses and individuals who want to add a bitcoin checkout button to their site, from hosted widgets to self-custodial options.

How to Add a Bitcoin Payment Button to Your Website

Adding a bitcoin payment button to your website is, practically speaking, a 30-minute job for most platforms. The harder question is which approach fits your situation, because the tradeoffs between custody, fees, and technical lift are real.

What a bitcoin payment button actually does

At a basic level, a bitcoin checkout button generates a payment request, usually tied to a specific USD amount converted to BTC at the moment of checkout, and gives your customer a wallet address (or QR code) to send funds to. When the transaction confirms on-chain, the button provider notifies your site.

That notification mechanism is where providers differ most. Hosted processors handle it server-side and webhook your backend. Self-custodial tools like BTCPay Server run the listener themselves, on infrastructure you control. Both approaches work; they just put different things on your plate.

One thing worth clarifying up front: from an IRS standpoint, accepting bitcoin is a taxable event for your customer (they're disposing of property), and it may be for you too depending on how you handle it. This article is educational, not tax or legal advice. The rules in this area change, so confirm current IRS and FinCEN guidance before you go live.

The two broad paths: hosted vs. self-hosted

Hosted processors are the easier starting point. You sign up, get an API key or a snippet of embed code, and drop a button on your product page. The processor converts the incoming BTC to USD (if you want), handles the exchange rate lock, and deposits dollars to your bank account on a schedule. You never touch crypto directly.

The obvious downside is fees. Typical processor fees run 0.5%--1% per transaction, and some take a spread on conversion. For high-volume sellers that adds up. There's also a counterparty: you're trusting the processor to custody funds between the payment and the settlement.

Self-custodial options put you in direct receipt of the bitcoin. BTCPay Server is the most widely used open-source option here; it runs as a self-hosted application and lets you generate payment buttons without any third-party intermediary. You pay no per-transaction fees beyond the bitcoin network fee. The tradeoff is that you manage your own keys and run your own server, which is meaningful operational overhead.

For context on how these categories compare across factors like KYC requirements and settlement speed, see our breakdown of custodial vs. self-custodial bitcoin payment tools.

How to add a hosted bitcoin payment button

The mechanics vary by processor, but the general flow is consistent:

  1. Create an account and complete any required identity verification. U.S. processors are generally required to collect KYC information under FinCEN's money services business rules.
  2. In your dashboard, find the "payment button" or "payment link" generator. You'll set a fixed price (in USD), a product name, and a redirect URL for after payment.
  3. Copy the generated HTML snippet. It's usually a <form> element with a hidden input for the amount and a submit button.
  4. Paste it into your site's HTML where you want the button to appear. On WordPress, that goes in a Custom HTML block. On Shopify, it goes in the relevant section template. Static sites can drop it anywhere in the page markup.
  5. Test with a small transaction before going live.

Most processors also offer a JavaScript widget that renders a payment modal inline, so customers don't leave your page. This tends to convert better than a redirect.

Setting up BTCPay Server (self-custodial path)

BTCPay Server takes more setup but removes the processor entirely. You'll need:

  • A server to run it on (a $6/month VPS works; some hosts offer one-click BTCPay installs)
  • A domain and SSL certificate
  • A bitcoin wallet that supports xpub key export (most hardware and software wallets do)

Once BTCPay is running, you connect your wallet by pasting in the xpub key. BTCPay derives fresh addresses for each invoice without ever seeing your private keys. From there, the "Pay Button" generator in the dashboard produces an embed snippet much like a hosted processor's, except all the payment detection logic runs on your own server.

The BTCPay documentation covers the full setup, and their Mattermost community is active if you hit issues. Expect to spend a few hours the first time.

Matching the button type to your platform

PlatformEasiest approachNotes
WordPress / WooCommercePlugin from a hosted processorMost major processors publish WooCommerce plugins that handle the button automatically
ShopifyPayment provider integration or external checkout linkShopify's native checkout doesn't support bitcoin directly; external links work as a workaround
Static site (HTML/CSS)Embed snippet from hosted processor or BTCPayNo backend required for simple use cases
Custom web appAPI integrationMore flexible; you call the processor's API and build your own UI
Self-hosted with full controlBTCPay ServerBest choice if you want zero fees and no third-party custody

For a broader look at how these tools stack up, see the best bitcoin payment processors for U.S. businesses.

Tax and compliance basics for U.S. sellers

A few practical points, without getting into specifics the IRS might change by the time you read this:

  • When a customer pays you in bitcoin, you've received property at its fair market value in USD at the time of the transaction. That's your gross income, just as if they paid in dollars.
  • If you immediately convert to USD through a processor, your gain or loss on the conversion is typically very small (seconds of price movement). If you hold the bitcoin, the tax situation gets more complex.
  • Sales tax rules apply the same way they would for any transaction; the payment method doesn't change what's taxable.
  • If you accept a meaningful volume of crypto payments and you're not already using a processor that handles reporting, you'll want accounting software that ingests bitcoin transactions and calculates cost basis.

FinCEN's rules on money services businesses are worth understanding if you're handling large volumes or operating as an intermediary rather than just accepting payment for goods or services. The thresholds and definitions here are where most compliance questions come up.

If you're also thinking about in-person payments, the considerations shift a bit. Our guide on accepting bitcoin at the point of sale covers the hardware and workflow differences.

FAQ

Do I need to register as a money services business to accept bitcoin on my website?

Generally no, if you're accepting bitcoin as payment for your own goods or services. MSB registration under FinCEN applies to businesses that transmit money or exchange currencies for others. But this is a legal question with fact-specific answers, so check with an attorney if you're unsure about your situation.

What exchange rate does the customer pay?

With hosted processors, the rate is typically locked at the moment the invoice is generated, giving the customer a window (often 15--30 minutes) to send the exact amount before the price expires. BTCPay Server works the same way. The rate comes from an exchange rate feed the processor or BTCPay pulls in real time.

What happens if a customer underpays or overpays?

Most processors handle this through their dashboard. Underpayments can be marked as partial and either accepted or refunded, depending on your settings. Overpayments are usually flagged for manual handling. With BTCPay Server you configure this behavior yourself.

Can I accept bitcoin without converting it to dollars?

Yes. Self-custodial setups let you receive bitcoin directly. Some hosted processors also offer a "no conversion" settlement option, though they may still charge fees. Be aware that holding bitcoin means your effective USD revenue fluctuates with price.

Is a bitcoin payment button secure?

The button itself is just HTML that generates an invoice. Security risks are mostly around your site's general hygiene: HTTPS, no malicious scripts that could swap out wallet addresses, and sensible server permissions if you're running BTCPay. The bitcoin network itself handles transaction validation.

← Back to all guides