Quick Start Guide

Sign Up


To start the registration process, you will need to go the following URL: https://app.lendflow.io/register

This will take you through a quick process of entering your business details and verifying your email.

Once your email is verified, you will have access to the backend configuration and analytics.

Types of Scripts


Advanced mode allows for customer tracking from end to end. It will have the following structure:

figure

Following the above process:

Install the widget in the front end

Customer clicks on the widget

The widget will call onload event where it will wait for a customer access token

In the event perform an Ajax call to your server, then an API call to the Lendflow server where it passes your internal customer id for tracking. This can be a string or an id

This will return a customer access token to be able to track the customer

Return the access token from the Ajax call

The widget will load and the customer will be tracked throughout the process

Implementing the Script


API Keys

When you Login to the lendflow admin page, there will be an option called ‘Overview’.

Selecting ‘Overview’ will return the above screen.

There are two modes: Live Mode and Test Mode. The Test Mode will not save any data to the server, whereas the Live Mode will. Ensure that the script is set to Live Mode for deployment.

Simple/Advanced Integration Mode: It is recommended that you use “Advanced Integration Mode”. Once selected, this will display both a Javascript script and a backend script, which you can implement on your server.

Implementing the Javascript is straightforward. Just copy and paste your script onto your web site.


To choose the button that you want to initialise the widget from, you have two options.

Give the element the ID of “start-funding” and you can remove the demo tag from the script

<button id="start- funding">Start Funding</button>

If you have multiple elements that you wish to use for starting funding, use a class name, for example: .

class=”start-funding” then change the following script from handler.initalisebutton("#start-funding"); to handler.initalisebutton(".start-funding");


The last step is implementing the access token. You will need to change the following line of code from:

url: '/gettoken',

The URL will be to your internal server, which will generate the customer token

Note

If you are using x-csrf or something similar, please be sure to include these tokens, for example:

Under the URL attribute:

data: { "_token": "CxQ1j8JyIfC2XHHF3oZpVeFEswOvl5BGcl7rXctw" },

Implementing the Backend Script


Advanced mode allows for customer tracking from end to end. It will have the following structure:

$curl = curl_init("https://app.lendflow.io/api/customer/token/get");
// Replace with your access token
$accesstoken = "Your access token";
// This would represent customer id on the clients website
$post = ["customerid" => yourcustomerid];
// Replace with out token
$authorization = "Authorization: Bearer $accesstoken";
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: multipart/form-data;', $authorization));
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($curl, CURLOPT_FRESH_CONNECT, TRUE);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $post);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_FRESH_CONNECT, TRUE);
$result = curl_exec($curl);
curl_close($curl);
return ($result);

We have provided a curl example to get you up and running quickly.

The access token should be set for you already in your script. All you will need to do is copy and paste it. The authorization that we are using is the Bearer access token. To make the rest call, you will need to provide this token.

The API call you need to make is to: https://app.lendflow.io/api/customer/token/get

You will only need to pass one variable:

[" customerid"=> yourcustomerid];

The customerid represents how you want to track your customer. This can be a string or an int data type.

As it is your internal ID, you will be able to make other API calls using your customerid to track the progress of the customer.

Lendflow uses this ID to start, stop and progress the widget through the funding process.

Implementing the Backend Script


In additional to the above field, the following default information can be passed into the API (all optional)

businesslegalname The business legal name
firstname The merchant first name
lastname The merchant last name
phone The contact number for the merchant
email The contact email
addressline1 The business street address
city The business city
state The business state
zip The business zip
ein The business ein as number
businessstartdate The business start date yyyy / mm / dd

Mail Server


Email notification integration:

Once you are set up on lendflow, there are some customizations that can be made, through navigating to Customize > Notifications.

You will be able to customize your email configuration.

Lendflow allows for notifications to be sent out in two ways. The first way is to send mail as noreply@lendflow.io.

The second option will be to register the following
  • Your domain: for example (lendflow.io)
  • Your email address: noreply@yourdomain.com
  • Your sending name: for example (No Response)

When these details are registered, you will be provided with a few records to update on your domain name.

This will consist of a TXT record for creating a SPF record, and a DKIM record.

The instructions will be provided on registration, as these records are custom generated for your domain.

The purpose of these is to ensure that emails are not being spoofed or marked as spam.

MX Records

To get this set up, the next stage:

https://support.google.com/a/answer/140034?hl=en

Here, the subdomain is the name you have selected in section 2

In our example, the subdomain = capital

Name/Host/Alias Time to Live (TTL*) Record Type Priority Value/Answer/Destination
Subdomain 3600 MX 1 ASPMX.L.GOOGLE.COM.
Subdomain 3600 MX 5 ALT1.ASPMX.L.GOOGLE.COM.
Subdomain 3600 MX 5 ALT2.ASPMX.L.GOOGLE.COM.
Subdomain 3600 MX 10 ALT3.ASPMX.L.GOOGLE.COM.
Subdomain 3600 MX 10 ALT4.ASPMX.L.GOOGLE.COM.
Stage – Verification of Domain

We will provide you the following keys:

google-site-verification=<number to be provided>

This will be entered as a TXT record.

The host will be = subdomain

In our example above, subdomain will be capital.

The next stage is to set up the DKIM records. Lendflow will provide you with these records once we have registered your domain.

This will ensure that emails will not go to spam.

TXT Record

Host : capital google-site-verification=<number to be provided>

Name/Host/Alias Time to Live (TTL*) Record Type Priority Value/Answer/Destination
capital 3600 MX 1 ASPMX.L.GOOGLE.COM.
capital 3600 MX 5 ALT1.ASPMX.L.GOOGLE.COM.
capital 3600 MX 5 ALT2.ASPMX.L.GOOGLE.COM.
capital 3600 MX 10 ALT3.ASPMX.L.GOOGLE.COM.
capital 3600 MX 10 ALT4.ASPMX.L.GOOGLE.COM.
Emails Lendflow Will use
<agentname>@capital.yourdomain.com