Payout
Get Branch Codes
You can get branch codes for a payout payment.
Currently we only support branch codes for payout method vn_bank_vnd. Branch code is required when:
- Payout amount is greater than 300,000,000 VND
- The bank is in the list of banks requiring branch code
GET
/
v2
/
payouts
/
branch_codes
Get Branch Codes
curl --request GET \
--url https://api.cleverhub.co/api/v2/payouts/branch_codes \
--header 'app-id: <api-key>' \
--header 'secret-key: <api-key>'import requests
url = "https://api.cleverhub.co/api/v2/payouts/branch_codes"
headers = {
"app-id": "<api-key>",
"secret-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'app-id': '<api-key>', 'secret-key': '<api-key>'}};
fetch('https://api.cleverhub.co/api/v2/payouts/branch_codes', 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.cleverhub.co/api/v2/payouts/branch_codes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"app-id: <api-key>",
"secret-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cleverhub.co/api/v2/payouts/branch_codes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("app-id", "<api-key>")
req.Header.Add("secret-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cleverhub.co/api/v2/payouts/branch_codes")
.header("app-id", "<api-key>")
.header("secret-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cleverhub.co/api/v2/payouts/branch_codes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["app-id"] = '<api-key>'
request["secret-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"branch_codes": [
{
"branch_code": "79600001",
"branch_name": "NH THE SIAM COMMERCIAL BANK PUBLIC-CN TP HO CHI MINH (NH The Siam Commercial Bank Public)"
}
]
}{
"errors": {
"code": "REQUIRE_LOGIN",
"message": "Not Authorised"
}
}{
"errors": {
"message": "Error Lấy danh sách chi nhánh ngân hàng thất bại"
}
}Authorizations
A unique identifier assigned to each application.
A secure token associated with the app-id.
Query Parameters
Payout method name
SWIFT code
Response
OK
Show child attributes
Show child attributes
⌘I
Get Branch Codes
curl --request GET \
--url https://api.cleverhub.co/api/v2/payouts/branch_codes \
--header 'app-id: <api-key>' \
--header 'secret-key: <api-key>'import requests
url = "https://api.cleverhub.co/api/v2/payouts/branch_codes"
headers = {
"app-id": "<api-key>",
"secret-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'app-id': '<api-key>', 'secret-key': '<api-key>'}};
fetch('https://api.cleverhub.co/api/v2/payouts/branch_codes', 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.cleverhub.co/api/v2/payouts/branch_codes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"app-id: <api-key>",
"secret-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cleverhub.co/api/v2/payouts/branch_codes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("app-id", "<api-key>")
req.Header.Add("secret-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cleverhub.co/api/v2/payouts/branch_codes")
.header("app-id", "<api-key>")
.header("secret-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cleverhub.co/api/v2/payouts/branch_codes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["app-id"] = '<api-key>'
request["secret-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"branch_codes": [
{
"branch_code": "79600001",
"branch_name": "NH THE SIAM COMMERCIAL BANK PUBLIC-CN TP HO CHI MINH (NH The Siam Commercial Bank Public)"
}
]
}{
"errors": {
"code": "REQUIRE_LOGIN",
"message": "Not Authorised"
}
}{
"errors": {
"message": "Error Lấy danh sách chi nhánh ngân hàng thất bại"
}
}