Accounts
Accounts represent the financial accounts an organization holds with Flex. Use the Accounts API to list accounts, retrieve their details and balances, open banking accounts, rename accounts, and request account closure.
Each account has a unique id and an organizationId identifying the organization it belongs to. An organization can have multiple accounts.
Account types
The type field identifies the account type:
| Type | Description |
|---|---|
banking | A deposit account that holds the organization’s funds and may have associated Reward Cards. |
credit | A credit account. Its available balance represents the amount available to spend. |
crypto | A cryptocurrency account, including stablecoins such as USDC and USDT. |
investment | An investment account. Its available balance represents cash available to withdraw, rather than the account’s total value. |
Opening an account through this API supports banking only. When Reward Cards are enabled for your organization, opening a banking account also sets it up for Reward Card use. The returned account has type banking.
Account closure through this API also supports banking only. Credit, crypto, and investment accounts cannot be closed through this API.
Balances
Each account includes a balances object. The balances returned depend on the account type:
| Account type | Balances |
|---|---|
banking | available, pending, hold |
credit | available, hold |
crypto | available, pending, hold |
investment | available, pending, hold |
available is the amount available to spend or withdraw. pending represents funds awaiting settlement, and hold represents reserved funds.
Balance amounts include their currency and scale. An asOf timestamp indicates when a balance was last confirmed. See Amounts for how to interpret monetary values.
Access and changes
Your API key needs the appropriate permission in the account’s organization:
| Action | Required scope |
|---|---|
| List or retrieve accounts | accounts:read |
| Open or rename accounts | accounts:write |
| Close accounts | accounts:close |
Every write request requires an idempotencyKey. Reuse the same key and request data when retrying the same operation. See Idempotency.