Listing subaccounts for master account
GET /api/public/v1/accounts/:account_id/subaccounts
Returns the subaccounts of one master account with their current balances. Use it to enumerate the accounts you opened under a currency, for example one per client; the master account itself is not included. Results are paginated.
Headers
Content-Type
application/vnd.api+json
Authorization
Bearer <api_key>
Path Parameters
account_id
string
Master account ID.
URL Parameters
label
string
Return only subaccounts whose label contains this text. The match is case-insensitive.
order
string
Field to sort by. Can be created_at or updated_at. Defaults to created_at.
order_type
string
Sort direction, asc or desc. Defaults to desc.
per_page
number
Number of accounts per page to return.
page
number
Page for which you want to return accounts.
cURL
curl -G "https://api.sandbox.txn.io/api/public/v1/accounts/e289de2b-37bd-4eff-b832-f754c31a2d95/subaccounts" \
-H 'Content-Type: application/vnd.api+json' \
-H 'Authorization: Bearer <api_key>' \
--data-urlencode 'per_page=50' \
--data-urlencode 'page=1'Response
Response Body
data[].id
string
Account ID.
data[].type
string
Entity type returned. Always accounts.
data[].attributes
object
A set of account attributes.
data[].attributes.master
boolean
If true, account is master. If false, account is subaccount.
data[].attributes.bankReference
string
Unique bank deposit reference for each account and subaccount. Example: BDR6421088115176062.
data[].attributes.currencyCode
string
Account currency code. Refer to the list of supported currencies.
data[].attributes.balance
string
Account balance.
data[].attributes.totalBalance
string
Total balance across the master account and all subaccounts (applicable to master accounts).
data[].attributes.bankWithdrawalAvailable
boolean
If true, bank withdrawals can be initiated from this account. If false, they are restricted.
data[].attributes.currencyType
string
Account currency type. Can be either fiat or crypto.
data[].attributes.label
string
Account label. Master accounts use master. Subaccounts use a user-defined label.
data[].attributes.bankDepositAvailable
boolean
If true, bank deposits can be made to this account. If false, they are restricted.
data[].attributes.transferAvailable
boolean
If true, transfers between this account and other accounts are allowed. If false, they are restricted.
data[].relationships.company
object
Not expanded (meta.included is false).
data[].relationships.networks
object
Not expanded on this endpoint (meta.included is false). Read the account to get the networks it can receive deposits on.
data[].relationships.txnBankCredentials
array
Bank details for funding the account by bank transfer; data[].type is txnBankCredential. Populated when bankDepositAvailable is true and Txn holds bank credentials for the account currency, empty otherwise (always empty for crypto accounts). The entities are returned in included[].
included[].type(txnBankCredential)
object
Bank deposit credentials of a fiat account. Use these details to fund the account by bank transfer.
included[].type(txnBankCredential).attributes.currencyCode
string
Currency of the bank credential.
included[].type(txnBankCredential).attributes.beneficiaryName
string
Name of the beneficiary on the bank account.
included[].type(txnBankCredential).attributes.iban
string
Beneficiary IBAN.
included[].type(txnBankCredential).attributes.bic
string
Beneficiary bank BIC/SWIFT code.
included[].type(txnBankCredential).attributes.bankName
string
Name of the beneficiary's bank.
included[].type(txnBankCredential).attributes.bankAddress
string
Address of the beneficiary's bank.
Last updated