/ Docs
Integrate in 5 minutes
Accept Bitcoin on your site. We host the checkout, derive a fresh address from your xpub, and watch the chain. Funds land in your wallet directly — we never touch the money.
01 — Grab your API key
Create a merchant account, then copy your sandbox key from Settings. It looks like
sk_sandbox_…02 — Add a payout wallet
In Settings, paste your BIP84 xpub (zpub…). We derive a fresh address per checkout — the private keys never leave your wallet.
03 — Create a checkout session
From your server, POST to
/api/public/sessions. We return acheckout_url— redirect the customer there.JavaScript// On your server (Node, Bun, Deno, edge — anywhere) const res = await fetch("https://www.bitsettle.co/api/public/sessions", { method: "POST", headers: { Authorization: `Bearer ${process.env.BITSETTLE_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ amount: 4999, // pence / cents currency: "GBP", customer_email: customer.email, success_url: "https://yourstore.com/thanks", cancel_url: "https://yourstore.com/cart", metadata: { order_id: order.id }, }), }); const { checkout_url } = await res.json(); // Redirect the customer: return Response.redirect(checkout_url, 303);curlcurl -X POST https://www.bitsettle.co/api/public/sessions \ -H "Authorization: Bearer sk_sandbox_..." \ -H "Content-Type: application/json" \ -d '{ "amount": 4999, "currency": "GBP", "customer_email": "buyer@example.com", "success_url": "https://yourstore.com/thanks", "cancel_url": "https://yourstore.com/cart" }'Response
JSON{ "id": "cs_8fK2pQrLmN4vXz9aBdC1eF", "object": "checkout.session", "amount": 4999, "currency": "GBP", "status": "open", "checkout_url": "https://www.bitsettle.co/c/cs_8fK2pQrLmN4vXz9aBdC1eF", "expires_at": "2026-06-09T23:00:00.000Z" }04 — Handle the redirect
After payment, the customer is sent to your
success_urlwith?session_id=cs_…appended. Cancellations go tocancel_url.
Request reference
POST /api/public/sessions
| Field | Type | Required |
|---|---|---|
| amount | integer (minor units) | yes |
| currency | GBP | USD | EUR | no (GBP) |
| success_url | string (https) | yes |
| cancel_url | string (https) | yes |
| customer_email | string | no |
| metadata | object<string,string> | no |
Testing on another project
- Drop a "Pay with BitSettle" button on any site.
- On click, hit your own server which POSTs to
/api/public/sessions. - Redirect the user to the returned
checkout_url. - Watch the session land in your Transactions dashboard and BTC arrive in your wallet.
Sandbox keys simulate sessions · live keys move real BTC on mainnet