Sweep wallet balances
Move money from multiple digital wallets to your business balance.
Use this endpoint to transfer money from multiple digital wallets to your business balance
URI
POST
https://api.tryduplo.com/v1/wallets/multiple-merchant-withdrawal
Parameters
Header
Body Param
Sample request
curl --location --request POST 'https://api.tryduplo.com/v1/wallets/multiple-merchant-withdrawal' \
--header 'Authorization: Bearer SECRET_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"business_id": "{YOUR_VALUE}",
"customers": [
{
"wallet_ref": "wal_jh6ckcNWFEcb",
"amount": 250
},
{
"wallet_ref": "wal_an6fkfNWFEcb",
"amount": 250
}
],
"description": "scholl fees"
}'
var axios = require('axios');
var data = JSON.stringify({
"business_id": "{YOUR_VALUE}",
"customers": [
{
"wallet_ref": "wal_jh6ckcNWFEcb",
"amount": 250
},
{
"wallet_ref": "wal_an6fkfNWFEcb",
"amount": 250
}
],
"description": "scholl fees"
});
var config = {
method: 'post',
url: 'https://api.tryduplo.com/v1/wallets/multiple-merchant-withdrawal',
headers: {
'Authorization': 'Bearer SECRET_KEY',
'Content-Type': 'application/json'
},
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/multiple-merchant-withdrawal',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"business_id": "{YOUR_VALUE}",
"customers": [
{
"wallet_ref": "wal_jh6ckcNWFEcb",
"amount": 250
},
{
"wallet_ref": "wal_an6fkfNWFEcb",
"amount": 250
}
],
"description": "scholl fees"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer SECRET_KEY',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Duplo Response
{
"data": {},
"errors": {},
"message": "Transaction request successful"
}
Last updated