/bank_accountsCreate
Body — 1:1 with CreateBankAccountDTO. Required: account, type. account is your own account (payout destination, gets provider recipients) or one of your connected accounts (reference only, no provider recipient). Sending customer_id is refused with E6422.
Works regardless of whether Wise is enabled for the application country. When UseWise=false the local row persists with extractor-derived columns; when UseWise=true Wise dual-write enriches the row with a recipient ref + routing number. Plan goal #1 — bookbank rows MUST be created locally regardless of Wise.
Top-level type values
| Value | Required fields | Extra-fields shape |
|---|---|---|
bookbank | account_holder_name, target | Wise camelCase keys: bankCode, accountNumber, optional branchCode / accountType. Extra fields like legalType are forwarded verbatim to Wise (when UseWise=true) but not persisted locally. |
promptpay_phone | phone_number, account_holder_name | (none — phone_number is top-level) |
promptpay_primary_identify_id | primary_identify_id, account_holder_name | (none — primary_identify_id is top-level) |
type namespace gotcha: the top-level type here is OUR internal discriminator (always bookbank regardless of country). Wise's own type literal (e.g. thai for TH) is server-derived via bank_account.WiseTypeForBookbank(country) and never echoed by the frontend. See BOOKBANK_EXAMPLES.md §1.1.1.
Request
Example
curl -X POST 'https://api.paycose.com/api/v1/app1/platform/wallet/bank_accounts/' \
-H 'X-Session-Token: {{session_token}}' \
-H 'X-Country: {{country}}' \
-H 'X-Test-Mode: {{x_test_mode}}' \
-d '{
"account": "{{account_id}}",
"account_holder_name": "Somchai Jaidee",
"phone_number": "",
"primary_identify_id": "",
"extra_fields": {
"bankCode": "004",
"accountNumber": "1234567890",
"branchCode": "0001",
"accountType": "savings",
"legalType": "PRIVATE"
},
"target": "THB",
"provider": "<string>",
"type": "bookbank",
"metadata": {
"nickname": "Main payout account"
},
"labels": [
"<string>"
]
}'Headers
| Name | Value | Description |
|---|---|---|
| X-Session-Token | {{session_token}} | |
| X-Country | {{country}} | |
| X-Test-Mode | {{x_test_mode}} | true=wallet_test, false=wallet_live (default). Toggle the x_test_mode collection variable to flip every applicable request. |
Body
| Name | Type | Value |
|---|---|---|
| account | string | {{account_id}} |
| account_holder_name | string | Somchai Jaidee |
| phone_number | string | |
| primary_identify_id | string | |
| extra_fields | object | {…} |
| target | string | THB |
| provider | string | <string> |
| type | string | bookbank |
| metadata | object | {…} |
| labels | array | [1] |
{
"account": "{{account_id}}",
"account_holder_name": "Somchai Jaidee",
"phone_number": "",
"primary_identify_id": "",
"extra_fields": {
"bankCode": "004",
"accountNumber": "1234567890",
"branchCode": "0001",
"accountType": "savings",
"legalType": "PRIVATE"
},
"target": "THB",
"provider": "<string>",
"type": "bookbank",
"metadata": {
"nickname": "Main payout account"
},
"labels": [
"<string>"
]
}Responses
Headers
| Name | Value |
|---|---|
| Content-Type | application/json |
Body
{
"id": "<string>",
"object": "<string>",
"resource": "<string>",
"created_at": "<RFC3339 timestamp>",
"errors": [
{
"code": "<string>",
"message": "<string>"
}
],
"next_action": [
{
"type": "<string>",
"title": "<string>",
"description": "<string>",
"i18n_key": "<string>",
"url": "<string>",
"client_secret": "<string>",
"payment_method": "<string>",
"qr_data": "<string>"
}
]
}Headers
| Name | Value |
|---|---|
| Content-Type | application/json |
Body
{
"object": "error",
"code": "<string>",
"key": "<string>",
"i18n_key": "<string>",
"message": "<string>",
"request_id": "<string>"
}