Handling Component Events

Check Components emit events to signal important state changes. When instantiating the Check Component SDK, your app can listen for these events by passing an onEvent handler.

const handler = window.CheckComponent.create({
  link: componentLink,
  onEvent: (event, data) => {
    // handle Check Component events
  },
});

Below is a list of arguments the onEvent function takes in:

ArgumentsDescription
eventThe event name.
dataAdditional data (if any) for the event.

Component events can be used to trigger another workflow or spin up other Components. For example, you can tie together the Tax Setup and Payment Setup Components by surfacing the Payment Setup Component only after the check-component-tax-setup-complete event is detected.

Default Component Events

Each Component will always emit the following event(s):

EventDescription
check-component-app-loadedThis event is emitted when the Component URL is embedded successfully in the DOM.

Additional Component Events

Some Components emit additional events to signal changes such as a form submission or a bank account update. Below is a list of Events and the Components that emit them:

EventComponentDescription
check-component-employee-withholdings-setup-completeEmployee Withholding SetupEmits an event when all the withholdings are set and tax forms signed.
check-component-employee-ssn-setup-completeEmployee SSN SetupEmits an event when an employee's SSN is added.
check-component-employee-payment-setup-completeEmployee Payment SetupEmits an event when an employee has set up their payment method.
check-component-employee-bank-account-updatedEmployee Payment SetupEmits an event when an employee's bank account is updated.
check-component-employee-payment-setup-already-completeEmployee Payment SetupEmits an event when the Component is loaded and the employee has already set up their payment.
check-component-employee-paystub-downloadedEmployee PaystubsEmits an event when an employee downloads a paystub.
check-component-employee-tax-document-downloadedEmployee Tax DocumentsEmits an event when an employee downloads a tax document.
check-component-company-payment-setup-completeCompany Payment SetupEmits an event when a company's bank account is added.
check-component-company-bank-account-updatedCompany Payment SetupEmits an event when a company's bank account is updated.
check-component-company-payment-setup-already-completeCompany Payment SetupEmits an event when the Component is loaded and the company has already set up their payment.
check-component-company-tax-setup-completeCompany Tax SetupEmits an event when a company sets up their tax info.
check-component-company-filing-authorization-completeCompany Filing AuthorizationEmits an event when a company's filing authorization forms are complete.
check-component-company-details-completeCompany Details (KYB)Emits an event when a company inputs all their business details for KYB purposes.
check-component-company-tax-document-downloadedCompany Tax DocumentsEmits an event when a company downloads a tax document.
check-component-company-authorization-document-downloadedCompany Authorization DocumentsEmits an event when a company downloads an authorization document.
check-component-contractor-tax-document-downloadedContractor Tax DocumentsEmits an event when a contractor downloads a tax document.
check-component-previous-provider-access-completeCompany Previous Provider AccessEmits an event when a company submits their selected previous provider access method.