UI configuration and API triggers for iBranch

Custom Config

Side button position

The side button position can be configured as a percentage relative to the window height. The default is 50 which is at the center.

// This will put the side button at the 30% of the window height
const config = { buttonPositionPercentage: 30 };

lendica.init(credentials, config).then(() => {

Custom API

If you wish to customize the usage of iBranch, you can build your own triggers to open iBranch programmatically with the following routes.

Open an invoice or bill in-app

Open an invoice in FundNow

// Make sure ibranch is already initialized and rendered
// Pass in partner_invoice_uuid and open invoice FundNow
// Pass in the optional invoice total to get marketing offer based on the total amount only
lendica.ibranch.openFundNow(partner_invoice_uuid, total, onSuccess, onExit);

Open a bill in PayLater

// Pass in partner_bill_uuid
// Pass in the optional bill total to get marketing offer based on the total amount only
lendica.ibranch.openPayLater(partner_bill_uuid, total, onSuccess, onExit);

onSuccess and onExit event handlers

onSuccess = (event) => {
  // handle deal activation success event
  // event.eventName: "DEAL_ACTIVATED"
  // event.displayMessage: "Deal activated successfully."

onExit = (event) => {
  // Handle exit events triggered when deal activation flow is ended by following events
  // See below for a list of exit events

See last section for list of exit events available.

Triggers to open iBranch

Neutral route to open iBranch programmatically.

// iBranch will display the last page that the user visited

You can also open ibranch on specific pages.

// Available routes

// Account summary with total credit available and deals table

// Product pages with credit available and invoice table
lendica.ibranch.open('paylater'); // if PayLater is available for the partner
lendica.ibranch.open('fundnow'); // if FundNow is available for the partner

// Upcoming payment schedules and transaction history

// Download reports

// Account settings page, with company contact info, and ability to add new bank accounts

// Learn more information page

Open application

Neutral route to open ibranch on application page. If customer has already been approved, it will redirect to Wallet page.


Remove iBranch

Remove iBranch from DOM.


After removing, you can call render again to remount iBranch to DOM.

//...after ibranch removed

Subscribe to events

Subscribe to and handle all events. See last section for list of events available.

// Subscribe to specific event type, currently available event types are 'success' and 'exit'
lendica.subscribe("success", (event) => {});

// Subscribe to all events
lendica.subscribe("*", (type, event) => {});

// Unsubscribe
lendica.unsubscribe("success", (event) => {});

// Clear all event listeners

Event object schema

  "eventName": "EVENT_NAME",
  "displayMessage": "Detailed message about the event."

List of events available

successDEAL_ACTIVATEDDeal activated successfully.paylater or fundnow deal has activated successfully
exitAPPLICATION_PENDINGYour application is under review. Please check your email for further instructions.user submitted application and triggered manual review, waiting for approval
APPLICATION_REJECTEDSorry, your application was not approved at this time.application rejected
DEAL_EXCEEDS_LIMITDeal amount exceeds available credit.user approved but invoice amount exceeded the available credit limit
PRODUCT_PENDINGYour product activation request is under review. We will get back to you shortly.user submitted a product activation request, waiting for approval
INTERNAL_SERVER_ERRORSomething went wrong. Please try again later.any type of error on backend