Lending Widget Integration

The integrating website/app should include the lending-widget.js script along with the selector <lending-widget referral="" theme="" logo=""></lending-widget>.

The referral parameter is optional and can include integrator's referral code.

The width parameter should include the width of the widget in px you want to be on your website. The widget is optimized for a minimum width of 450px

The height parameter should include the height of the widget in px you want to be on your website.

The theme parameter should include one of the current supported themes: default and light

A unique user ID to track users can be set by integrators by selecting the widget and using the following function:

LendingWidget.set('customer_data', { userId: USER_ID });

USER_ID must be replaced with the ID of the user as a string.

There is one event that an integrator can listen to: smartcreditio_launched. This event is triggered when user clicks Launch SmartCredit.io button and will return an object with the values selected by the user. Events can be subscribed to by selecting the widget and using the following function:

LendingWidget.addEventListener('EVENT_NAME', (event) => event.detail)

EVENT_NAME must be replaced with the event name.

The widget is optimized for a minimum width of 450px.

Last updated