Optional analytics on public pages. No session recording. Support works either way. Privacy details
API reference
Change, disable or re-enable an endpoint.
/webhooks/:idChange the URL, events or description, or disable/re-enable the endpoint. Re-enabling resets its failure count.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | Yes | Webhook endpoint ID (we_…). |
| url | body | string | No | New HTTPS URL. |
| events | body | string[] | No | Replacement event list. |
| isActive | body | boolean | No | false disables; true re-enables. |
const response = await fetch(`${process.env.BOSPAY_API_BASE}/webhooks/we_example`, {
method: "PATCH",
headers: {
"Content-Type": "application/json",
"BOSPay-Version": "2026-09-23",
"X-API-Key": process.env.BOSPAY_API_KEY,
},
body: JSON.stringify({
"isActive": true
})
});
if (!response.ok) {
throw new Error(`BOSPay request failed: ${response.status}`);
}
const data = await response.json();Success
{
"id": "we_example",
"object": "webhook_endpoint",
"url": "https://merchant.example/webhooks/bospay",
"events": [
"invoice.paid",
"invoice.payment_detected",
"invoice.partial"
],
"environment": "sandbox",
"status": "enabled",
"secret": "whsec_… (returned once)"
}Validation error
{
"error": {
"type": "invalid_request_error",
"code": "validation_error",
"message": "A valid fiatAmount is required.",
"field": "fiatAmount",
"requestId": "req_3f0c9a1b2c4d5e6f7a8b9c0d"
}
}