Save a bank account
curl --request POST \
--url https://api.useduro.com/v1/payouts/accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"bankCode": "<string>",
"accountNumber": "<string>",
"code": "<string>",
"makeDefault": true
}
'import requests
url = "https://api.useduro.com/v1/payouts/accounts"
payload = {
"bankCode": "<string>",
"accountNumber": "<string>",
"code": "<string>",
"makeDefault": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
bankCode: '<string>',
accountNumber: '<string>',
code: '<string>',
makeDefault: true
})
};
fetch('https://api.useduro.com/v1/payouts/accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.useduro.com/v1/payouts/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'bankCode' => '<string>',
'accountNumber' => '<string>',
'code' => '<string>',
'makeDefault' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.useduro.com/v1/payouts/accounts"
payload := strings.NewReader("{\n \"bankCode\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"code\": \"<string>\",\n \"makeDefault\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.useduro.com/v1/payouts/accounts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"bankCode\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"code\": \"<string>\",\n \"makeDefault\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useduro.com/v1/payouts/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bankCode\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"code\": \"<string>\",\n \"makeDefault\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"bankCode": "<string>",
"bankName": "<string>",
"accountNumber": "<string>",
"accountName": "<string>",
"isDefault": true,
"createdAt": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{}
]
}
}Payouts
Save a bank account
Saves a payout destination. Requires the 6-digit code emailed by POST /v1/payouts/accounts/otp. The account name is resolved and verified before saving; the first account saved becomes the default. Requires the invoice:write scope.
POST
/
v1
/
payouts
/
accounts
Save a bank account
curl --request POST \
--url https://api.useduro.com/v1/payouts/accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"bankCode": "<string>",
"accountNumber": "<string>",
"code": "<string>",
"makeDefault": true
}
'import requests
url = "https://api.useduro.com/v1/payouts/accounts"
payload = {
"bankCode": "<string>",
"accountNumber": "<string>",
"code": "<string>",
"makeDefault": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
bankCode: '<string>',
accountNumber: '<string>',
code: '<string>',
makeDefault: true
})
};
fetch('https://api.useduro.com/v1/payouts/accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.useduro.com/v1/payouts/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'bankCode' => '<string>',
'accountNumber' => '<string>',
'code' => '<string>',
'makeDefault' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.useduro.com/v1/payouts/accounts"
payload := strings.NewReader("{\n \"bankCode\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"code\": \"<string>\",\n \"makeDefault\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.useduro.com/v1/payouts/accounts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"bankCode\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"code\": \"<string>\",\n \"makeDefault\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useduro.com/v1/payouts/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bankCode\": \"<string>\",\n \"accountNumber\": \"<string>\",\n \"code\": \"<string>\",\n \"makeDefault\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"bankCode": "<string>",
"bankName": "<string>",
"accountNumber": "<string>",
"accountName": "<string>",
"isDefault": true,
"createdAt": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{}
]
}
}Authorizations
Paste your secret key as the bearer token: sk_test_… (test) or sk_live_… (live). That is all a normal API call needs. OAuth access tokens from POST /v1/oauth/token also work, but a client id/secret is only for platforms acting on another tenant's behalf, not for your own integration.
Body
application/json
Was this page helpful?
⌘I