There are two ways to take payments with BoreLine. The easy way needs no code at all, you share a payment link. The developer way uses our API for full control and automation. Most people start with links and never need more. Pick whichever fits you, you can always switch later.
If you can copy and paste a link, you can accept Bitcoin. No coding, no API key, nothing to install. This is the right path for most sellers.
Use the API when you want payments built into your own checkout, or you want your site to automatically unlock an order, grant access, or send a download the moment a payment confirms. This path needs a developer and a backend. Everything below is the developer way.
Before the steps, here is the whole flow in one breath, so the rest makes sense.
There is no BoreLine button to embed. Use any button that fits your design. It just needs to run a little code when clicked.
<button class="btc-pay-btn" onclick="payWithBitcoin()">
₿ Pay with Bitcoin
</button>
<style>
.btc-pay-btn {
display: inline-flex;
align-items: center;
gap: 8px;
background: #F0B429;
color: #0a0a0a;
font-family: inherit;
font-size: 15px;
font-weight: 600;
border: none;
border-radius: 8px;
padding: 14px 28px;
cursor: pointer;
transition: transform .15s, box-shadow .15s;
box-shadow: 0 4px 14px rgba(240,180,41,.25);
}
.btc-pay-btn:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(240,180,41,.4);
}
</style>
When the button is clicked, your website sends one request to BoreLine with your API key. This call must happen on your website's backend, never in the browser.
POST https://api.borelinepay.uk/api/invoice
Header: X-API-Key: your_secret_api_key
Body (JSON):
{
"email": "customer@example.com",
"tier": "starter",
"months": 1
}
tier is the product key you set in your dashboard, for example starter or pro, this is the only required field. email is optional, just a label so you can tie the payment to a customer or order on your side, BoreLine never emails anyone. months is optional and defaults to 1, useful if you sell access in multiples. You can also send an optional note or a metadata object to carry your own order id.
BoreLine replies with everything you need. The one field that matters most is the payment page link.
{
"invoice_url": "https://api.borelinepay.uk/pay/INV-...",
"amount_sats": 51275,
"fiat_amount": 29.00,
"currency": "EUR",
"expires_at": "2026-06-17T12:00:00Z"
}
Redirect the customer to invoice_url. That hosted page shows the amount, a QR code, and a Bitcoin address. The customer pays from any wallet. You build nothing for this page, it is fully handled for you.
You should not make customers wait while you watch the blockchain. Instead, give BoreLine a webhook URL in your dashboard settings, and we alert your site automatically the moment payment confirms.
You do not need to run a server. The only rule is that your API key stays in the private side of whatever platform you already use, the part a customer cannot see by opening their browser tools. Every platform below already has that private side. Here is exactly where to put the key and what calls what, in each case.
Once your products are set and your button calls the endpoint, your first invoice is live in minutes.
See plans and pricing →