Get the status of a payment with its reference.
https://telcomw.com/api-v2/payments/receive/RE17482494250458921Put the reference in the URL. Authenticate with a Bearer token, which is your TelcoMW API key.
| Parameter | Sent in | Required | Description |
Authorization |
header | YES | Bearer YOUR_API_KEY (your TelcoMW API key). |
reference |
path | YES | The unique reference of the payment transaction. |
curl --location --request GET 'https://telcomw.com/api-v2/payments/receive/RE17482494250458921' \ --header 'Authorization: Bearer YOUR_API_KEY'
curl --location --request GET "https://telcomw.com/api-v2/payments/receive/RE17482494250458921" ^ --header "Authorization: Bearer YOUR_API_KEY"
<?php
$headers = [
'Authorization: Bearer YOUR_API_KEY',
];
$ch = curl_init('https://telcomw.com/api-v2/payments/receive/RE17482494250458921');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
print_r(json_decode($response, true));
const axios = require('axios');
axios.request({
method: 'get',
url: 'https://telcomw.com/api-v2/payments/receive/RE17482494250458921',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}).then((res) => console.log(res.data))
.catch((err) => console.error(err.response ? err.response.data : err.message));
import requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY'
}
response = requests.request('GET', 'https://telcomw.com/api-v2/payments/receive/RE17482494250458921', headers=headers)
print(response.json())
The response is JSON.
{
"message": "Service request accepted",
"feedback": {
"reference": "RE17482494250458921",
"status": true,
"message": "Payment status Accessed",
"operator": "airtel",
"third_party_reference": null,
"payment_status": "RQD",
"payment_comment": "WAITING_ACTION",
"payment_ipn": "https://yourdomain.com/notifications"
},
"status": "success"
}
| Field | Description |
message | Additional information about the request. |
feedback.reference | The reference of the payment. |
feedback.status | true when the request worked. |
feedback.message | A message about the payment. |
feedback.operator | The payment operator. |
feedback.third_party_reference | The reference of a third party, null when there is none. |
feedback.payment_status | The status of the payment. |
feedback.payment_comment | A comment about the payment. |
feedback.payment_ipn | The notification address of the payment. |
status | The overall status of the request. |