# JS Button
Caisson(public_api_key) to initialize the Caisson library. Your public api key is required.
Create an ID Check button element. It accepts a configuration object. The available options are:
customer_id(Optional): A string identifying this specific ID Check in your system. The field will be displayed in the dashboard next to each ID Check. This is a free-form string that can be populated with the anything that may help identify ID Checks within your application.
appearance(Optional): A string specifying the background color of the button. Available options are:
"dark". Defaults to
# Return value:
A button DOM element to be mounted on your page.
The ID Check button emits several events during the ID Check process. Use the
on() method to register an event handler.
| ||Fired when the ID Check is created after the button is clicked. The handler will receive an |
| ||Fired when your user completes the ID Check flow on their mobile device. The handler receives no payload.|
| ||Fired when an error occurs during the process of creating the ID Check. The payload is an error string describing the error that occurred.|
button.mount() method attaches the ID Check button to the DOM. It accepts a CSS Selector. Here's an example: