Paycose Docs
Bank Account
POST/bank_accounts

Create

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

ValueRequired fieldsExtra-fields shape
bookbankaccount_holder_name, targetWise camelCase keys: bankCode, accountNumber, optional branchCode / accountType. Extra fields like legalType are forwarded verbatim to Wise (when UseWise=true) but not persisted locally.
promptpay_phonephone_number, account_holder_name(none — phone_number is top-level)
promptpay_primary_identify_idprimary_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

NameValueDescription
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

NameTypeValue
accountstring{{account_id}}
account_holder_namestringSomchai Jaidee
phone_numberstring
primary_identify_idstring
extra_fieldsobject{…}
targetstringTHB
providerstring<string>
typestringbookbank
metadataobject{…}
labelsarray[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

200200 OK

Headers

NameValue
Content-Typeapplication/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>"
    }
  ]
}
400400 Bad Request

Headers

NameValue
Content-Typeapplication/json

Body

{
  "object": "error",
  "code": "<string>",
  "key": "<string>",
  "i18n_key": "<string>",
  "message": "<string>",
  "request_id": "<string>"
}

On this page