Integrations ยท Event-driven
Receive real-time HTTP callbacks when payments complete, fail, or transactions settle. Register endpoints via the API and verify payloads with your webhook secret.
POST to /webhooks with your callback URL and subscribed events.
{
"url": "https://your-server.com/bitmessa/webhook",
"events": ["payment.completed", "payment.failed", "transaction.completed"],
"secret": "your_webhook_signing_secret"
}
Bitmessa sends an HTTP POST to your registered URL with a JSON body containing the event type and resource data. Your endpoint should:
200 OK within 10 secondsVerify incoming webhooks by computing an HMAC-SHA256 of the raw request body with your secret, then comparing to the signature header Bitmessa sends.
const crypto = require('crypto');
function verifyWebhook(rawBody, signature, secret) {
const expected = crypto
.createHmac('sha256', secret)
.update(rawBody)
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
);
}
{
"event": "payment.completed",
"timestamp": "2025-07-08T12:00:00Z",
"data": {
"id": "payment_abc123",
"status": "completed",
"currency": "BTC",
"amount": 0.001,
"ngn_amount": 1372
}
}