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"
}
}
}
}
]
}The dispute event notification body is structured thus:
{
"notificationItems": [
{
"notificationRequestItem": {
"eventType": "dispute",
"eventDate": "2020-05-01 12:56:07",
"eventId": "da28df9ea5dd4807b59e5761afd7231b",
"data": {
"evidence": [
{
"images": [
{
"image": ""
}
],
"createdAt": {
"dayOfWeek": "TUESDAY",
"month": "NOVEMBER",
"hour": 11,
"dayOfYear": 316,
"dayOfMonth": 12,
"year": 2019,
"monthValue": 11,
"nano": 0,
"chronology": {
"calendarType": "iso8601",
"id": "ISO"
},
"minute": 24,
"second": 35
},
"id": 28,
"message": "Ready to deploy",
"msgSender": "merchant"
},
{
"images": [
{
"image": ""
}
],
"createdAt": {
"dayOfWeek": "TUESDAY",
"month": "NOVEMBER",
"hour": 10,
"dayOfYear": 316,
"dayOfMonth": 12,
"year": 2019,
"monthValue": 11,
"nano": 0,
"chronology": {
"calendarType": "iso8601",
"id": "ISO"
},
"minute": 51,
"second": 59
},
"id": 20,
"message": "what up"
}
],
"disputeRef": "e159936a690b462d881a4ce6090c66df",
"dateOfResolution": "2019-11-07 18:57:51",
"merchantId": "00000005",
"resolution": "accept",
"dateOfDispute": "2019-11-15 08:52:31",
"transDetails": {
"amount": "10.00",
"fee": "0",
"transactionDate": "2019-11-07 03:14:12"
},
"customerEmail": "[email protected]",
"id": 2,
"category": "DISPUTE",
"status": "ACCEPTED",
"dueWhen": "2019-11-27 18:57:51",
"transactionRef": "PUBK_RW5yjSthWIWvRyST6HzcG0c3ckTehfqH1573135946855"
}
}
}
]
}The transaction event notification body is structured thus:
{
"notificationItems": [
{
"notificationRequestItem": {
"eventType": "transaction",
"eventDate": "2020-05-01 12:56:22",
"eventId": "d95b17db00984ef6847913eb5f35c97d",
"data": {
"amount": "2.00",
"mobile": "08039229321",
"status": "APPROVED",
"reference": "54637776z",
"gatewayMessage": "Approved by financial institution",
"publicKey": "tNUFstIHrE",
"businessName": "LotusBank",
"accountNumber": "0011929382",
"bankCode": "000016",
"description": "transaction event occurred",
"fee": "2.00",
"clientAppCode": "app1",
"datetime": "2019:11:22 01:45:24",
"callbackUrl": "https://checkout.api.lotusbank.ng/?m=EQREZEhyRn",
"redirectUrl": "https://checkout.api.lotusbank.ng/?m=EQREZEhyRn",
"channel": "transfer",
"productId": "Foods",
"channelType": "Mastercard",
"maskedPan": "4508-75xx-xxxx-1019",
"sourceIP": "1.0.0.10",
"deviceType": "Apple Laptop",
"type": "3DSECURE",
"fullname": "John Doe",
"email": "[email protected]",
"gatewayReference": "",
"grossAmount": "3.00",
"country": "NG",
"currency": "NGN",
"creditAccountName": "LotusBank",
"creditAccountNumber": "1212321211",
"narration": "My narration here",
"sessionId": "00002999299388837772828883778",
"bankName": "firstbank",
"externalReference": "2i2idde2",
"createdAt": "2019:11:22 01:45:24",
"updatedAt": "2019:11:22 01:45:24",
"generatedAt": "2019:11:22 01:45:24",
"lastFourDigits": "007",
"cardBin": "222300",
"paymentType": "CARD"
}
}
}
]
}The wallet transaction event notification body is structured thus:
{
"notificationItems": [
{
"notificationRequestItem": {
"eventType": "transaction.wallet",
"eventDate": "2020-05-01 12:52:28",
"eventId": "c472deceabf44924901b104523af14df",
"data": {
"amount": "100.00",
"mobile": "08033456500",
"reference": "shh3332hwhwhh22hjjjwj",
"gatewayMessage": "APPROVED",
"publicKey": "hhw33y2x",
"bankCode": "000016",
"description": "wallet transaction",
"fee": "2.00",
"type": "Transfer",
"fullname": "John Doe",
"email": "[email protected]",
"country": "NG",
"currency": "NGN",
"origin": "string",
"internalRef": "string",
"creditAccountName": "Test Account",
"creditAccountNumber": "23221122321",
"originatorAccountnumber": "1929383828392",
"originatorName": "BudPay",
"narration": "my narration here",
"sessionId": "00002999299388837772828883778",
"externalReference": "2203000002992910219",
"createdAt": "2019-12-12 16:20:59",
"updatedAt": "2019-12-12 16:20:59"
}
}
}
]
}The recurrent transaction event notification body is structured thus:
{
"notificationItems": [
{
"notificationRequestItem": {
"eventType": "transaction.recurrent",
"eventDate": "2020-05-01 12:50:33",
"eventId": "30a33df05b0c465c8c38f4113621685a",
"data": {
"amount": "150",
"mobile": "08033456500",
"reference": "TESTPilotR251218123PPOIU149",
"publicKey": "BPTESTPUBK_dhrpzbRpR34l6VmqkCFOKA94L5E1jSTu",
"description": "Pilot Test Subscription",
"productId": "Terrain",
"maskedPan": "5123-45xx-xxxx-0008",
"email": "[email protected]",
"gatewayReference": "F325090871582705056234",
"country": "NG",
"narration": "Reccurrent",
"createdAt": "2020-02-26T09:17:30",
"updatedAt": "2020-02-26T09:18:26.496",
"lastFourDigits": "0008",
"cardBin": "512345"
}
}
}
]
}The recurring debit transaction event notification body is structured thus:
{
"notificationItems": [
{
"notificationRequestItem": {
"eventType": "transaction.recurring.debit",
"eventDate": "2020-05-01 12:55:32",
"eventId": "799f8cad23bc4bc389280f996d81ea55",
"data": {
"amount": "2000",
"reference": "PILOT76558370651618723659",
"gatewayMessage": "Successful",
"publicKey": "BPTESTPUBK_dhrpzbRpR34l6VmqkCFOKA94L5E1jSTu",
"description": "Authorised charge",
"channelType": "Recurring Debit",
"maskedPan": "5123--4xx-xxxx-xx-0",
"type": "TOKEN",
"fullname": "Frank Gboyega",
"email": "[email protected]",
"gatewayReference": "F786046901582644089560",
"country": "NG",
"currency": "NGN",
"narration": "Authorised charge",
"createdAt": "2020-02-25T16:21:23",
"updatedAt": "2020-02-25T16:21:31.319",
"paymentType": "card"
}
}
}
]
}