Prerequisites
- Client ID
- Client Secret
- OAuth Token
To open your Treasure Account, you first need to create a business, which you can do by sending a POST request to the /v1/businesses endpoint. Your request should look like this:
{
"legal_name": "Treasure Financial",
"doing_business_as": "Treasure",
"user_data": {
"customerID": "123456"
}
}
Note: you can include user_data that the API will consistently provide back to you.
A successful call will return the following:
{
"id": "ad05e7bd-4f2a-11ee-a4b6-9f752b00326e",
"created_at": "2023-09-09T16:05:20.527655251Z",
"updated_at": "2023-09-09T16:05:20.527703801Z",
"legal_name": "Treasure Financial",
"doing_business_as": "Treasure",
"status": "PENDING",
"sub_status": "AWAITING_ONBOARDING_INFORMATION",
"user_data": {
"customerID": "123456"
}
}
You should save the business ID returned, as you will need it to call information on this business moving forward.
As demonstrated in the sample response, when you first create a business, its state will be pending, with its substatus set as AWAITING_ONBOARDING_INFORMATION. In order for the business's account to be considered open, you must complete onboarding information. Once the information has been approved by Treasure and a brokerage account has been opened for the business, the account’s status will be changed to open. All money movement operations require the business to be in an open state.
Read more about how to complete onboarding in the next section,
Onboard a Business.