Initiate a payout
Send money to recipient
POST
https://api.tryduplo.com/v1/wallets/transfer
Authorization
string | set value to Bearer SECRET_KEY |
recipient_bank_code
string required | The bank code of the recipient bank |
recipient_account_number
string required | The bank account number of the recipient |
amount
number required | The amount to be transfered. a minimum of 200 naira |
description
string required | Specifiy the reason for the transaction |
business_id
string required | Merchant business ID |
payout_otp
string optional | Otp received on phone number. This is for businesses that enables OTP check when doing payout |
| |
cURL
Node
PHP
curl --location --request POST 'https://api.tryduplo.com/v1/wallets/transfer' \
--header 'Authorization: Bearer SECRET_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"recipient_bank_code": "044",
"recipient_account_number": "0694002924",
"amount": "200",
"description": "chop money",
"payout_otp": "893745", //optional. This should be parse if it's enabled
"business_id":"2e5071-59cb-4057-a14b-d49a3c90ef"
}'
1
var axios = require('axios');
2
var data = JSON.stringify({
3
"recipient_bank_code": "044",
4
"recipient_account_number": "0694002924",
5
"amount": "200",
6
"description": "chop money",
7
"payout_otp": "893745", //optional. This should be parse if it's enabled
8
"business_id": "2e5071-59cb-4057-a14b-d49a3c90ef"
9
});
10
11
var config = {
12
method: 'post',
13
url: 'https://api.tryduplo.com/v1/wallets/transfer',
14
headers: {
15
'Authorization': 'Bearer SECRET_KEY',
16
'Content-Type': 'application/json'
17
},
18
data : data
19
};
20
21
axios(config)
22
.then(function (response) {
23
console.log(JSON.stringify(response.data));
24
})
25
.catch(function (error) {
26
console.log(error);
27
});
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://api.tryduplo.com/v1/wallets/transfer',
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 => 'POST',
14
CURLOPT_POSTFIELDS =>'{
15
"recipient_bank_code": "044",
16
"recipient_account_number": "0694002924",
17
"amount": "200",
18
"description": "chop money",
19
"payout_otp": "893745", //optional. This should be parse if it's enabled
20
"business_id":"2e5071-59cb-4057-a14b-d49a3c90ef"
21
}',
22
CURLOPT_HTTPHEADER => array(
23
'Authorization: Bearer SECRET_KEY',
24
'Content-Type: application/json'
25
),
26
));
27
28
$response = curl_exec($curl);
29
30
curl_close($curl);
31
echo $response;
{
"data": {},
"errors": {},
"message": "Transaction request successful"
}
Last modified 12d ago