Structure of the Event Notification
An event notification body is sent in JSON format and shares similarities to what you would get in response to a typical API request. You can determine the type of notification by the eventType
field.
This field is a sub-field in the notificationRequestItem field in the notificationItems
array, Example event types are refund or transaction.
All information about a resource notification is included in the data field.
The refund event notification body is structured thus:
{
"notificationItems": [
{
"notificationRequestItem": {
"eventType": "refund",
"eventDate": "2020-05-01 12:55:57",
"eventId": "0be677f841254a3eb92fab0d0b6ba232",
"data": {
"amount": "10",
"createdAt": "2019-10-24 07:47:49",
"transactionRef": "IHrE1571828556059",
"description": "I need my money",
"type": "FULL_REFUND",
"mode": "TEST",
"updatedAt": "2019-10-24 07:47:49",
"refundRef": "0ee983dd9222280bed389572",
"merchantId": "00000013",
"currency": "NGN",
"customer": {
"customerPhone": "09034343434",
"customerEmail": "[email protected]",
"customerName": "Obia Ugochukwu"
}
}
}
}
]
}
Last updated