Query Transaction API
Retrieve the status and details of any previously executed transaction.
Get Transaction Status
Fetch a specific transaction's details using its reference ID.
GET
https://suruleredatacom.com.ng/api/transaction/{id}
curl -X GET "https://suruleredatacom.com.ng/api/transaction/txn_12345" \
-H "Authorization: Token YOUR_API_KEY" \
-H "Content-Type: application/json"
<?php
$url = 'https://suruleredatacom.com.ng/api/transaction/txn_12345';
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Token YOUR_API_KEY',
'Content-Type: application/json',
]
]);
$response = curl_exec($ch);
curl_close($ch);
print_r(json_decode($response, true));
?>
const response = await fetch('https://suruleredatacom.com.ng/api/transaction/txn_12345', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);
import requests
url = "https://suruleredatacom.com.ng/api/transaction/txn_12345"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
print(response.json())
Response
✓ 200 OK
{
"status": "success",
"Status": "successful",
"request-id": "txn_12345",
"amount": "2000",
"new_balance": "3000",
"api_response": "IKEDC Payment Successful for 1234567890. Token: 1234 5678 9012 3456 7890",
"response": "IKEDC Payment Successful for 1234567890. Token: 1234 5678 9012 3456 7890",
"token": "1234 5678 9012 3456 7890"
}