curl --request POST \
--url https://api-sandbox.uqpaytech.com/api/v2/payment/bankaccount/{id} \
--header 'Content-Type: application/json' \
--header 'x-auth-token: <api-key>' \
--header 'x-idempotency-key: <x-idempotency-key>' \
--data '
{
"account_number": "GB71950018692652646598",
"bank_name": "DBS Bank",
"swift_code": "DBSSSGSG",
"bank_country_code": "SG",
"bank_address": "12 Marina Boulevard, Singapore 018982",
"bank_code_type": "aba",
"bank_code_value": "021000021",
"bank_branch_code": "00001"
}
'import requests
url = "https://api-sandbox.uqpaytech.com/api/v2/payment/bankaccount/{id}"
payload = {
"account_number": "GB71950018692652646598",
"bank_name": "DBS Bank",
"swift_code": "DBSSSGSG",
"bank_country_code": "SG",
"bank_address": "12 Marina Boulevard, Singapore 018982",
"bank_code_type": "aba",
"bank_code_value": "021000021",
"bank_branch_code": "00001"
}
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"x-auth-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-idempotency-key': '<x-idempotency-key>',
'x-auth-token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
account_number: 'GB71950018692652646598',
bank_name: 'DBS Bank',
swift_code: 'DBSSSGSG',
bank_country_code: 'SG',
bank_address: '12 Marina Boulevard, Singapore 018982',
bank_code_type: 'aba',
bank_code_value: '021000021',
bank_branch_code: '00001'
})
};
fetch('https://api-sandbox.uqpaytech.com/api/v2/payment/bankaccount/{id}', 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-sandbox.uqpaytech.com/api/v2/payment/bankaccount/{id}",
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([
'account_number' => 'GB71950018692652646598',
'bank_name' => 'DBS Bank',
'swift_code' => 'DBSSSGSG',
'bank_country_code' => 'SG',
'bank_address' => '12 Marina Boulevard, Singapore 018982',
'bank_code_type' => 'aba',
'bank_code_value' => '021000021',
'bank_branch_code' => '00001'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-auth-token: <api-key>",
"x-idempotency-key: <x-idempotency-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.uqpaytech.com/api/v2/payment/bankaccount/{id}"
payload := strings.NewReader("{\n \"account_number\": \"GB71950018692652646598\",\n \"bank_name\": \"DBS Bank\",\n \"swift_code\": \"DBSSSGSG\",\n \"bank_country_code\": \"SG\",\n \"bank_address\": \"12 Marina Boulevard, Singapore 018982\",\n \"bank_code_type\": \"aba\",\n \"bank_code_value\": \"021000021\",\n \"bank_branch_code\": \"00001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
req.Header.Add("x-auth-token", "<api-key>")
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-sandbox.uqpaytech.com/api/v2/payment/bankaccount/{id}")
.header("x-idempotency-key", "<x-idempotency-key>")
.header("x-auth-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account_number\": \"GB71950018692652646598\",\n \"bank_name\": \"DBS Bank\",\n \"swift_code\": \"DBSSSGSG\",\n \"bank_country_code\": \"SG\",\n \"bank_address\": \"12 Marina Boulevard, Singapore 018982\",\n \"bank_code_type\": \"aba\",\n \"bank_code_value\": \"021000021\",\n \"bank_branch_code\": \"00001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.uqpaytech.com/api/v2/payment/bankaccount/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-idempotency-key"] = '<x-idempotency-key>'
request["x-auth-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_number\": \"GB71950018692652646598\",\n \"bank_name\": \"DBS Bank\",\n \"swift_code\": \"DBSSSGSG\",\n \"bank_country_code\": \"SG\",\n \"bank_address\": \"12 Marina Boulevard, Singapore 018982\",\n \"bank_code_type\": \"aba\",\n \"bank_code_value\": \"021000021\",\n \"bank_branch_code\": \"00001\"\n}"
response = http.request(request)
puts response.read_body{
"account_number": "GB71950018692652646598",
"bank_name": "DBS Bank",
"swift_code": "DBSSSGSG",
"bank_country_code": "SG",
"bank_address": "12 Marina Boulevard, Singapore 018982",
"bank_code_type": "aba",
"bank_code_value": "021000021",
"bank_branch_code": "00001",
"id": "a7b92a19-bfc3-4c8b-8a4f-cfcf74cab345",
"account_name": "UQPAY PTE. LTD.",
"currency": "SGD",
"account_status": "Valid"
}Update Bank Account
更新现有银行账户。
curl --request POST \
--url https://api-sandbox.uqpaytech.com/api/v2/payment/bankaccount/{id} \
--header 'Content-Type: application/json' \
--header 'x-auth-token: <api-key>' \
--header 'x-idempotency-key: <x-idempotency-key>' \
--data '
{
"account_number": "GB71950018692652646598",
"bank_name": "DBS Bank",
"swift_code": "DBSSSGSG",
"bank_country_code": "SG",
"bank_address": "12 Marina Boulevard, Singapore 018982",
"bank_code_type": "aba",
"bank_code_value": "021000021",
"bank_branch_code": "00001"
}
'import requests
url = "https://api-sandbox.uqpaytech.com/api/v2/payment/bankaccount/{id}"
payload = {
"account_number": "GB71950018692652646598",
"bank_name": "DBS Bank",
"swift_code": "DBSSSGSG",
"bank_country_code": "SG",
"bank_address": "12 Marina Boulevard, Singapore 018982",
"bank_code_type": "aba",
"bank_code_value": "021000021",
"bank_branch_code": "00001"
}
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"x-auth-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-idempotency-key': '<x-idempotency-key>',
'x-auth-token': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
account_number: 'GB71950018692652646598',
bank_name: 'DBS Bank',
swift_code: 'DBSSSGSG',
bank_country_code: 'SG',
bank_address: '12 Marina Boulevard, Singapore 018982',
bank_code_type: 'aba',
bank_code_value: '021000021',
bank_branch_code: '00001'
})
};
fetch('https://api-sandbox.uqpaytech.com/api/v2/payment/bankaccount/{id}', 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-sandbox.uqpaytech.com/api/v2/payment/bankaccount/{id}",
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([
'account_number' => 'GB71950018692652646598',
'bank_name' => 'DBS Bank',
'swift_code' => 'DBSSSGSG',
'bank_country_code' => 'SG',
'bank_address' => '12 Marina Boulevard, Singapore 018982',
'bank_code_type' => 'aba',
'bank_code_value' => '021000021',
'bank_branch_code' => '00001'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-auth-token: <api-key>",
"x-idempotency-key: <x-idempotency-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.uqpaytech.com/api/v2/payment/bankaccount/{id}"
payload := strings.NewReader("{\n \"account_number\": \"GB71950018692652646598\",\n \"bank_name\": \"DBS Bank\",\n \"swift_code\": \"DBSSSGSG\",\n \"bank_country_code\": \"SG\",\n \"bank_address\": \"12 Marina Boulevard, Singapore 018982\",\n \"bank_code_type\": \"aba\",\n \"bank_code_value\": \"021000021\",\n \"bank_branch_code\": \"00001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
req.Header.Add("x-auth-token", "<api-key>")
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-sandbox.uqpaytech.com/api/v2/payment/bankaccount/{id}")
.header("x-idempotency-key", "<x-idempotency-key>")
.header("x-auth-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account_number\": \"GB71950018692652646598\",\n \"bank_name\": \"DBS Bank\",\n \"swift_code\": \"DBSSSGSG\",\n \"bank_country_code\": \"SG\",\n \"bank_address\": \"12 Marina Boulevard, Singapore 018982\",\n \"bank_code_type\": \"aba\",\n \"bank_code_value\": \"021000021\",\n \"bank_branch_code\": \"00001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.uqpaytech.com/api/v2/payment/bankaccount/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-idempotency-key"] = '<x-idempotency-key>'
request["x-auth-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_number\": \"GB71950018692652646598\",\n \"bank_name\": \"DBS Bank\",\n \"swift_code\": \"DBSSSGSG\",\n \"bank_country_code\": \"SG\",\n \"bank_address\": \"12 Marina Boulevard, Singapore 018982\",\n \"bank_code_type\": \"aba\",\n \"bank_code_value\": \"021000021\",\n \"bank_branch_code\": \"00001\"\n}"
response = http.request(request)
puts response.read_body{
"account_number": "GB71950018692652646598",
"bank_name": "DBS Bank",
"swift_code": "DBSSSGSG",
"bank_country_code": "SG",
"bank_address": "12 Marina Boulevard, Singapore 018982",
"bank_code_type": "aba",
"bank_code_value": "021000021",
"bank_branch_code": "00001",
"id": "a7b92a19-bfc3-4c8b-8a4f-cfcf74cab345",
"account_name": "UQPAY PTE. LTD.",
"currency": "SGD",
"account_status": "Valid"
}授权
UQPAY 提供的登录 API Token。
请求头
指定代表哪个子账户发起该请求。应设置为 account_id,可通过 List Connected Accounts 获取。若省略或为空,则使用主账户执行请求。
更多信息见 Connected Accounts。
用于保持操作幂等性的唯一标识符(UUID),确保同一操作重复执行不会产生意外影响或重复结果。它有助于在网络错误、重试或故障时保持数据一致性。
路径参数
银行账户的唯一标识符(UUID)。
"a7b92a19-bfc3-4c8b-8a4f-cfcf74cab345"
请求体
请求与响应之间共享的通用银行账户属性。
银行账号(例如 IBAN)。
5 - 60"GB71950018692652646598"
银行名称。
"DBS Bank"
银行的 SWIFT/BIC 代码。
8 - 11"DBSSSGSG"
银行所在国家的两字母代码(ISO 3166-1 alpha-2)。
2"SG"
银行的实际地址。
"12 Marina Boulevard, Singapore 018982"
银行路由代码的类型。根据币种和国家要求填写:
aba- 当 currency = "USD" 且 bank_country_code = "US" 时必填bank_code- 当 currency = "CAD" 或 currency = "HKD" 时必填sort_code- 当 currency = "GBP" 时必填bsb_code- 当 currency = "AUD" 时必填ifsc- 当 currency = "INR" 时必填cnaps_number- 当 currency = "CNH" 且 bank_country_code = "CN" 时必填
aba, bank_code, sort_code, bsb_code, ifsc, cnaps_number "aba"
银行标识值。所需格式取决于所选的
bank_code_type。
各 bank_code_type 接受的格式:
aba:恰好 9 位数字。bank_code:恰好 3 位数字。sort_code:恰好 6 位数字。bsb_code:恰好 6 位数字。ifsc:恰好 11 个字符,格式为:- 前 4 个字符:字母(A–Z)
- 第 5 个字符:数字 0
- 后 6 个字符:字母(A–Z)或数字(0–9)
cnaps_number:恰好 12 位数字。
"021000021"
银行分行代码。当 currency = "CAD" 时必填。
"00001"
响应
成功更新银行账户
请求与响应之间共享的通用银行账户属性。
银行账号(例如 IBAN)。
5 - 60"GB71950018692652646598"
银行名称。
"DBS Bank"
银行的 SWIFT/BIC 代码。
8 - 11"DBSSSGSG"
银行所在国家的两字母代码(ISO 3166-1 alpha-2)。
2"SG"
银行的实际地址。
"12 Marina Boulevard, Singapore 018982"
银行路由代码的类型。根据币种和国家要求填写:
aba- 当 currency = "USD" 且 bank_country_code = "US" 时必填bank_code- 当 currency = "CAD" 或 currency = "HKD" 时必填sort_code- 当 currency = "GBP" 时必填bsb_code- 当 currency = "AUD" 时必填ifsc- 当 currency = "INR" 时必填cnaps_number- 当 currency = "CNH" 且 bank_country_code = "CN" 时必填
aba, bank_code, sort_code, bsb_code, ifsc, cnaps_number "aba"
银行标识值。所需格式取决于所选的
bank_code_type。
各 bank_code_type 接受的格式:
aba:恰好 9 位数字。bank_code:恰好 3 位数字。sort_code:恰好 6 位数字。bsb_code:恰好 6 位数字。ifsc:恰好 11 个字符,格式为:- 前 4 个字符:字母(A–Z)
- 第 5 个字符:数字 0
- 后 6 个字符:字母(A–Z)或数字(0–9)
cnaps_number:恰好 12 位数字。
"021000021"
银行分行代码。当 currency = "CAD" 时必填。
"00001"
银行账户的唯一标识符(UUID)。
"a7b92a19-bfc3-4c8b-8a4f-cfcf74cab345"
账户持有人姓名。
"UQPAY PTE. LTD."
结算账户的币种。
"SGD"
银行账户的状态。
Valid:银行账户有效,可用于结算。Invalid:银行账户无效,不可用于结算。
Valid, Invalid "Valid"

