Get USSD Payment Details
{{URL}}/api/pgs/payment/v1/getPaymentDetails/{{TransRef}}
This endpoint is used to get the status of a USSD transaction.
AUTHORIZATION
Username | Password |
Username | {{USERNAME}} |
Password | {{SECRETKEY}} |
HEADERS
Content-Type | application/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
Name | Type | Description | Optional Mandatory |
referenceID | String | Reference Id | true |
clientId | String | Client Identification number | true |
userId | String | User Identification number | true |
amount | Number | Transaction amount | true |
fees | Number | Transaction charge fee | true |
currency | String | Transaction currency | true |
createdAt | String | Time of transaction creation | true |
channel | String | Channel of payment | true |
status | String | Transaction status | true |
statusMessage | String | Transaction status message | true |
providerReference | String | Reference ID of transaction provider | true |
providerInitiated | Boolean | Indicates if provider is initiated | true |
providerResponse | String | Response | true |
paymentUrl | String | URL for payment | true |
clientName | String | Name of client | true |
metadata | Object | Transaction metadata | true |
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?