AccountsAPI

Provides coroutine and callback-based operations for managing accounts.

Functions

Link copied to clipboard

Confirms a phone verification using the code sent to the account holder.

Link copied to clipboard

Creates a new account and emits a Sift login event on success.

Link copied to clipboard

Initiates a phone verification for an account.

Link copied to clipboard
fun deleteAccountWith(accountId: String, completionHandler: (AccountObjects.Account?, NetworkingError?) -> Unit)

Deletes an account by ID.

Link copied to clipboard
suspend fun getAccounts(status: AccountObjects.AccountStatus? = null, type: AccountObjects.AccountType? = null, externalId: String? = null, includeDisabled: Boolean = false, page: Int? = null, perPage: Int? = null): Pair<AccountResponses.ListAccountsResponse?, NetworkingError?>
fun getAccounts(status: AccountObjects.AccountStatus? = null, type: AccountObjects.AccountType? = null, externalId: String? = null, includeDisabled: Boolean = false, page: Int? = null, perPage: Int? = null, completionHandler: (AccountResponses.ListAccountsResponse?, NetworkingError?) -> Unit)

Retrieves a paginated list of accounts, optionally filtered.

Link copied to clipboard
suspend fun getAccountWith(accountId: String, forTesting: Boolean = false): Pair<AccountObjects.Account?, NetworkingError?>
fun getAccountWith(accountId: String, completionHandler: (AccountObjects.Account?, NetworkingError?) -> Unit)

Retrieves a single account by ID and emits a Sift login event on success.

Link copied to clipboard

Retrieves a Plaid Link token for the given account to initiate a bank-account connection flow.

Link copied to clipboard
fun restrictAccount(accountId: String, completionHandler: (AccountObjects.Account?, NetworkingError?) -> Unit)

Restricts an account, preventing it from processing payments.

Link copied to clipboard
suspend fun searchAccounts(email: String? = null, externalId: String? = null, type: AccountObjects.AccountType? = null, status: AccountObjects.AccountStatus? = null, createdBefore: String? = null, createdAfter: String? = null): Pair<AccountResponses.SearchAccountsResponse?, NetworkingError?>
fun searchAccounts(email: String? = null, externalId: String? = null, type: AccountObjects.AccountType? = null, status: AccountObjects.AccountStatus? = null, createdBefore: String? = null, createdAfter: String? = null, completionHandler: (AccountResponses.SearchAccountsResponse?, NetworkingError?) -> Unit)

Searches for accounts matching the given criteria.

Link copied to clipboard
fun unrestrictAccount(accountId: String, completionHandler: (AccountObjects.Account?, NetworkingError?) -> Unit)

Removes a restriction from an account.

Link copied to clipboard

Updates an existing account.