...
Click on Delete subscription
...
Verifying Webhook Signatures
To ensure the authenticity of webhook requests, verify the signature included in the moniepoint-webhook-signature
header.
Verification Process
Concatenate
moniepoint-webhook-id
,moniepoint-webhook-timestamp
(you can get it from headers), and the request body using '"__"' as a delimiter.Generate an HMAC-SHA256 hash using your webhook secret
Compare the generated signature with the
moniepoint-webhook-signature
header to ensure integrity.
Sample Notification Received:
Headers:
Code Block |
---|
{
"user-agent": "ReactorNetty/1.1.9",
"content-length": "623",
"accept": "application/json",
"accept-encoding": "gzip",
"content-type": "application/json",
"moniepoint-webhook-id": "a7603882-b75e-43b8-bb0e-f8d95d9a05e7",
"moniepoint-webhook-signature": "muPzWhsvQfqKrRegthzLrNk3CMX7D6APTgEyxXgRABc=",
"moniepoint-webhook-timestamp": "1730475285755",
"x-forwarded-for": "141.147.77.31",
"x-forwarded-host": "webhook-subscription.free.beeceptor.com",
"x-forwarded-proto": "https"
} |
Payload:
Code Block |
---|
{
"data": {
"amount": 25300,
"businessId": 150,
"customFields": {
"Invoice ID": "iu12$%h"
},
"responseCode": "09",
"terminalSerial": "TestDev24",
"businessOwnerId": 100,
"responseMessage": "Airtime Purchase Pending",
"transactionTime": "2024-09-24T09:32:57.916+0100",
"transactionType": "AIRTIME",
"merchantReference": "",
"transactionStatus": "PENDING",
"transactionReference": "ATP|2MPT0073|1838496008589305650",
"retrievalReferenceNumber": ""
},
"eventId": "91478699-aec7-49b5-b0d8-6996864febcc",
"subject": {
"domain": "CHANNELS",
"resource": "business",
"resourceId": "150"
},
"createdAt": "2024-11-01T16:34:45.692223987",
"eventType": "V1_POS_AIRTIME_TRANSACTION"
} |