Bulk payout
Bulk payout to your recipients
POST
https://app-staging.tryduplo.com/v1/recipients/bulk-recipients
Authorization
string | set value to Bearer SECRET_KEY |
dpmlekdno | swwwmewje4t343643 |
business_id
string require | Merchant business ID. |
type
string require | Bulk recipient format options [JSON, CSV], can only be JSON when using the api. |
title
string require | Title for the payments. |
bulk_recipients
string require | List of recipients in the following format:
[ { 'bank_code': '022', 'account_name': 'John Doe', 'email': '[email protected]', 'account_number': '01234567890', 'amount': '1000', 'date': '2022-09-02'
'frequency': 'Never' 'description': 'payment description' }
] |
cURL
Node
PHP
curl --location --request POST 'https://app-staging.tryduplo.com/v1/recipients/bulk-recipients' \
--header 'Authorization: Bearer SECRET_KEY' \
--header 'dpmlekdno: swwwmewje4t343643' \
--header 'Content-Type: application/json' \
--data-raw '{
"business_id":"2e5071-59cb-4057-a14b-d49a3c90ef",
"type":"json",
"title":"Salary payments",
"payout_otp": "893745", //optional. This should be parse if it's enabled
"bulk_recipients":"[
{
'bank_code': '022',
'account_name': 'John Doe',
'email': '[email protected]',
'account_number': '01234567890',
'amount': '1000',
'date': '2022-09-02'
'frequency': 'Never'
'description': 'payment description'
}
]"
}'
1
var axios = require('axios');
2
var data = JSON.stringify({
3
"business_id":"2e5071-59cb-4057-a14b-d49a3c90ef",
4
"type":"json",
5
"title":"Salary payments",
6
"payout_otp": "893745", //optional. This should be parse if it's enabled
7
"bulk_recipients":"[
8
{
9
'bank_code': '022',
10
'account_name': 'John Doe',
11
'email': '[email protected]',
12
'account_number': '01234567890',
13
'amount': '1000',
14
'date': '2022-09-02'
15
'frequency': 'Never'
16
'description': 'payment description'
17
}
18
]"
19
});
20
21
var config = {
22
method: 'post',
23
url: 'https://api.tryduplo.com/v1/recipients/bulk-recipients',
24
headers: {
25
'Authorization': 'Bearer SECRET_KEY',
26
'Content-Type': 'application/json'
27
},
28
data : data
29
};
30
31
axios(config)
32
.then(function (response) {
33
console.log(JSON.stringify(response.data));
34
})
35
.catch(function (error) {
36
console.log(error);
37
});
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://api.tryduplo.com/v1/recipients/bulk-recipients',
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
"business_id":"2e5071-59cb-4057-a14b-d49a3c90ef",
16
"type":"json",
17
"title":"Salary payments",
18
"payout_otp": "893745", //optional. This should be parse if it's enabled
19
"bulk_recipients":"[
20
{
21
'bank_code': '022',
22
'account_name': 'John Doe',
23
'email': '[email protected]',
24
'account_number': '01234567890',
25
'amount': '1000',
26
'date': '2022-09-02'
27
'frequency': 'Never'
28
'description': 'payment description'
29
}
30
]"
31
}',
32
CURLOPT_HTTPHEADER => array(
33
'Authorization: Bearer SECRET_KEY',
34
'Content-Type: application/json'
35
),
36
));
37
38
$response = curl_exec($curl);
39
40
curl_close($curl);
41
echo $response;
{
"data": {},
"errors": {},
"message": "Request successful"
}
Last modified 12d ago