Get USSD Payment Details

{{URL}}/api/pgs/payment/v1/getPaymentDetails/{{TransRef}}

This endpoint is used to get the status of a USSD transaction.

AUTHORIZATION

UsernamePassword
Username{{USERNAME}}
Password{{SECRETKEY}}

HEADERS

Content-Typeapplication/json

PARAMS

transRef

Example Request

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("{{URL}}/api/pgs/payment/v1/getPaymentDetails/rexpaydocUSSD", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Response Parameters

NameTypeDescriptionOptional Mandatory
referenceIDStringReference Idtrue
clientIdStringClient Identification numbertrue
userIdStringUser Identification numbertrue
amountNumberTransaction amounttrue
feesNumberTransaction charge feetrue
currencyStringTransaction currencytrue
createdAtStringTime of transaction creationtrue
channelStringChannel of paymenttrue
statusStringTransaction statustrue
statusMessageStringTransaction status messagetrue
providerReferenceStringReference ID of transaction providertrue
providerInitiatedBooleanIndicates if provider is initiatedtrue
providerResponseStringResponsetrue
paymentUrlStringURL for paymenttrue
clientNameStringName of clienttrue
metadataObjectTransaction metadatatrue

Example Response

{
  "referenceId": "rexpaydocUSSD",
  "clientId": "gaprodtest",
  "userId": "ga@gmail.com",
  "amount": 50,
  "fees": 0.75,
  "currency": "NGN",
  "createdAt": "2023-10-06 01:15:29.000+0000",
  "channel": "USSD",
  "status": "ONGOING",
  "statusMessage": "Request in progress",
  "providerReference": "23100640302541501589",
  "providerInitiated": false,
  "providerResponse": "Request in progress",
  "paymentUrl": "https://checkout.myrexpay.ng/pay/16965549p3a6Dbdm6I",
  "clientName": "gaprodtest",
  "metadata": {
    "customerName": "Global Accelerex",
    "email": "ga@gmail.com"
  }
}

Did you find this page helpful?