Optional analytics on public pages. No session recording. Support works either way. Privacy details
API reference
Change metadata or description.
/invoices/:invoiceIdChange metadata or description. Payment terms and status cannot be changed.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
| invoiceId | path | string | Yes | Invoice identifier. |
| metadata | body | object | No | Keys to set. A null value deletes that key; omitted keys are unchanged. |
| description | body | string | null | No | Internal note. |
const response = await fetch(`${process.env.BOSPAY_API_BASE}/invoices/inv_1048`, {
method: "PATCH",
headers: {
"Content-Type": "application/json",
"BOSPay-Version": "2026-09-23",
"X-API-Key": process.env.BOSPAY_API_KEY,
},
body: JSON.stringify({
"metadata": {
"fulfilment": "shipped",
"note": null
}
})
});
if (!response.ok) {
throw new Error(`BOSPay request failed: ${response.status}`);
}
const data = await response.json();Success
{
"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"
}Validation error
{
"error": {
"type": "invalid_request_error",
"code": "validation_error",
"message": "A valid fiatAmount is required.",
"field": "fiatAmount",
"requestId": "req_3f0c9a1b2c4d5e6f7a8b9c0d"
}
}