Manage a Bank Account
Prerequisites
- Client ID
- Client Secret
- OAuth Token
- Open Business
Add a Bank Account
You need to attach a bank account to a business for withdrawals from the Treasure account. You can achieve this by making a POST request to /v1/businesses/{business_id}/bank_accounts:
{
"account_number": "1234567",
"account_type": "checking",
"bank_name": "Chase",
"routing_number": "399273118",
"user_data": {
"customerID": 123456
}
}
This call returns a bank account ID, which you will use in other calls:
{
"id": "09acfbdc4f30-11ee-a4b6-13bb140afaf7",
"account_number": "1234567",
"account_type": "checking",
"bank_name": "Chase",
"routing_number": "399273118",
"user_data": {
"customerID": 123456
}
}
Businesses can have multiple bank accounts associated with them.
Update a Bank Account
Once added, you have the ability to update a bank account. You can do so by sending a POST request to /v1/businesses/{business_id}/bank_accounts/{bank_account_id} and providing the business ID and the bank account ID.
Retrieve All Bank Accounts
You can retrieve all bank accounts associated with a business by making a GET request to /v1/businesses/{business_id}/bank_accounts. In addition to the account number, account type, bank name, and routing number, you can include any other user data you want to track in this call.
The response body adheres to the BankAccountsList schema. Here's an example:
[
{
"id": "ac189ad4-10b6-11ee-a8ec-0130d3df8da6",
"account_number": "1234567",
"account_type": "checking",
"bank_name": "Chase",
"routing_number": "123456789",
"user_data": {
"customerID": "123456"
}
}
]
Retrieve a Specific Bank Account
Similarly, you can retrieve a specific bank account for a business by sending a GET request to /v1/businesses/{business_id}/bank_accounts/{bank_account_id} and providing the business ID and the bank account ID.