Optional analytics on public pages. No session recording. Support works either way. Privacy details
Build & launch
Build a request, switch language, inspect success and failure responses, and simulate payments. Fixtures only — never mainnet.
Fixtures only. This workbench never submits to mainnet or sandbox.
const response = await fetch(`${process.env.BOSPAY_API_BASE}/invoices`, {
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",
"tokenSymbol": "USDC",
"chain": "sepolia",
"metadata": {
"orderId": "1048"
}
})
});
if (!response.ok) {
throw new Error(`BOSPay request failed: ${response.status}`);
}
const data = await response.json();{
"id": "inv_1048",
"object": "invoice",
"invoiceId": "inv_1048",
"status": "pending",
"environment": "sandbox",
"livemode": false,
"fiatAmount": 150,
"fiatCurrency": "ZAR",
"cryptoAmount": "8.42",
"tokenSymbol": "USDC",
"chain": "sepolia",
"paymentAddress": "0xinvoicePaymentAddress",
"paymentLink": "https://checkout.bospay.co/checkout/inv_1048",
"metadata": {
"orderId": "1048"
},
"expiresAt": "2026-09-23T18:42:00.000Z",
"createdAt": "2026-09-23T10:42:00.000Z"
}