Skip to main content
Connect.js exposes five public methods for mounting, opening, closing, and querying the widget integration.

setup(config?)

Mounts the widget in the document and keeps it hidden until open() runs.
Pass optional institution and account-match configuration to start further into an account-linking flow.

reauthorise(accountId)

Mounts the reauthorization widget for an existing linked account. The widget remains hidden until open() runs.
The method throws when the account ID is missing or is not a string. Use reauthorise() in place of setup() for a reauthorization instance.

open()

Shows the widget mounted by setup() or reauthorise() and starts the window-message listener used for callbacks.
Call open() from an explicit user action such as a button click.

close()

Hides the widget, removes the active window-message listener, and invokes the configured onClose callback.
The SDK also closes the widget after a successful account-linking or charge-complete message.

fetchInstitutions()

Requests institution coverage from https://api.withmono.com/coverage through Axios.
The method returns the Axios promise rather than only its data property. Handle network and non-success responses.

Complete lifecycle