Receiving status

Payment Gateways

Get the status of a payment with its reference.

GEThttps://telcomw.com/api-v2/payments/receive/RE17482494250458921

Put the reference in the URL. Authenticate with a Bearer token, which is your TelcoMW API key.

Parameters

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.

Example request

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())

Response

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"
}

Fields explained

FieldDescription
messageAdditional information about the request.
feedback.referenceThe reference of the payment.
feedback.statustrue when the request worked.
feedback.messageA message about the payment.
feedback.operatorThe payment operator.
feedback.third_party_referenceThe reference of a third party, null when there is none.
feedback.payment_statusThe status of the payment.
feedback.payment_commentA comment about the payment.
feedback.payment_ipnThe notification address of the payment.
statusThe overall status of the request.