How to accept Bitcoin payments on your website

To accept Bitcoin on a website you need a fresh address per order, something that watches the blockchain, and a way to move the coins to your wallet once they are safe. NoncePay does all three with one request: you get an address, your customer pays it, and after one confirmation the BTC is forwarded to your own wallet.

Bitcoin at a glance

RouteMinimum paymentConfirmationsTime to your walletYour wallet address
btc0.00008 BTC1about 10 minutesnative SegWit (bc1…) or legacy

Ten minutes is the average Bitcoin block time; a block can come sooner or later. A payment is detected once it is in a block, so on Bitcoin the pending=1 and pending=0 callbacks arrive close together. If your customers need a faster answer, offer USDT or USDC on a fast network next to BTC.

1. Create an address for the order

curl "https://api.noncepay.app/btc/create/?callback=https%3A%2F%2Fshop.example%2Fpaid%3Forder%3D1042&address=bc1qyourwallet&pending=1"

The response's address_in is the address your customer pays. The same callback URL always returns the same address, and the address never expires.

2. Ask for the right amount

curl "https://api.noncepay.app/btc/convert/?value=120&from=usd"
curl "https://api.noncepay.app/btc/qrcode/?address=ADDRESS_IN&value=0.0012"

The QR code carries the address and the amount (payment_uri in the response), so the customer does not have to type either.

3. Get notified

Your callback URL is called when the transaction is found in a block (pending=1, if you asked for it) and again with pending=0 once it has been forwarded, with value_coin, value_forwarded_coin, fee_coin, txid_in and txid_out. Verify the x-ca-signature header with the key from /pubkey/, then answer *ok*. The callback reference lists every field.

What happens to the coins

Each payment is forwarded in one transaction that pays your wallet and our fee together. The fee is 1.25% of the payment, and never less than 546 satoshis, because a smaller output would be dust the network refuses to relay. The Bitcoin network fee of that transaction comes out of the payment; /btc/estimate/ returns its current value.

Questions

Do I need to run a Bitcoin node or BTCPay Server? No. We watch the chain and forward the payment. You only need a wallet that can receive BTC.

Can a customer pay with Lightning? No. NoncePay accepts on-chain BTC. BTC is also accepted as a token on Tron (trc20/btc) and as BTCB on BNB Smart Chain (bep20/btcb), which confirm faster.

What if the customer sends too little? A payment below the minimum is recorded but not forwarded. Above the minimum, every payment is forwarded and reported with the exact amount received: compare value_coin with the order total in your callback handler.

Is one confirmation safe? It is what most merchants accept for everyday amounts. An unconfirmed transaction is never reported: the payment is only seen, forwarded and confirmed to you once it is in a block.

More guides