Get Wallet Balance
Get the balance in your wallet
URI
GET
https://api.tryduplo.com/v1/wallets/balance/{{wallet_ref}}?business_id={{business_id}}
Parameters
Header
Query Param
Sample request
curl --location 'https://api.tryduplo.com/v1/wallets/balance/wal_05U9oVQavIRE?business_id=bd4239c4-ea0c-4ccc-b5ac-bbfe8f86cd04'. \
--header 'Authorization: Bearer SECRET_KEY'
const axios = require('axios');
let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://api.tryduplo.com/v1/wallets/balance/wal_05U9oVQavIRE?business_id=bd4239c4-ea0c-4ccc-b5ac-bbfe8f86cd04',
headers: {
'Authorization': 'Bearer SECRET_KEY'
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.tryduplo.com/v1/wallets/balance/wal_05U9oVQavIRE?business_id=bd4239c4-ea0c-4ccc-b5ac-bbfe8f86cd04',
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": 800,
"email": "duoiba.com@gmail.com",
"currency": "NGN",
"ledger_balance": 7800
},
"errors": {},
"message": "Request successful"
}
Last updated