Optional analytics on public pages. No session recording. Support works either way. Privacy details
Accept paymentsRecommended
Create a session on your server, redirect the customer, verify payment on the backend. Recommended starting path.
Hosted checkout renders asset selection, QR/address, expiry, and status. Your integration is: create session, redirect, verify webhook, retrieve invoice.
const response = await fetch(`${process.env.BOSPAY_API_BASE}/checkout-sessions`, {
method: "POST",
headers: {
"Content-Type": "application/json",
"BOSPay-Version": "2026-09-23",
"X-API-Key": process.env.BOSPAY_API_KEY,
"Idempotency-Key": "order-1048-attempt-1",
},
body: JSON.stringify({
"fiatAmount": 150,
"fiatCurrency": "ZAR",
"reference": "order-1048",
"expiresInMinutes": 15,
"restrictNetworks": [
"sepolia"
],
"metadata": {
"orderId": "1048"
}
})
});
if (!response.ok) {
throw new Error(`BOSPay request failed: ${response.status}`);
}
const data = await response.json();The session token is a checkout capability. It can select an asset and create the invoice. It cannot rotate keys, list organization invoices, or change destinations.
Checkout UI examples use a frontend language. Showing JavaScript.
const session = await fetch("/api/checkout", { method: "POST" })
.then((r) => r.json());
window.location.href = session.embedUrl;
// Do not mark the order paid from this redirect.const response = await fetch(`${process.env.BOSPAY_API_BASE}/invoices/inv_1048`, {
method: "GET",
headers: {
"Content-Type": "application/json",
"BOSPay-Version": "2026-09-23",
"X-API-Key": process.env.BOSPAY_API_KEY,
}
});
if (!response.ok) {
throw new Error(`BOSPay request failed: ${response.status}`);
}
const data = await response.json();