Loading...
Receives and processes webhook notifications from payment providers when payment events occur. This endpoint automatically updates payment status, credits user accounts, creates transaction records, and sends notifications to users.
KEY | VALUE | DESCRIPTION |
---|---|---|
X-API-Key | X-API-Key | - |
X-API-Secret | X-API-Secret | - |
// Using fetch API
const response = await fetch("/api/v1/payments/webhook", {
method: "POST",
headers: {
"X-API-Key": "X-API-Key",
"X-API-Secret": "X-API-Secret"
},
body: JSON.stringify({
"externalReference": null,
"status": null,
"eventType": null,
"paymentReference": null,
"accountNumber": null,
"accountName": null
})
});
const data = await response.json();
console.log(data);
Parameter | Type | Required | Description |
---|---|---|---|
externalReference | No | ||
status | No | ||
eventType | No | ||
paymentReference | No | ||
accountNumber | No | ||
accountName | No |
{
"externalReference": null
"status": null
"eventType": null
"paymentReference": null
"accountNumber": null
"accountName": null
}
Success response
{
"statusCode": 200
"message": "Webhook processed successfully"
}