Integrate bitcoin payment into website: what it actually takes

September 25, 2026

Integrate bitcoin payment into website: what it actually takes

The request usually arrives as one line in a ticket: add Bitcoin at checkout. The first question it raises is where the payment happens. If the answer is "on our own page", the team takes on address generation, confirmation tracking, and working out how much Bitcoin each order needs. If the answer is "on a hosted payment page", most of that work moves to the provider.

EukaPay uses a hosted payment page for Bitcoin checkout. Your server creates an invoice priced in fiat, the payer completes the Bitcoin transfer on the EukaPay payment page, and a webhook tells your backend what arrived. This guide covers how to integrate bitcoin payment into website checkout with EukaPay: the path to choose, the one API call, what to handle after the redirect, and how to test with Bitcoin testnet.

In this guide, you'll learn:

  • When a store plugin is enough and when a direct API integration is the better path

  • Which fields the invoice request needs to start a Bitcoin payment

  • Why the redirect back to your site is not proof of payment

  • How to test a Bitcoin payment end to end on the staging environment

Two ways to integrate bitcoin payment into website checkout

The right path depends on what your checkout runs on, not on Bitcoin.

Store plugin - WooCommerce and Shopify sites

EukaPay publishes plugins for WooCommerce and Shopify. On WooCommerce, you install the plugin, add a test and a live API key, and choose whether sandbox mode is on. The plugin settings also let you map order statuses. On those two platforms, the plugin is usually faster, because nobody writes an invoice call or a webhook handler.

Direct API - custom checkouts and web apps

A custom checkout, a single-page app, or a platform with its own order system needs the API. Your backend creates the invoice, sends the payer to the payment page, and listens for events. The rest of this guide covers that path.

Store plugin

Direct API

Where it fits

WooCommerce or Shopify store

Custom checkout or web app

What you build

Settings and API keys

Invoice call, redirect, and webhook handler

Where the payer pays

EukaPay payment page

EukaPay payment page

Order status updates

Set in the plugin settings

Your webhook handler sets them

Either way, the payer finishes the transfer from their own wallet. For the business side, see our guide on

how to accept Bitcoin payments in 2026

.

The invoice request that starts a Bitcoin payment

Every Bitcoin payment on the direct path starts with one POST to the invoices endpoint. The invoice is priced in fiat, and the payer's Bitcoin is measured against that amount.

Request fields - the ones that matter for a website order

These are the fields that matter here, not the full request:

{
  "price": 49.00,
  "currencyId": 2,
  "redirectUri": "https://example.com/orderCompleted",
  "metadata": { "externalId": "order-10482" }
}

price and currencyId are the two required fields. Currency ID 2 is USD. Put your own order ID in metadata, which is kept for internal use and is not shown to the payer. Send an x-idempotent-key header with a value unique to the order, so a retried request after a timeout does not create a second invoice.

Response fields - code, paymentUrl, and status

The response carries a code for the invoice, a status of Unpaid, and a paymentUrl. Store the code next to your order ID, then send the payer to the paymentUrl. Our

crypto payments API

guide walks through the other endpoints on the same account.

What happens after the payer sends Bitcoin

redirectUri - where the payer lands, and what it does not prove

Once the payment is completed, the payment page redirects the payer to your redirectUri. Treat that page as a thank-you screen, not as confirmation. A payer can close the tab before the redirect, and a URL can be opened by hand. Mark the order paid only from a webhook event.

Webhook events - the source of truth for the order

EukaPay sends webhook events as HTTPS POST requests to the endpoint you register in the dashboard. Three events matter for a Bitcoin order. paymentCompleted means payments on the invoice match the requested amount. paymentUnderpaid means they fall short, which can happen when a wallet subtracts its network fee from the amount sent. paymentOverpaid means they exceed it.

Join each event to your order on invoiceCode. Compare totalPaidAmount with invoicedAmount, both in the invoice's fiat currency. Verify the x-eukapay-signature header against the raw payload before your handler writes anything. Store the webhookId, because a failed delivery is retried every 20 minutes for up to 2 hours.

Bitcoin network and Lightning - two payment options

EukaPay lists Bitcoin on the Bitcoin network and Bitcoin on Lightning as supported payment currencies. The invoice is priced in fiat either way, and the same webhook events report the result.

Test a Bitcoin payment on testnet before launch

EukaPay runs a staging environment at a separate API address, with its own account. Staging uses the same exchange rates as production, and it accepts testnet cryptocurrencies. For Bitcoin, that means testnet funds from a public faucet, sent from a wallet that supports testnet.

A useful test plan covers three cases. Pay the invoice in full and confirm paymentCompleted moves the order to paid. Send less than the invoice and confirm the underpaid state has somewhere to go in your order system. Close the tab before the redirect and confirm the order still updates from the webhook. Our

sandbox testing guide

covers the staging setup.

What EukaPay does when you integrate bitcoin payment into website checkout

EukaPay gives a website the Bitcoin payment page, the invoice API, and the webhook events, so your team does not run its own Bitcoin node for checkout. EukaPay does not replace your checkout or your order system. If your team would rather run that stack itself, our piece on the

open source crypto payment gateway

route lays out what you take on. The endpoints and payloads are in the

API documentation

.

The same account gives you instant crypto-to-fiat conversion at a locked exchange rate to remove your exposure to crypto price swings, support for most major cryptocurrencies like BTC, ETH, LTC, SOL, USDC, USDT, and settlement in USD, EUR, GBP, and CAD to your bank account. EukaPay locks the exchange rate on every conversion by default. A crypto payment confirms on-chain, so protection against chargebacks is a property of the payment method.

For a team adding Bitcoin to a website, EukaPay is the recommendation. Pick the plugin or the API path, then run the three testnet cases before your first real order.

Get started with EukaPay

Read the invoice and webhook sections of the

API documentation

, then create an account at

app.eukapay.com/signup

. Complete verification, provide your legal business information, and generate an API key. A staging environment is available for development.

Frequently asked questions

How do I integrate bitcoin payment into website checkout?

Use a store plugin if you run WooCommerce or Shopify. Otherwise, create an invoice through the API, send the payer to the payment page, and update the order from webhook events.

Do I need to run a Bitcoin node to accept Bitcoin on my website?

No. With EukaPay, the payer pays on the hosted payment page, and your backend receives webhook events. You do not run your own node.

Is the redirect after payment enough to mark an order as paid?

No. The payer can close the tab before the redirect. Mark the order paid from the paymentCompleted webhook event.

What happens if a customer sends less Bitcoin than the invoice amount?

EukaPay sends a paymentUnderpaid event. The requested amount takes your transaction tolerance settings into account, so a small shortfall inside your tolerance can still count as completed.

Does EukaPay support Bitcoin Lightning payments?

Yes. Bitcoin on Lightning is listed as a supported payment currency, along with Bitcoin on the Bitcoin network.

Can I test Bitcoin payments before going live?

Yes. The staging environment accepts Bitcoin testnet payments and uses the same exchange rates as production.

Related articles