Listing accounts
GET /api/public/v1/accounts
Returns your master accounts and subaccounts, including current balances. Results are paginated.
Example request
Use the base URL for your environment. See Environments.
curl -X GET "https://api.sandbox.txn.io/api/public/v1/accounts?page=1&per_page=50" \
-H "Content-Type: application/vnd.api+json" \
-H "Authorization: Bearer <api_key>"Authentication details: Authenticating the API.
Headers
Content-Type
application/vnd.api+json
Authorization
Bearer <api_key>
URL Parameters
per_page
number
Number of accounts to return per page.
page
number
Page number to return.
Response
{
"data": [
{
"id": "adb0f9c4-c7fd-4989-a273-1bd11ad5847b",
"type": "accounts",
"attributes": {
"master": false,
"currencyCode": "EUR",
"label": "EUR_4",
"bankReference": "BDR0154632342411086",
"balance": "26.16",
"totalBalance": "26.16",
"bankWithdrawalAvailable": true,
"bankDepositAvailable": true,
"transferAvailable": true,
"currencyType": "fiat"
},
"relationships": {
"company": {
"meta": {
"included": false
}
},
"networks": {
"meta": {
"included": false
}
},
"txnBankCredentials": {
"data": [
{
"type": "txnBankCredential",
"id": "3808e047-3479-4ba9-88dc-31729b4666d5"
}
]
}
}
},
{
"id": "c569b222-6de4-4783-a3c1-8d2b8a1bb980",
"type": "accounts",
"attributes": {
"master": false,
"currencyCode": "USDC",
"label": "USDC_1",
"bankReference": "BDR0804588056382376",
"balance": "0.00",
"totalBalance": "0.00",
"bankWithdrawalAvailable": false,
"bankDepositAvailable": false,
"transferAvailable": true,
"currencyType": "crypto"
},
"relationships": {
"company": {
"meta": {
"included": false
}
},
"networks": {
"meta": {
"included": false
}
},
"txnBankCredentials": {
"data": []
}
}
},
{
"id": "1d5a3601-76b7-4426-b5fb-3e434c17803e",
"type": "accounts",
"attributes": {
"master": false,
"currencyCode": "EUR",
"label": "EUR_5",
"bankReference": "BDR0354788360836433",
"balance": "33.35",
"totalBalance": "33.35",
"bankWithdrawalAvailable": true,
"bankDepositAvailable": true,
"transferAvailable": true,
"currencyType": "fiat"
},
"relationships": {
"company": {
"meta": {
"included": false
}
},
"networks": {
"meta": {
"included": false
}
},
"txnBankCredentials": {
"data": [
{
"type": "txnBankCredential",
"id": "3808e047-3479-4ba9-88dc-31729b4666d5"
}
]
}
}
},
{
"id": "dc9c1c6e-3fa6-4fce-8c5f-714dfcecf3ee",
"type": "accounts",
"attributes": {
"master": false,
"currencyCode": "USDT",
"label": "Sub-account Adam Goodman",
"bankReference": "BDR7013714686525702",
"balance": "0.000000",
"totalBalance": "0.000000",
"bankWithdrawalAvailable": false,
"bankDepositAvailable": false,
"transferAvailable": true,
"currencyType": "crypto"
},
"relationships": {
"company": {
"meta": {
"included": false
}
},
"networks": {
"meta": {
"included": false
}
},
"txnBankCredentials": {
"data": []
}
}
},
{
"id": "d5415da2-b193-4445-aab1-a654ad77cd79",
"type": "accounts",
"attributes": {
"master": false,
"currencyCode": "EUR",
"label": "Sub-account Callum Abbott",
"bankReference": "BDR0812434002530431",
"balance": "8.44",
"totalBalance": "8.44",
"bankWithdrawalAvailable": true,
"bankDepositAvailable": true,
"transferAvailable": true,
"currencyType": "fiat"
},
"relationships": {
"company": {
"meta": {
"included": false
}
},
"networks": {
"meta": {
"included": false
}
},
"txnBankCredentials": {
"data": [
{
"type": "txnBankCredential",
"id": "3808e047-3479-4ba9-88dc-31729b4666d5"
}
]
}
}
}
],
"included": [
{
"id": "3808e047-3479-4ba9-88dc-31729b4666d5",
"type": "txnBankCredential",
"attributes": {
"currencyCode": "EUR",
"beneficiaryName": "Acme Commerce Ltd",
"iban": "DE89370400440532013000",
"bic": "COBADEFFXXX",
"bankName": "Commerzbank",
"bankAddress": "Kaiserplatz, 60311 Frankfurt am Main, Germany"
}
}
],
"meta": {
"page": 1,
"per_page": 5,
"total": 39
},
"jsonapi": {
"version": "1.0"
}
}Response Body
data[].id
string
Account ID.
data[].type
string
Entity type returned. Always accounts.
data[].attributes
object
Account attributes.
data[].attributes.master
boolean
If true, the account is a master account. If false, the account is a subaccount.
data[].attributes.currencyType
string
Currency type. Either fiat or crypto.
data[].attributes.label
string
Account label. Master accounts use master. Subaccounts use a user-defined label.
data[].attributes.bankReference
string
Unique bank deposit reference (when applicable). Example: BDR6421088115176062.
data[].attributes.balance
string
Account balance. Returned as a string for decimal precision.
data[].attributes.totalBalance
string
For master accounts only. Total balance across the master account and its subaccounts.
data[].attributes.bankWithdrawalAvailable
boolean
If true, bank withdrawals can be initiated from this account. If false, they are restricted.
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.txnBankCredentials.data[].type
string
Entity type of a linked bank credential. Always txnBankCredential.
data[].relationships.txnBankCredentials.data[].id
string
ID of a linked bank credential, expanded under included. The array is populated for fiat accounts and empty for crypto accounts.
included[].type(txnBankCredential).attributes
object
Bank deposit credentials for 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.
meta.page
number
Current page number.
meta.per_page
number
Page size used for the response.
meta.total
number
Total number of accounts available.
jsonapi.version
string
JSON:API version.
Errors
401 Unauthorizedif the API key is missing or invalid. See Authenticating the API.429 Too Many Requestsif you hit rate limits. See Rate limits.
Related endpoints
Last updated