Webhook Events
Last updated Sept 24th, 2022
Overview
Our DirectPay webhook events are fired based on the following triggers:
- Successful payment webhook event
- Failed payment webhook event
- Abandoned payment webhook event
- Canceled payment webhook event
Webhook Triggers
1
Successful Payment Webhooks
After a successful payment, two webhook events will be sent:
- Account connected event.
- Payment successful event.
Account Connected event (mono.events.account_connected)
Using the Account ID here, you can fetch the customer details like Name, BVN, Account Number, and much more via our Information API.
Request
123456
{
"event": "mono.events.account_connected",
"data": {
"id": "611d575feef5d3371ca9d0d8"
}
}
Payment Successful event (direct_debit.payment_successful)
With the reference here, you can verify the status of a one-time payment using the Verify payment status API.
direct_debit.payment_successful
Request
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
{
"event": "direct_debit.payment_successful",
"data": {
"type": "onetime-debit",
"object": {
"_id": "65aa7939564a694c67789012",
"id": "txd_wzb8uhew4j9ngru43a123456",
"status": "successful",
"message": "Payment was successful",
"description": "new payment",
"amount": 20000,
"fee": 6100,
"currency": "NGN",
"account": {
"status": "AVAILABLE",
"linked": true,
"_id": "65aa7935564a694c67123456",
"name": "SAMUEL OLAMIDE",
"accountNumber": "0123456789",
"currency": "NGN",
"balance": 50000,
"type": "SAVINGS ACCOUNT",
"bvn": null,
"authMethod": "mobile_banking",
"liveMode": true,
"app": "61e3798cbbe2010771123456",
"institution": {
"_id": "5f2d08c060b92e2888287707",
"name": "First Bank",
"bankCode": "011",
"type": "PERSONAL_BANKING",
"icon": "https://mono-public-bucket.s3.eu-west-2.amazonaws.com/images/first-bank-icon.png"
},
"scope": [
"payments"
],
"created_at": "2021-07-18T18:54:23.491Z",
"updated_at": "2021-07-18T18:55:16.055Z"
},
"customer": "65aa78e567adacffd5123456",
"reference": "123456789012",
"liveMode": true,
"verified": true,
"business": "60cc8f95ba1772018c123456",
"created_at": "2021-08-18T18:54:23.491Z",
"updated_at": "2021-08-18T18:55:16.055Z"
}
}
}