账户
创建账户
为 onboarding 状态为成功的实体创建银行账户
POST
/
banking
/
accounts
创建账户(银行连接)
curl --request POST \
--url https://api-sandbox.y.uno/v1/banking/accounts \
--header 'Content-Type: application/json' \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>' \
--header 'x-idempotency-key: <x-idempotency-key>' \
--data '
{
"account_id": "550e8400-e29b-41d4-a716-446655440000",
"entity_id": "660e8400-e29b-41d4-a716-446655440000",
"onboarding_id": "990e8400-e29b-41d4-a716-446655440000",
"connection_id": "bb0e8400-e29b-41d4-a716-446655440000",
"account_type": "CHECKING",
"country": "US",
"currency": "USD"
}
'import requests
url = "https://api-sandbox.y.uno/v1/banking/accounts"
payload = {
"account_id": "550e8400-e29b-41d4-a716-446655440000",
"entity_id": "660e8400-e29b-41d4-a716-446655440000",
"onboarding_id": "990e8400-e29b-41d4-a716-446655440000",
"connection_id": "bb0e8400-e29b-41d4-a716-446655440000",
"account_type": "CHECKING",
"country": "US",
"currency": "USD"
}
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"public-api-key": "<api-key>",
"private-secret-key": "<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>',
'public-api-key': '<api-key>',
'private-secret-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
account_id: '550e8400-e29b-41d4-a716-446655440000',
entity_id: '660e8400-e29b-41d4-a716-446655440000',
onboarding_id: '990e8400-e29b-41d4-a716-446655440000',
connection_id: 'bb0e8400-e29b-41d4-a716-446655440000',
account_type: 'CHECKING',
country: 'US',
currency: 'USD'
})
};
fetch('https://api-sandbox.y.uno/v1/banking/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-sandbox.y.uno/v1/banking/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([
'account_id' => '550e8400-e29b-41d4-a716-446655440000',
'entity_id' => '660e8400-e29b-41d4-a716-446655440000',
'onboarding_id' => '990e8400-e29b-41d4-a716-446655440000',
'connection_id' => 'bb0e8400-e29b-41d4-a716-446655440000',
'account_type' => 'CHECKING',
'country' => 'US',
'currency' => 'USD'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"private-secret-key: <api-key>",
"public-api-key: <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.y.uno/v1/banking/accounts"
payload := strings.NewReader("{\n \"account_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"entity_id\": \"660e8400-e29b-41d4-a716-446655440000\",\n \"onboarding_id\": \"990e8400-e29b-41d4-a716-446655440000\",\n \"connection_id\": \"bb0e8400-e29b-41d4-a716-446655440000\",\n \"account_type\": \"CHECKING\",\n \"country\": \"US\",\n \"currency\": \"USD\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
req.Header.Add("public-api-key", "<api-key>")
req.Header.Add("private-secret-key", "<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.y.uno/v1/banking/accounts")
.header("x-idempotency-key", "<x-idempotency-key>")
.header("public-api-key", "<api-key>")
.header("private-secret-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"entity_id\": \"660e8400-e29b-41d4-a716-446655440000\",\n \"onboarding_id\": \"990e8400-e29b-41d4-a716-446655440000\",\n \"connection_id\": \"bb0e8400-e29b-41d4-a716-446655440000\",\n \"account_type\": \"CHECKING\",\n \"country\": \"US\",\n \"currency\": \"USD\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/banking/accounts")
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["public-api-key"] = '<api-key>'
request["private-secret-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"entity_id\": \"660e8400-e29b-41d4-a716-446655440000\",\n \"onboarding_id\": \"990e8400-e29b-41d4-a716-446655440000\",\n \"connection_id\": \"bb0e8400-e29b-41d4-a716-446655440000\",\n \"account_type\": \"CHECKING\",\n \"country\": \"US\",\n \"currency\": \"USD\"\n}"
response = http.request(request)
puts response.read_body{
"id": "aa0e8400-e29b-41d4-a716-446655440000",
"entity_id": "660e8400-e29b-41d4-a716-446655440000",
"onboarding_id": "990e8400-e29b-41d4-a716-446655440000",
"account_id": "550e8400-e29b-41d4-a716-446655440000",
"provider": {
"account_id": "col_bank_account_789"
},
"account_type": "CHECKING",
"status": "ACTIVE",
"account_number": "1234567890",
"routing_number": "123456789",
"iban": null,
"currency": "USD",
"balance": {
"available": 0,
"current": 0,
"pending": 0
},
"account_details": {
"account_name": "John Doe - Checking",
"sort_code": null,
"bsb": null,
"swift": null
},
"payment_rails": {
"incoming": [
"ACH_STANDARD",
"WIRE"
],
"outgoing": [
"ACH_STANDARD",
"WIRE"
]
},
"supports_book_transfers": true,
"created_at": "2026-02-01T10:10:00Z",
"updated_at": "2026-02-01T10:10:00Z"
}
为已完成 onboarding 的实体创建银行账户。
onboarding_id 引用的 onboarding 必须为 status: SUCCEEDED。类型为 PREVIOUSLY_ONBOARDED 的 onboarding 目前无法创建账户:API 会返回 500 和 PROVIDER_ACCOUNT_CREATION_FAILED。
响应包含特定于区域的银行标识符。各区域返回哪些字段,请参阅 按区域划分的账户标识符。请求头
用于 HTTP 标头的唯一标识符,确保即使因网络问题或超时而重试,请求也只会被处理一次。详情请参阅身份验证(UUID)。
请求体
application/json
商户的 Yuno 账户的唯一标识符。可在 Yuno Dashboard 中找到(UUID,36 个字符)。
示例:
"550e8400-e29b-41d4-a716-446655440000"
拥有该账户的实体的 id,从创建实体获取(UUID,36 个字符)。
示例:
"660e8400-e29b-41d4-a716-446655440000"
从创建实体 onboarding 获取的成功 onboarding 的 id(UUID,36 个字符)。该 onboarding 必须为 status: SUCCEEDED。
示例:
"990e8400-e29b-41d4-a716-446655440000"
账户的币种(ISO 4217,3 个字符)。支持的值取决于服务提供商所在区域:USD(美国)、GBP(英国)、AUD(澳大利亚)、EUR(欧盟)。
示例:
"USD"
账户所在国家/地区(ISO 3166-1 alpha-2,2 个字符)。
示例:
"US"
响应
此页面对您有帮助吗?
⌘I
创建账户(银行连接)
curl --request POST \
--url https://api-sandbox.y.uno/v1/banking/accounts \
--header 'Content-Type: application/json' \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>' \
--header 'x-idempotency-key: <x-idempotency-key>' \
--data '
{
"account_id": "550e8400-e29b-41d4-a716-446655440000",
"entity_id": "660e8400-e29b-41d4-a716-446655440000",
"onboarding_id": "990e8400-e29b-41d4-a716-446655440000",
"connection_id": "bb0e8400-e29b-41d4-a716-446655440000",
"account_type": "CHECKING",
"country": "US",
"currency": "USD"
}
'import requests
url = "https://api-sandbox.y.uno/v1/banking/accounts"
payload = {
"account_id": "550e8400-e29b-41d4-a716-446655440000",
"entity_id": "660e8400-e29b-41d4-a716-446655440000",
"onboarding_id": "990e8400-e29b-41d4-a716-446655440000",
"connection_id": "bb0e8400-e29b-41d4-a716-446655440000",
"account_type": "CHECKING",
"country": "US",
"currency": "USD"
}
headers = {
"x-idempotency-key": "<x-idempotency-key>",
"public-api-key": "<api-key>",
"private-secret-key": "<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>',
'public-api-key': '<api-key>',
'private-secret-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
account_id: '550e8400-e29b-41d4-a716-446655440000',
entity_id: '660e8400-e29b-41d4-a716-446655440000',
onboarding_id: '990e8400-e29b-41d4-a716-446655440000',
connection_id: 'bb0e8400-e29b-41d4-a716-446655440000',
account_type: 'CHECKING',
country: 'US',
currency: 'USD'
})
};
fetch('https://api-sandbox.y.uno/v1/banking/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-sandbox.y.uno/v1/banking/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([
'account_id' => '550e8400-e29b-41d4-a716-446655440000',
'entity_id' => '660e8400-e29b-41d4-a716-446655440000',
'onboarding_id' => '990e8400-e29b-41d4-a716-446655440000',
'connection_id' => 'bb0e8400-e29b-41d4-a716-446655440000',
'account_type' => 'CHECKING',
'country' => 'US',
'currency' => 'USD'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"private-secret-key: <api-key>",
"public-api-key: <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.y.uno/v1/banking/accounts"
payload := strings.NewReader("{\n \"account_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"entity_id\": \"660e8400-e29b-41d4-a716-446655440000\",\n \"onboarding_id\": \"990e8400-e29b-41d4-a716-446655440000\",\n \"connection_id\": \"bb0e8400-e29b-41d4-a716-446655440000\",\n \"account_type\": \"CHECKING\",\n \"country\": \"US\",\n \"currency\": \"USD\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-idempotency-key", "<x-idempotency-key>")
req.Header.Add("public-api-key", "<api-key>")
req.Header.Add("private-secret-key", "<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.y.uno/v1/banking/accounts")
.header("x-idempotency-key", "<x-idempotency-key>")
.header("public-api-key", "<api-key>")
.header("private-secret-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"entity_id\": \"660e8400-e29b-41d4-a716-446655440000\",\n \"onboarding_id\": \"990e8400-e29b-41d4-a716-446655440000\",\n \"connection_id\": \"bb0e8400-e29b-41d4-a716-446655440000\",\n \"account_type\": \"CHECKING\",\n \"country\": \"US\",\n \"currency\": \"USD\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.y.uno/v1/banking/accounts")
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["public-api-key"] = '<api-key>'
request["private-secret-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"entity_id\": \"660e8400-e29b-41d4-a716-446655440000\",\n \"onboarding_id\": \"990e8400-e29b-41d4-a716-446655440000\",\n \"connection_id\": \"bb0e8400-e29b-41d4-a716-446655440000\",\n \"account_type\": \"CHECKING\",\n \"country\": \"US\",\n \"currency\": \"USD\"\n}"
response = http.request(request)
puts response.read_body{
"id": "aa0e8400-e29b-41d4-a716-446655440000",
"entity_id": "660e8400-e29b-41d4-a716-446655440000",
"onboarding_id": "990e8400-e29b-41d4-a716-446655440000",
"account_id": "550e8400-e29b-41d4-a716-446655440000",
"provider": {
"account_id": "col_bank_account_789"
},
"account_type": "CHECKING",
"status": "ACTIVE",
"account_number": "1234567890",
"routing_number": "123456789",
"iban": null,
"currency": "USD",
"balance": {
"available": 0,
"current": 0,
"pending": 0
},
"account_details": {
"account_name": "John Doe - Checking",
"sort_code": null,
"bsb": null,
"swift": null
},
"payment_rails": {
"incoming": [
"ACH_STANDARD",
"WIRE"
],
"outgoing": [
"ACH_STANDARD",
"WIRE"
]
},
"supports_book_transfers": true,
"created_at": "2026-02-01T10:10:00Z",
"updated_at": "2026-02-01T10:10:00Z"
}