Search…
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

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
Node
PHP
curl --location --request GET 'https://api.tryduplo.com/v1/wallets/balance/:wallet_ref?business_id=' \
--header 'Authorization: Bearer SECRET_KEY' \
--data-raw ''
1
var axios = require('axios');
2
var data = '';
3
4
var config = {
5
method: 'get',
6
url: 'https://api.tryduplo.com/v1/wallets/balance/:wallet_ref?business_id=',
7
headers: {
8
'Authorization': 'Bearer SECRET_KEY'
9
},
10
data : data
11
};
12
13
axios(config)
14
.then(function (response) {
15
console.log(JSON.stringify(response.data));
16
})
17
.catch(function (error) {
18
console.log(error);
19
});
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://api.tryduplo.com/v1/wallets/balance/:wallet_ref?business_id=',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'GET',
14
CURLOPT_HTTPHEADER => array(
15
'Authorization: Bearer SECRET_KEY'
16
),
17
));
18
19
$response = curl_exec($curl);
20
21
curl_close($curl);
22
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"
}
Copy link
Outline
URI
Parameters
Sample request
Duplo Response