Skip to main content

Bank Login Widget

Lokyata's Bank Login widget is a powerful UI widget to allow borrowers to connect to their financial institutions and pull their transaction data into BankAnalyze. The Bank Login widget is hosted by Lokyata by default but can also be easily embedded as an iframe into a third-party site.

URL#

Bank login url consists of two parts:

  1. Base url:
Production: https://banklogin.lokyata.com/{reportId}Sandbox: https://sandbox-banklogin.netlify.app/{reportId}
  1. Report ID: reportId follows after the base url and represents the specific report the borrower data will be populated into after log in. For example:
https://banklogin.lokyata.com/AV3VVD
https://banklogin.lokyata.com/F3DDFD

Embedding the Widget#

Use the following HTML snippet to integrate the Lokyata Bank Login widget into your website.

<iframe  src="https://banklogin.lokyata.com/AV3VVD"  width="100%"  height="100%"></iframe>

PostMessage Events#

The widget triggers postMessage events when the login process is complete. You can use these messages to respond to a status of a connected or failed report.

Events from Lokyata will have 2 properties, "lokyata" and "type".

function handleEvent(event) {  if (event.data.lokyata) {    // handle the lokyata post message using event.data.type.  }}
window.addEventListener("message", handleEvent);

The following events are triggered from the Bank Login widget.

Bank login connected#

Triggered when a user has successfully connected the account.

{  "type": "banklogin/connected",  "lokyata": true}

Bank login failed#

Triggered when a user has not successfully connected the account, meaning that something went wrong on our end during the process.

{  "type": "banklogin/failed",  "lokyata": true}

Bank Login Sandbox#

When you are using the Bank Login sandbox widget, connectivity to external financial institutions is disabled. Reports created in the sandbox are not billable. In order to replicate a successful and failed login attempt in the sandbox, we have configured it such that logging into Lokyata Bank with any credentials will always succeed and logging into any other financial institution will always fail. You can leverage this while testing to consistently create success and failed cases.