Get Bank Accounts
Overview
The Get Bank Accounts API allows you to retrieve a list of all bank accounts associated with a specific business. This includes account details, status, and metadata for each account. Account numbers are masked for security.
Resource Access
- HTTP Method:
GET - Endpoint:
/v1/businesses/{business_id}/bank_accounts - Authentication: Bearer token required
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
business_id | string (UUID) | Yes | Unique identifier for the business |
Request Headers
| Header | Value | Required | Description |
|---|---|---|---|
Accept | application/json | Yes | Content type for the response |
Authorization | Bearer {access_token} | Yes | Bearer token for authentication |
Response
Success Response (200 OK)
{
"business_id": "urn:uuid:9b397b0d-69bc-b09f-9d82-0e02637042fc",
"bank_accounts": [
{
"id": "urn:uuid:bank-account-123",
"account_number": "****4567",
"account_type": "checking",
"bank_name": "Chase",
"routing_number": "123456789",
"status": "active",
"user_data": {
"nickname": "Primary Checking",
"purpose": "Operations"
},
"created_at": "2022-01-01T00:00:00.000Z",
"updated_at": "2022-01-01T00:00:00.000Z"
},
{
"id": "urn:uuid:bank-account-456",
"account_number": "****8901",
"account_type": "savings",
"bank_name": "Bank of America",
"routing_number": "987654321",
"status": "active",
"user_data": {
"nickname": "Emergency Fund",
"purpose": "Savings"
},
"created_at": "2022-02-01T00:00:00.000Z",
"updated_at": "2022-02-01T00:00:00.000Z"
}
],
"total_count": 2
}
Response Fields
| Field | Type | Description |
|---|---|---|
business_id | string (UUID) | Business identifier |
bank_accounts | array | List of bank accounts |
total_count | integer | Total number of bank accounts |
Bank Account Fields
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Unique identifier for the bank account |
account_number | string | Masked account number for security |
account_type | string | Type of bank account |
bank_name | string | Name of the bank |
routing_number | string | ABA routing number |
status | string | Account status |
user_data | object | Additional user-defined data |
created_at | string (date-time) | Creation timestamp |
updated_at | string (date-time) | Last update timestamp |
Account Status Values
pending_verification: Account created but not yet verifiedverified: Account verified and ready for useactive: Account is active and can be used for transactionssuspended: Account temporarily suspendedclosed: Account has been closed
Account Type Values
checking: Personal checking accountsavings: Personal savings accountbusiness_checking: Business checking accountbusiness_savings: Business savings account
Error Responses
- 401 Unauthorized: Invalid or missing authentication token
- 404 Not Found: Business not found
Code Examples
cURL
curl -X GET \
'https://api.example.com/v1/businesses/urn:uuid:9b397b0d-69bc-b09f-9d82-0e02637042fc/bank_accounts' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Python
import requests
url = "https://api.example.com/v1/businesses/urn:uuid:9b397b0d-69bc-b09f-9d82-0e02637042fc/bank_accounts"
headers = {
"Accept": "application/json",
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
response = requests.get(url, headers=headers)
print(response.json())
JavaScript (Node.js)
const axios = require('axios');
const url = 'https://api.example.com/v1/businesses/urn:uuid:9b397b0d-69bc-b09f-9d82-0e02637042fc/bank_accounts';
const headers = {
'Accept': 'application/json',
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
};
axios.get(url, { headers })
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error.response.data);
});
Usage Notes
- Account numbers are always masked in responses for security
- Only accounts that the authenticated user has access to will be returned
- The response includes a total count of accounts
- Accounts are returned in no particular order
- Use the account status to determine if an account is ready for use
- The
user_datafield contains any additional metadata associated with each account