Notifications history
This endpoint allows you to fetch all webhook event history
POST
https://api.oneappgo.com/v1/webhookevents
Headers
Name | Type | Description |
---|---|---|
authorization* | String | SECRET_KEY |
{
"status": true,
"msg": "Notifications Retrieved",
"data": [
{
"event_type": "transactions",
"request_time": "Sat 12-Oct-2024 01:27 pm",
"response_time": "Sat 12-Oct-2024 01:45 pm",
"reqtimeago": "1 month, 2 days, 22 hours, 38 minutes, 9 seconds ago",
"reference": "IB19CD17287K705WUSD",
"resend_resp": "",
"requestbody": {
"event_type": "transactions",
"event_status": "success",
"card_id": "92eb3-a05b-e9a2b8f30fx0",
"paid_through": "virtualcard",
"type": "virtualcard_issuance",
"trans_status": "01",
"transmode": "test",
"reference": "IB19CD17287K705WUSD",
"card_holder": "John Doe",
"tofund_amount": "10",
"amount_charged": 12,
"card_brand": "Mastercard",
"masked_cardpan": "1088********0829",
"fee": 2,
"tracking_id": "BLD212065",
"customer_id": "",
"client_id": "1",
"transaction_type": "Debit",
"currency": "USD",
"env": "test",
"CustomerDetails": {
"customer_name": "John Doe",
"customer_email": "email@example.com",
"customer_phone": "07012345678",
"customer_city": "Ikeja",
"customer_state": "Lagos State",
"customer_country": "Nigeria"
},
"transerror": "0"
},
"respbody": "",
"resphttpcode": "0",
"canrepush": true
},
{
"event_type": "transactions",
"request_time": "Sat 12-Oct-2024 12:47 pm",
"response_time": "Sat 12-Oct-2024 01:05 pm",
"reqtimeago": "1 month, 2 days, 23 hours, 18 minutes, 9 seconds ago",
"reference": "MD728733645K178WUSD",
"resend_resp": "",
"requestbody": {
"event_type": "transactions",
"event_status": "success",
"card_id": "b9fe30-28e7x-3f5-0bab42",
"paid_through": "virtualcard",
"trans_status": "01",
"transmode": "test",
"reference": "MD728733645K178WUSD",
"card_holder": "John Doe",
"tofund_amount": "10",
"amount_charged": 12,
"card_brand": "Mastercard",
"masked_cardpan": "1088********0829",
"fee": 2,
"tracking_id": "BLD212065",
"customer_id": "",
"client_id": "1",
"transaction_type": "Debit",
"currency": "USD",
"env": "test",
"CustomerDetails": {
"customer_name": "John Doe",
"customer_email": "email@example.com",
"customer_phone": "07012345678",
"customer_city": "Ikeja",
"customer_state": "Lagos State",
"customer_country": "Nigeria"
},
"transerror": "0"
},
"respbody": "",
"resphttpcode": "0",
"canrepush": true
}
}
Take a look at how you might do this:
curl --location 'https://api.oneappgo.com/v1/webhookevents' \
--header 'Authorization: Bearer SECRET_KEY' \
--header 'Content-Type: application/json' \
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://api.oneappgo.com/v1/webhookevents',
'headers': {
'Authorization': 'Bearer SECRET_KEY',
'Content-Type': 'application/json'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.oneappgo.com/v1/webhookevents',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer SECRET_KEY',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var headers = {
'Authorization': 'Bearer SECRET_KEY',
'Content-Type': 'application/json'
};
var request = http.Request('POST', Uri.parse('https://api.oneappgo.com/v1/webhookevents'));
request.body = json.encode({
"trackingid": "2727"
});
request.headers.addAll(headers);
http.StreamedResponse response = await request.send();
if (response.statusCode == 200) {
print(await response.stream.bytesToString());
}
else {
print(response.reasonPhrase);
}
Last updated