Webhooks & events
Sendjoor POSTs a signed JSON event to your HTTPS endpoint when something you care about happens.
Endpoints are per environment
Register endpoints in the dashboard under Webhooks. An endpoint registered while the switch shows Test receives only test events; a Live endpoint only live events. Each endpoint has its own signing secret. You can edit the URL (re-checked), choose which events it receives, pause it, rotate or reveal its secret, send a test event, and remove it (permanent; its delivery history is kept).
URLs must be public https:// on the standard port with no credentials in them. Private, loopback and metadata addresses are refused — at registration and again at every delivery — and redirects are never followed.
Event catalog
| Event | Sent when |
|---|---|
charge.settled | A charge you created (API or dashboard) is confirmed by the provider and posted to the ledger. |
charge.failed | The rail declined a charge (in the sandbox: amount 200). Nothing was taken. |
charge.expired | The transfer window closed without full payment. Also sent for a payment-link checkout that lapsed. |
payment_link.completed | A payment through one of your payment links is confirmed and settled (sent instead of charge.settled). |
kyc.verification.initiated | A customer you are linked to started verification. |
kyc.otp.required | A bank code is needed to open their account. |
kyc.verification.completed | Their identity checks finished. |
kyc.verification.failed | Their identity could not be confirmed. |
kyc.verification.approved | They are verified. |
kyc.review.required | An additional security check is open. |
kyc.identity.mismatch | Submitted details differ from the identity record. |
kyc.aml.flagged | Screening needs a person to look. Not a confirmed match. |
kyc.restriction.applied | Their account has limited access. |
kyc.restriction.cleared | That limit was lifted. |
kyb.verification.approved | Their business passed CAC verification. |
bank_account.provisioning | Their bank account is being opened. |
bank_account.provisioned | Their bank account is active. |
bank_account.provisioning_failed | The bank could not open it; Sendjoor is handling it. |
webhook.test | Only when you press “Send test event” — never for real activity. |
These are all the developer events that exist; each is produced by a real status change in Sendjoor, never by a browser. There is no refund, reversal or payment-link expiry event (those operations are not available).
Payload
Every event has an id (also in the X-Sendjoor-Event-Id header), a type, the environment, a data object and a timestamp. data carries the same facts as GET /v1/charges/{id} — including your reference — plus chargeId and a lower-case status (success, failed, expired). The id is derived from the event type and the charge, so the same fact always arrives under the same id. Payloads never contain API keys or signing secrets.
{
"id": "evt_9f2c41d07b3a5e8c1d2f6a0b4e7c9d13",
"type": "charge.settled",
"environment": "live",
"data": {
"chargeId": "6f0b6f0c-2a1e-4bde-9a43-8b2f1d3c9e21",
"reference": "ORDER-2026-1042",
"providerReference": "9012345678",
"status": "success",
"settled": true,
"amountKobo": 2500000,
"feeKobo": 10000,
"totalKobo": 2510000,
"currency": "NGN",
"channel": "bank_transfer",
"mode": "LIVE",
"environment": "live",
"title": "Order 1042",
"description": "Payment for Order 1042",
"customerEmail": "buyer@example.com",
"paymentUrl": "https://sendjoor.com/pay/chk_live_Q2xh…",
"settledAt": "2026-10-13T12:04:10.000Z",
"createdAt": "2026-10-13T12:00:00.000Z",
"metadata": { "orderId": "1042" }
},
"timestamp": "2026-10-13T12:04:10.000Z"
}Verifying signatures
Each delivery carries X-Sendjoor-Signature: t=<unix seconds>,v1=<hex>, where v1 is HMAC-SHA256 with your endpoint's secret over the string `${t}.${rawBody}` — the exact bytes of the request body. Verify before trusting anything:
- Read the raw body before your framework parses it.
- Reject a
tmore than 5 minutes from now (replay protection). - Compare signatures in constant time. Reject on mismatch — a modified body or timestamp never verifies.
const crypto = require("crypto");
function verifySendjoorSignature(rawBody, header, secret, toleranceSeconds = 300) {
const parts = Object.fromEntries((header || "").split(",").map((p) => p.split("=")));
if (!/^\d+$/.test(parts.t || "") || !/^[0-9a-f]{64}$/.test(parts.v1 || "")) return false;
if (Math.abs(Date.now() / 1000 - Number(parts.t)) > toleranceSeconds) return false; // replay window
const expected = crypto.createHmac("sha256", secret).update(`${parts.t}.${rawBody}`).digest("hex");
return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1));
}
// Express — take the RAW body; never re-serialise parsed JSON.
app.post("/webhooks/sendjoor", express.raw({ type: "application/json" }), (req, res) => {
const raw = req.body.toString("utf8");
if (!verifySendjoorSignature(raw, req.get("X-Sendjoor-Signature"), process.env.SENDJOOR_WEBHOOK_SECRET)) {
return res.status(400).end();
}
const event = JSON.parse(raw);
queue.add(event); // dedupe on event.id in the worker
res.status(200).end();
});Delivery, retries and replays
- Respond with any 2xx within 10 seconds. Do slow work after responding.
- A failed delivery is retried automatically after 1 minute, 5 minutes, 15 minutes, 1 hour and 6 hours — six attempts in all — then you're emailed. You can replay any delivery from the dashboard.
- Every retry and replay sends the same event with the same id, so the same event can reach you more than once — and occasionally out of order.
Deduplicate on the event id
Record each id you process (a unique index works well) and acknowledge repeats with 200 without acting again. For money, also check the charge's current state with GET /v1/charges/reference/{reference} rather than relying on event order. A 2xx only means you received the event — it says nothing more about the payment than the event itself.
Testing
Use Send test event to check your verification, then pay a test link or create a test charge (see your first test payment) to receive real test events. Every delivery is listed with its HTTP status, attempt number, payload and your server's response.