Collects bank account information from employers. It guides them through entering bank account details such as routing number and account number.

Employer bank accounts
Options
| Name | Type | Description |
|---|---|---|
userToken | String | Required. A User Token with EMPLOYER_ADMIN access role for the specified Employer. |
employerId | String | Required. The id of the Employer. |
displayMode | String | Configures the layout of the embedded experience. Options are: drawer, modal, and inline. Defaults to drawer if not provided. |
title | String | Optional custom title to display in the layout. |
closeDisabled | Boolean | Applicable to modal and drawer modes. Disables the close functionality. Consumers are responsible for handling the behavior triggered when the close event occurs. Defaults to false |
Refer to the reference on creating elements for the additional options that are available to all elements.
Embedded usage
Element name: employer-bank-accounts
Refer to the guide on how to embed an Element with Salsa.js for more detailed instructions.
Example
salsa.elements.create('employer-bank-accounts', {
userToken: 'eyJhbGciO...ajs0Wqw',
employerId: 'er_e8343fc7-9d63-4cc5-81ed-c573fc666d37',
displayMode: 'modal',
title: 'My custom title',
closeDisabled: true
});Events
Refer to the documentation on Element events for more information about events and instructions on how to consume them.
bankaccountcreated event
bankaccountcreated eventThe bankaccountcreated event is triggered when the user adds a new bank account
Event object properties
| Name | Type | Description |
|---|---|---|
elementType | String | employer-bank-accounts |
employerId | String | The id of Employer. |
bankAccountId | String | The id of the bank account. |
isDefault | Boolean | Flag showing if the bank account corresponds to the employer's default bank account. |
bankaccountverified event
bankaccountverified eventThe bankaccountverified event is triggered when the bank account has been verified.
Event object properties
| Name | Type | Description |
|---|---|---|
elementType | String | employer-bank-accounts |
employerId | String | The id of Employer. |
bankAccountId | String | The id of the bank account. |
isDefault | Boolean | Flag showing if the bank account corresponds to the employer's default bank account. |
bankaccountauthorized event
bankaccountauthorized eventThe bankaccountauthorized event is triggered when the bank account has been authorized.
Event object properties
| Name | Type | Description |
|---|---|---|
elementType | String | employer-bank-accounts |
employerId | String | The id of Employer. |
bankAccountId | String | The id of the bank account. |
isDefault | Boolean | Flag showing if the bank account corresponds to the employer's default bank account. |
close event
close eventThe close event is triggered when the user completes cancels the bank account flow or closes the drawer/modal.
Event object properties
| Name | Type | Description |
|---|---|---|
elementType | String | employer-bank-accounts |
employerId | String | The id of Employer. |
displayMode | String | The display mode used (drawer, modal or inline). |
