Fetch transaction
1 min
GET
/client/v1/transaction/:client_reference
Path Parameters
- client_referencestringrequiredDescription
Header Parameters
- X-CLIENT-IDstringrequiredDescription
- X-SIGNATUREstringrequiredDescription
- X-TIMESTAMPstringrequiredDescription
- X-NONCEstringrequiredDescription
Responses
200
- clientApi.GetTransactionRequestSuccessfulDescription
- dataclientApi.Transaction
- idstringDescription
- business_idstringDescription
- amountnumberDescription
- exchange_amountnumberDescription
- exchange_ratestringDescription
- currencystringDescription
- exchange_currencystringDescription
- fee_amountnumberDescription
- account_numberstringDescription
- bank_codestringDescription
- bank_namestringDescription
- recipient_namestringDescription
- recipient_phonestringDescription
- recipient_countrystringDescription
- typestring<DEBIT | CREDIT>Description
- statusstring<INPROGRESS | SUCCESSFUL | FAILED>Description
- service_namestring<BANK-TRANSFER>Description
- narrationstringDescription
- created_bystringDescription
- created_atstringDescription
- completed_atstringDescription
- updated_atstringDescription
- messagestringDefaulttransaction retrieved
curl
curl --request GET \
--url /client/v1/transaction/:client_reference \
--header 'accept: application/json' \
--header 'x-client-id: string' \
--header 'x-signature: string' \
--header 'x-timestamp: string' \
--header 'x-nonce: string'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("x-client-id", "string");
myHeaders.append("x-signature", "string");
myHeaders.append("x-timestamp", "string");
myHeaders.append("x-nonce", "string");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/client/v1/transaction/:client_reference", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("/client/v1/transaction/:client_reference")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request["x-client-id"] = "string"
request["x-signature"] = "string"
request["x-timestamp"] = "string"
request["x-nonce"] = "string"
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "/client/v1/transaction/:client_reference"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'x-client-id': 'string',
'x-signature': 'string',
'x-timestamp': 'string',
'x-nonce': 'string'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// transaction retrieved
{
"data": {
"id": "",
"business_id": "",
"amount": 0,
"exchange_amount": 0,
"exchange_rate": "",
"currency": "",
"exchange_currency": "",
"fee_amount": 0,
"account_number": "",
"bank_code": "",
"bank_name": "",
"recipient_name": "",
"recipient_phone": "",
"recipient_country": "",
"type": "",
"status": "",
"service_name": "",
"narration": "",
"created_by": "",
"created_at": "",
"completed_at": "",
"updated_at": ""
},
"message": ""
}