Get wallet balance
Get the available and ledger balances of a digital wallet
URI
GET
https://api.tryduplo.com/v1/wallets/balance/:wallet_ref?business_id=Parameters
Header
Authorization
string
set value to Bearer SECRET_KEY
Path Param
wallet_ref
string required
Wallet referenece
Query param
business_id
string required
Merchant business id
Sample request
curl --location --request GET 'https://api.tryduplo.com/v1/wallets/balance/:wallet_ref?business_id=' \
--header 'Authorization: Bearer SECRET_KEY' \
--data-raw ''var axios = require('axios');
var data = '';
var config = {
method: 'get',
url: 'https://api.tryduplo.com/v1/wallets/balance/:wallet_ref?business_id=',
headers: {
'Authorization': 'Bearer SECRET_KEY'
},
data : data
};
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/balance/:wallet_ref?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": {
"available_balance": "0.00",
"legder_balance": "0.00",
"bank_accounts": [
{
"account_ref": "act_8hda64gad",
"account_number": "9977632775",
"bank_code": "053",
"created_at": "2021-08-08T11:08:31.000Z",
"account_name": "MERCHANT(Manny Norte)",
"bank_name": "Providus"
}
]
},
"errors": {},
"message": "Request successful"
}Last updated
Was this helpful?