Get details of a transaction
Find information about a particular transaction
Using Duplo's transaction_ref
, you can fetch detailed information of a transaction.
URI
GET
https://api.tryduplo.com/v1/wallets/transactions/:transaction_ref?business_id={{business_id}}
Parameters
Header
Query Param
Path Param
Sample request
curl --location --request GET 'https://api.tryduplo.com/v1/wallets/transactions/:transaction_ref?business_id={{business_id}} \
--header 'Authorization: Bearer SECRET_KEY'
var axios = require('axios');
var config = {
method: 'get',
url: 'https://api.tryduplo.com/v1/wallets/transactions/:transaction_ref?business_id={{business_id}},
headers: {
'Authorization': 'Bearer SECRET_KEY'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.tryduplo.com/v1/wallets/transactions/:transaction_ref?business_id={{business_id}}',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer SECRET_KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Duplo Response
{
"data": {
"currency": "NGN",
"description": "Test notification",
"account_number": "8880000566",
"amount": 1000,
"business_id": "8ed10fcc-1e1c-4ad1-9ed8-e870d6543349",
"status": "successful",
"provider_ref_id": "Wema Bank",
"type": "debit",
"channel": "in-system",
"date": "2022-07-08T10:28:04.881Z",
"transaction_ref": "tran_aV29xF0RmwSc",
"wallet_ref": "wal_1Lex3jObH8kC",
"vat": 0,
"fee_amount": 0,
"settled_amount": 0,
"account_ref": "act_kcOwyEeCTAcc",
"account": "629ef8f453ee38000d0dd313",
"new_balance": 27958.9,
"multiple_source_details": [],
"category": "wallet_transfer"
},
"errors": {},
"message": "Record retrieved successfully"
}
Last updated