创建银行账户
curl --request POST \
--url https://openplatform.gateapi.io/withdraw/open/institution/otc/api/bank/create \
--header 'Content-Type: multipart/form-data' \
--header 'X-GatePay-Certificate-ClientId: <x-gatepay-certificate-clientid>' \
--header 'X-GatePay-Nonce: <x-gatepay-nonce>' \
--header 'X-GatePay-On-Behalf-Of: <x-gatepay-on-behalf-of>' \
--header 'X-GatePay-Signature: <x-gatepay-signature>' \
--header 'X-GatePay-Timestamp: <x-gatepay-timestamp>' \
--form 'bankAccountName=<string>' \
--form 'bankName=<string>' \
--form countryId=123 \
--form 'address=<string>' \
--form 'iban=<string>' \
--form 'swift=<string>' \
--form file='@example-file'import requests
url = "https://openplatform.gateapi.io/withdraw/open/institution/otc/api/bank/create"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"bankAccountName": "<string>",
"bankName": "<string>",
"countryId": "123",
"address": "<string>",
"iban": "<string>",
"swift": "<string>"
}
headers = {
"X-GatePay-Certificate-ClientId": "<x-gatepay-certificate-clientid>",
"X-GatePay-Signature": "<x-gatepay-signature>",
"X-GatePay-Timestamp": "<x-gatepay-timestamp>",
"X-GatePay-Nonce": "<x-gatepay-nonce>",
"X-GatePay-On-Behalf-Of": "<x-gatepay-on-behalf-of>"
}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('bankAccountName', '<string>');
form.append('bankName', '<string>');
form.append('countryId', '123');
form.append('address', '<string>');
form.append('iban', '<string>');
form.append('swift', '<string>');
form.append('file', '<string>');
const options = {
method: 'POST',
headers: {
'X-GatePay-Certificate-ClientId': '<x-gatepay-certificate-clientid>',
'X-GatePay-Signature': '<x-gatepay-signature>',
'X-GatePay-Timestamp': '<x-gatepay-timestamp>',
'X-GatePay-Nonce': '<x-gatepay-nonce>',
'X-GatePay-On-Behalf-Of': '<x-gatepay-on-behalf-of>'
}
};
options.body = form;
fetch('https://openplatform.gateapi.io/withdraw/open/institution/otc/api/bank/create', 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://openplatform.gateapi.io/withdraw/open/institution/otc/api/bank/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"bankAccountName\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"bankName\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"countryId\"\r\n\r\n123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"address\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"iban\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"swift\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"X-GatePay-Certificate-ClientId: <x-gatepay-certificate-clientid>",
"X-GatePay-Nonce: <x-gatepay-nonce>",
"X-GatePay-On-Behalf-Of: <x-gatepay-on-behalf-of>",
"X-GatePay-Signature: <x-gatepay-signature>",
"X-GatePay-Timestamp: <x-gatepay-timestamp>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://openplatform.gateapi.io/withdraw/open/institution/otc/api/bank/create")
.header("X-GatePay-Certificate-ClientId", "<x-gatepay-certificate-clientid>")
.header("X-GatePay-Signature", "<x-gatepay-signature>")
.header("X-GatePay-Timestamp", "<x-gatepay-timestamp>")
.header("X-GatePay-Nonce", "<x-gatepay-nonce>")
.header("X-GatePay-On-Behalf-Of", "<x-gatepay-on-behalf-of>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"bankAccountName\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"bankName\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"countryId\"\r\n\r\n123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"address\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"iban\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"swift\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://openplatform.gateapi.io/withdraw/open/institution/otc/api/bank/create"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"bankAccountName\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"bankName\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"countryId\"\r\n\r\n123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"address\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"iban\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"swift\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-GatePay-Certificate-ClientId", "<x-gatepay-certificate-clientid>")
req.Header.Add("X-GatePay-Signature", "<x-gatepay-signature>")
req.Header.Add("X-GatePay-Timestamp", "<x-gatepay-timestamp>")
req.Header.Add("X-GatePay-Nonce", "<x-gatepay-nonce>")
req.Header.Add("X-GatePay-On-Behalf-Of", "<x-gatepay-on-behalf-of>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://openplatform.gateapi.io/withdraw/open/institution/otc/api/bank/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-GatePay-Certificate-ClientId"] = '<x-gatepay-certificate-clientid>'
request["X-GatePay-Signature"] = '<x-gatepay-signature>'
request["X-GatePay-Timestamp"] = '<x-gatepay-timestamp>'
request["X-GatePay-Nonce"] = '<x-gatepay-nonce>'
request["X-GatePay-On-Behalf-Of"] = '<x-gatepay-on-behalf-of>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"bankAccountName\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"bankName\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"countryId\"\r\n\r\n123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"address\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"iban\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"swift\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"code": "000000",
"data": {
"bankAccountId": "2897434",
"needSupplementMaterial": false
},
"status": "SUCCESS",
"errorMessage": ""
}银行账户
创建银行账户
创建用于 OTC 结算的关联银行账户。
POST
/
withdraw
/
open
/
institution
/
otc
/
api
/
bank
/
create
创建银行账户
curl --request POST \
--url https://openplatform.gateapi.io/withdraw/open/institution/otc/api/bank/create \
--header 'Content-Type: multipart/form-data' \
--header 'X-GatePay-Certificate-ClientId: <x-gatepay-certificate-clientid>' \
--header 'X-GatePay-Nonce: <x-gatepay-nonce>' \
--header 'X-GatePay-On-Behalf-Of: <x-gatepay-on-behalf-of>' \
--header 'X-GatePay-Signature: <x-gatepay-signature>' \
--header 'X-GatePay-Timestamp: <x-gatepay-timestamp>' \
--form 'bankAccountName=<string>' \
--form 'bankName=<string>' \
--form countryId=123 \
--form 'address=<string>' \
--form 'iban=<string>' \
--form 'swift=<string>' \
--form file='@example-file'import requests
url = "https://openplatform.gateapi.io/withdraw/open/institution/otc/api/bank/create"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"bankAccountName": "<string>",
"bankName": "<string>",
"countryId": "123",
"address": "<string>",
"iban": "<string>",
"swift": "<string>"
}
headers = {
"X-GatePay-Certificate-ClientId": "<x-gatepay-certificate-clientid>",
"X-GatePay-Signature": "<x-gatepay-signature>",
"X-GatePay-Timestamp": "<x-gatepay-timestamp>",
"X-GatePay-Nonce": "<x-gatepay-nonce>",
"X-GatePay-On-Behalf-Of": "<x-gatepay-on-behalf-of>"
}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('bankAccountName', '<string>');
form.append('bankName', '<string>');
form.append('countryId', '123');
form.append('address', '<string>');
form.append('iban', '<string>');
form.append('swift', '<string>');
form.append('file', '<string>');
const options = {
method: 'POST',
headers: {
'X-GatePay-Certificate-ClientId': '<x-gatepay-certificate-clientid>',
'X-GatePay-Signature': '<x-gatepay-signature>',
'X-GatePay-Timestamp': '<x-gatepay-timestamp>',
'X-GatePay-Nonce': '<x-gatepay-nonce>',
'X-GatePay-On-Behalf-Of': '<x-gatepay-on-behalf-of>'
}
};
options.body = form;
fetch('https://openplatform.gateapi.io/withdraw/open/institution/otc/api/bank/create', 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://openplatform.gateapi.io/withdraw/open/institution/otc/api/bank/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"bankAccountName\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"bankName\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"countryId\"\r\n\r\n123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"address\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"iban\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"swift\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"X-GatePay-Certificate-ClientId: <x-gatepay-certificate-clientid>",
"X-GatePay-Nonce: <x-gatepay-nonce>",
"X-GatePay-On-Behalf-Of: <x-gatepay-on-behalf-of>",
"X-GatePay-Signature: <x-gatepay-signature>",
"X-GatePay-Timestamp: <x-gatepay-timestamp>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://openplatform.gateapi.io/withdraw/open/institution/otc/api/bank/create")
.header("X-GatePay-Certificate-ClientId", "<x-gatepay-certificate-clientid>")
.header("X-GatePay-Signature", "<x-gatepay-signature>")
.header("X-GatePay-Timestamp", "<x-gatepay-timestamp>")
.header("X-GatePay-Nonce", "<x-gatepay-nonce>")
.header("X-GatePay-On-Behalf-Of", "<x-gatepay-on-behalf-of>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"bankAccountName\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"bankName\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"countryId\"\r\n\r\n123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"address\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"iban\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"swift\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://openplatform.gateapi.io/withdraw/open/institution/otc/api/bank/create"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"bankAccountName\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"bankName\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"countryId\"\r\n\r\n123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"address\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"iban\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"swift\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-GatePay-Certificate-ClientId", "<x-gatepay-certificate-clientid>")
req.Header.Add("X-GatePay-Signature", "<x-gatepay-signature>")
req.Header.Add("X-GatePay-Timestamp", "<x-gatepay-timestamp>")
req.Header.Add("X-GatePay-Nonce", "<x-gatepay-nonce>")
req.Header.Add("X-GatePay-On-Behalf-Of", "<x-gatepay-on-behalf-of>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://openplatform.gateapi.io/withdraw/open/institution/otc/api/bank/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-GatePay-Certificate-ClientId"] = '<x-gatepay-certificate-clientid>'
request["X-GatePay-Signature"] = '<x-gatepay-signature>'
request["X-GatePay-Timestamp"] = '<x-gatepay-timestamp>'
request["X-GatePay-Nonce"] = '<x-gatepay-nonce>'
request["X-GatePay-On-Behalf-Of"] = '<x-gatepay-on-behalf-of>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"bankAccountName\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"bankName\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"countryId\"\r\n\r\n123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"address\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"iban\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"swift\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"code": "000000",
"data": {
"bankAccountId": "2897434",
"needSupplementMaterial": false
},
"status": "SUCCESS",
"errorMessage": ""
}概述
本页说明POST /withdraw/open/institution/otc/api/bank/create 接口。完整的请求参数、响应结构与示例由上方关联的 OpenAPI 定义渲染。
说明
- 认证方式使用 GatePay 标准签名请求头。
- 本页展示同一接口的机构路径版本。
- 除创建子账户、查询子账户详情、分页查询子账户外,机构侧请求需携带
X-GatePay-On-Behalf-Of。 - 通用签名规则请参见 /api-reference/version/100/cn/common/securityAndSignature。
补充字段说明
请求格式
- Content-Type:
multipart/form-data - 该接口用于 OTC 法币出金前新增银行账户,创建时需要同时上传银行对账单文件。
file 上传要求
- 类型:
file - 是否必填:是
- 说明:文件不超过 4 MB,只允许
jpg、jpeg、png;需提供 3 个月内出具的银行对账单,银行账户名称必须与身份认证姓名完全一致。若因语种等原因存在差异,请同时提供相关证明材料,例如银行证明文件、护照或政府更名回执等。
请求头
用于标识调用应用的商户应用 ClientId。
按 GatePay 签名规则生成的 HMAC 签名。
毫秒级时间戳,与服务端时间偏差不得超过30秒
与时间戳配合使用的随机串,用于防止重放攻击。
必填代理归属请求头。请填写本次请求的发起方账户 ID;在机构代理商户 API 中通常填写目标子账户 ID,在机构代扣与划转接口中可填写机构账户 ID 或子账户 ID。
请求体
multipart/form-data
银行账户名称。
银行名称。
国家 ID。
银行地址。
账号或 IBAN。
SWIFT。
银行对账单文件。文件不超过 4 MB,只允许 jpg、jpeg、png;需提供 3 个月内出具的银行对账单,银行账户名称必须与身份认证姓名完全一致。若因语种等原因存在差异,请同时提供相关证明材料,例如银行证明文件、护照或政府更名回执等。
路由或清算代码。
代理银行名称。
代理银行 SWIFT。
⌘I

