POST
request) from one application to another when a specific event occurs. Unlike traditional polling, where a system repeatedly checks for updates, webhooks push data automatically, reducing latency and improving efficiency.POST
request to the webhook URL, containing the event details in JSON or XML format.200 OK
for success). If the request fails, the sender may retry to ensure reliable delivery.https://merchant.com/webhook/payment
{
"event": "payment.success",
"transaction_id": "TXN123456789",
"amount": 5000,
"currency": "NGN",
"customer": {
"name": "John Doe",
"email": "john.doe@example.com"
},
"status": "successful",
"timestamp": "2025-04-03T14:30:00Z"
}
Feature | Webhooks | API Polling |
---|---|---|
Data Delivery | Instant (push) | Delayed (pull) |
Efficiency | High | Low |
Server Load | Low | High (frequent requests) |
Bandwidth Usage | Minimal | High |
Real-time Updates | Yes | No |
Reliability | Requires proper handling of retries | Can miss updates if polling interval is too long |
Complexity | Requires webhook endpoint setup | Simpler but inefficient for frequent updates |
{
"id": 1445,
"nuban": "0020000015",
"amount": 20,
"note": "Inward Test - MOHAMMED BALARABE OLATEJU",
"transactionType": "Deposit",
"balance": 66,
"createdDate": "2024-10-27T06:00:48Z",
"currency": "NGN",
"transactionReference": "000012241027065934422656001526",
"transferDetails": {
"amount": 20,
"sourceBankName": "STANBICIBTC BANK",
"transactionStatus": "CONFIRMED",
"transactionReference": "000012241027065934422656001526",
"sessionId": "000012241027065934422656001526",
"type": "INWARD_TRANSFER",
"destinationAccountNUBAN": "0020000015",
"destinationAccountName": "Mohammed Olateju",
"destinationInstitutionCode": "090605",
"sourceAccountNUBAN": "0040088210",
"narration": "Inward Test",
"sourceInstitutionCode": "0000122",
"destinationBankName": "Madobi Microfinance Bank",
"sourceAccountName": "MOHAMMED BALARABE OLATEJU"
}
}