# Overview

## What is Adjutor?

Lendsqr is a lending-as-a-Service (LaaS) platform helping lenders to launch their lending business quickly, cost-effectively, and at scale. Having acquired a robust knowledge of the pains of lenders and developed bespoke algorithms that solve these problems, Lendsqr is offering a subset of its services as APIs to organizations/external lenders who have their own existing apps and services and would rather build their own technology stack.&#x20;

This API service is called Adjútor, meaning helper, in Latin.

## About Adjutor API service

Adjútor is the Lendsqr API service that provides APIs for lenders and other fintech companies to assist them in confirming the identity of their customers/businesses, identifying blacklisted debtors, making quick, easy and cost-effective decisions during loan decision processes as well as collections using direct debit.

{% hint style="warning" %}

#### Important note

The Nigerian data privacy law requires that information for users must be gotten with clear consent. As part of the sign-on process for Lendsqr, you must certify that you have gotten clear and explicit consent from users before their information is accessed. Where a breach has occurred, you would be 100% liable.

Furthermore, you must be licensed as a lender to use these services and your evidence of being licensed would be required before you are granted access to these APIs
{% endhint %}

{% hint style="info" %}

#### What Adjútor is not

1. It is not a credit bureau.
2. It is not a lender or a payments service.
   {% endhint %}

## Want to jump right in?

Let's get you set up and ready to make better decisions.

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><a href="https://api.adjutor.io">API Reference </a></td><td>Explore the developer documentation of Adjutor</td><td></td></tr><tr><td><a href="/pages/MlKxI43w6hR8e0KcqSjO">Use Cases</a></td><td>Explore all of Adjutor API use cases and more. </td><td></td></tr><tr><td><a href="/pages/XcqQeiH9E5Yl0yILNTki">API Endpoints</a></td><td>Explore all of Adjutor API services</td><td></td></tr></tbody></table>


# Getting Started

Welcome to Adjutor! You’re about to join 100+ Fintechs who are streamlining their lending process and making the best decisions using our APIs.

Let's go! 🚀

## Step 1: Create an account by signing up on the [Adjutor platform](http://app.adjutor.io)&#x20;

This is pretty simple! Just head over to app.adjutor.io and complete your sign up.

{% embed url="<https://blog.lendsqr.com/wp-content/uploads/2024/07/Adjutor-signup-Made-with-Clipchamp.mp4>" fullWidth="false" %}
Onboarding on Adjutor
{% endembed %}

Upon activation, Lendsqr gives a free credit of ₦1,000 to test the APIs.

## Step 2: Complete your KYC validation

To use Adjutor API services to the fullest, it is expected that you complete your KYC validation.

{% embed url="<https://blog.lendsqr.com/wp-content/uploads/2024/07/Untitled-video-Made-with-Clipchamp.mp4>" %}

This includes providing us with necessary documentation to validate your identity as a business. &#x20;

{% hint style="info" %}
Important Note

To speed up the verification process, upload your business's certificate of incorporation document so we can certify the existence of your company. If available, also upload a lending license for your company.
{% endhint %}

## Step 3: Get your API keys

The process is pretty straightforward. Head over to the App menu and click on the "Create an app" button.

{% embed url="<https://blog.lendsqr.com/wp-content/uploads/2024/07/Documentation_app-Made-with-Clipchamp.mp4>" %}

Complete the form with all services you are interested in and save the details. Once this is completed, the API keys are displayed for you.&#x20;

## Step 4: Fund your wallet

As mentioned before, Lendsqr gives a free credit of ₦1,000 to test the APIs. However, if the testing funds have been exhausted, you can go ahead to Fund your service account.

{% embed url="<https://blog.lendsqr.com/wp-content/uploads/2024/07/Documentation_wallet.png>" %}

Simply head over to the Wallets Menu and copy the account number on your screen. With this, you can fund your wallet any day, any time.

## Step 5: Make your first API call 🧑‍💻&#x20;

Once testing has been completed and you're satisfied, you can integrate our APIs to your platform using the generated keys to get the most value from Adjútor.

## Step 6: Launch and Scale! 🚀

That’s right! With these steps, you’re good to go. Jump right in and take full control of your business!


# Test and Live mode

The Adjutor API service provides two distinct nodes to facilitate seamless API integration and operation, the test and live modes. This allows you safely test each of the API services rigorously before integration and go-live, and with no extra cost.

### **Test Mode**

The test mode is designed for developers and integrators to simulate the platform’s functionality without using real data or affecting live operations. These API calls return dummy data and are at 0 cost. This provides the developer with the opportunity to explore all of the services without any business or cost implications.

This mode is available to all API users, including those who are KYC validated and those who aren't.

{% hint style="info" %}
**Note**:

This is the only mode available to users who are not KYC validated. This ensures all round compliance and reduces the risk of fraudulent activities.&#x20;
{% endhint %}

### **Live Mode**

This is the primary production environment which returns actual user data and comes at a cost. However, we have a no hit no charge policy so you get charged for only succesful API calls.&#x20;

### How to switch between modes

This follows a simlar process for creating an application as discussed in the section: [Making your first API call](/introduction/making-your-first-api-call). Find the steps below:

1. Create an application or select
2. On the top right corner of your screen, you are presented with a toggle. By default, this is in test mode. However, to switch to live mode, you need to submit your KYC and have all your documents approved. The guide on how to do this can be found in this section [Getting Started](/introduction/getting-started).

{% embed url="<https://blog.lendsqr.com/wp-content/uploads/2024/12/05e4c145-8d81-455a-8b0a-23efe5a0bd42.webm>" %}
Toggling between test and live mode on Adjutor
{% endembed %}

{% hint style="info" %}
Note:

The API keys for both the test and live mode are the same, as well as the base URLs. The only change that needs to be made is in the app section of the Adjutor web application.
{% endhint %}

***

Feel free to reach out to as at <api@lendsqr.com> if you have any other enquiries.


# Making your first API call

Congratulations on setting up your account successfully! Now that everything is set up, you’re ready to make that first API call! Not to worry, we’re here to help you every step of the way.

Let's get started!

## Step 1: Get Your API Key

The step for doing this is the same as defined in the [Getting Started](/introduction/getting-started) section.&#x20;

* Once you complete your sign up, head over to the Apps Menu and create an App.&#x20;
* Make sure to copy the API key displayed on your screen as you won’t be able to get it again except you Reset your API key

## Step 2: Choose an Endpoint

Adjutor provides you with a host of different services needed to launch and scale your business. These include:

* Authorizing direct debit, with consent, for repayments
* Getting the bank accounts, with consent, tied to a customer's BVN
* Matching a customer image against what's on their BVN
* Getting the name and details of a bank account number
* Getting credit information about a borrower
* Getting "probable" fraud information from our Karma blacklist
* Accessing credit performance information, for a borrower, from the Lendsqr ecosystem

Choose the endpoint you need to start your journey with Adjutor and make your first call.

## Step 3: Make the API call

You might be doing this straight from your code base or testing this in Postman. It depends on the exact use case you have in mind. Not to worry. If you wish to make your API call directly from Postman, feel free to import the [Postman collection](http://api.adjutor.io) and start calling the endpoints right away.&#x20;

For those adding this directly to their code base, here’s a sample using Python

1. Open your code Editor
2. Copy the code below and paste in your editor. In this example, we’ll be testing the Get Banks endpoint for Direct Debit.&#x20;

```python
import requests

api_key = 'your_api_key_here'
url = 'https://adjutor.lendsqr.com/v2/direct-debit/banks'

headers = {
    'Authorization': f'Bearer {api_key}'
}

response = requests.get(url, headers=headers)
print(response.json())
```

3. You should get a response similar to this:

```json
{
  "status": "success",
  "message": "success",
  "data": {
    "data": [
      {
        "id": 1,
        "name": "Access Bank",
        "bank_code": "044",
        "institution_code": "000014",
        "url": "https://lendstack-s3.s3.us-east-2.amazonaws.com/bank_logos/044.png",
        "activation_amount": "50.00",
        "meta": "{\"mandate-activation-amount\":50,\"mandate-activation-bank\":\"Paystack-Titan\",\"mandate-activation-account-number\":\"9880218357\"}"
      },
      {
        "id": 10,
        "name": "First Bank of Nigeria",
        "bank_code": "011",
        "institution_code": "000016",
        "url": "https://lendstack-s3.s3.us-east-2.amazonaws.com/bank_logos/011.png",
        "activation_amount": "50.00",
        "meta": "{\"mandate-activation-amount\":50,\"mandate-activation-bank\":\"Paystack-Titan\",\"mandate-activation-account-number\":\"9880218357\"}"
      },
{
        "id": 40,
        "name": "United Bank For Africa",
        "bank_code": "033",
        "institution_code": "000004",
        "url": "https://lendstack-s3.s3.us-east-2.amazonaws.com/bank_logos/033.png",
        "activation_amount": "50.00",
        "meta": "{\"mandate-activation-amount\":50,\"mandate-activation-bank\":\"Paystack-Titan\",\"mandate-activation-account-number\":\"9880218357\"}"
      },
      {
        "id": 41,
        "name": "Zenith Bank",
        "bank_code": "057",
        "institution_code": "000015",
        "url": "https://lendstack-s3.s3.us-east-2.amazonaws.com/bank_logos/057.png",
        "activation_amount": "50.00",
        "meta": "{\"mandate-activation-amount\":50,\"mandate-activation-bank\":\"Paystack-Titan\",\"mandate-activation-account-number\":\"9880218357\"}"
      }
    ],
    "meta": {
      "records": 19,
      "page": "1",
      "pages": 1,
      "page_size": "100"
    }
  },
  "meta": {
    "cost": 1,
    "balance": 1010
  }
}
```

You can learn more about the response in the [API Reference.](https://api.adjutor.io) &#x20;

And that’s it! You’ve successfully made your first API call. 🎉

## Troubleshooting Tips

If you see an error message, no need to panic. It’s just the system’s way of saying something needs fixing. Here are some things you can do to troubleshoot.

* Confirm the endpoint URL being used is valid
* Confirm variables being sent to the endpoint are correct and are in the right format
* Make sure you are using the correct API key.&#x20;
* Confirm that the service you are trying to call was selected while creating your API key.
* Ensure you have an active internet connection.

## Next Steps

Now that you’ve made your first call, you can explore other endpoints. Try fetching transaction history, initiating payments, or any other exciting features our API offers.<br>

Remember, we’re here to help. If you get stuck or have any questions, reach out to our support team. Happy coding!<br>


# Webhooks

## Overview

Webhooks provide a way for your application to receive real time notifications about events from our API endpoints. With webhooks, you don’t have to constantly check for updates manually and your application is able to perform certain actions based on the response from our endpoints.

## Setting up webhooks

To set up webhooks with our API, you would need to create a URL on your server to handle the incoming webhook data. Once this is created, it can be configured with our APIs.

### Here’s how you do it.

* When [creating an app](/introduction/getting-started#step-3-get-your-api-keys), there is an option for webhook URL
* Ensure to put in the desired webhook URL&#x20;
* Save and you’re good to go

Once this is set up, you are able to configure this in your application thus notifying you and/or performing certain actions based on the output.

<br>


# Authentication Type

Here, you will find everything you need for verification before accessing Adjútor

## Overview

The Adjútor API service requires authentication to be able to consume the services. Authentication is performed via Bearer Authentication.

{% hint style="info" %}

#### Notes

* The access token being referred to is the API key
* Every endpoint requires authentication, so you will need to add the following header to authenticate each request:\
  `Authorization: Bearer` {{access\_token}}
* Authentication to the API is performed via [HTTP Basic Auth](http://en.wikipedia.org/wiki/Basic_access_authentication).&#x20;
* All API requests must be made over [HTTPS](http://en.wikipedia.org/wiki/HTTP_Secure). Note that calls made over plain HTTP will fail.&#x20;
* API requests without authentication will also fail.
  {% endhint %}


# Generating your API key

Here, you will find everything you need for verification before accessing Adjútor

The steps are the same as defined in the [Getting Started](/introduction/getting-started) section. But for the sake of a refresher, find the steps below:

1. Log in to your dashboard at <https://app.adjutor.io/login&#x20>;
2. Navigate to the 'Apps’ menu&#x20;
3. Click on the 'Create an app' button (located at the top right section of the page) and enter the required details.&#x20;
4. While creating an app ensure you select all necessary API services you wish to access.&#x20;
5. Click on 'save details' and the key would be displayed on your screen for you to copy and paste within the environment variable of your application.

## Resetting your API Key <a href="#resetting-your-api-key" id="resetting-your-api-key"></a>

If at any point, you suspect that your key has been compromised, the API key should be instantly revoked and regenerated. This can be done within the same Admin panel where the key was previously generated. Find the steps below:

1. Log in to your dashboard at <https://app.adjutor.io/>
2. Navigate to the 'Apps’ menu'&#x20;
3. Click on the particular app whose API key you wish to reset.&#x20;
4. Click on "Reset app key"

{% embed url="<https://blog.lendsqr.com/wp-content/uploads/2024/07/Documentation_reset_key-Made-with-Clipchamp.mp4>" %}

{% hint style="warning" %}

#### Notes

1. If you do not include your API key when making a request, or you use an incorrect/outdated key, the request will fail.
2. Your API keys carry many privileges, so be sure to treat it as you would any other password and grant access only to those who need it. Do not share your secret API keys in publicly accessible areas such as GitHub, etc.
3. If a token is compromised, you can re-generate a new one from your [dashboard](https://pecunia.lendsqr.com/).&#x20;
   {% endhint %}

{% hint style="danger" %}

#### **Warning**

Regenerating a new key would immediately revoke your existing key therefore the change should be carefully planned to prevent downtime for your apps and customers.
{% endhint %}


# Introduction

Learn of various ways to make the most out of the Adjutor API service

The Adjutor APIs are designed primarily with lenders in mind, however, organizations that would like to onboard non-fraudulent users to the platform would also benefit from our API service. By integrating Adjútor into your workflows, you would be able to use them in the following ways to bring assurance to your business;

## Validation

Our validation APIs allow you confirm certain details that your customers have provided. Using the validation APIs would allow you to confirm the authenticity of the customers you have on your platform. Below are use cases for our various validation APIs

{% tabs %}
{% tab title="BVN image match" %}

> Confirm the identities of your customers by comparing their profile image against the image from their Bank Verification Number (BVN). Filter through potential fraudsters who may be impersonating others by implementing the BVN image match check.
> {% endtab %}

{% tab title="Bank account verification" %}

> Verify the account information your customers submit by running name enquiry checks on the accounts and verifying the validity of these accounts.&#x20;

{% hint style="info" %}

#### Note

You can also take this a step further by cross referencing the BVN linked to the account number against the BVN submitted by customer if you collect such information.
{% endhint %}
{% endtab %}

{% tab title="Karma lookup" %}

> Prevent customers who have been blacklisted for committing fraud or defaulting on loans across the FinTech space from onboarding on your platform. Run Karma checks using their email, phone number, BVN etc. to protect your business from potential bad actors.

> If user count is important to your business, you can allow these users (potential bad actors) onboard but prevent them from performing key actions like take loans, perform transactions by running Karma checks before these actions can be performed.

{% hint style="info" %}

#### What's Karma?

Karma is one of the largest blacklists of chronic defaulters and fraudsters within the Nigerian credit space. Using identifiers for the user such as email, phone number, BVN, etc., you can call the endpoint to confirm the existence of such information within the database.
{% endhint %}
{% endtab %}

{% tab title="Ecosystem lookup" %}

> Adjútor allows you to access our rapidly growing ecosystem of users (accumulated over time) which you can tap into to know more about their past performance with other lenders. Generate rich insights on a customer's credit history on the Lendsqr ecosystem with the Ecosystem API.&#x20;
> {% endtab %}
> {% endtabs %}

## Decisioning

Our decisioning APIs will are geared to helping you make well-informed credit decisions using our decision engine. At the moment, you can generate credit scores using the [Decisioning](/adjutor-api-endpoints/decisioning#oraculi-scoring)APIs

{% tabs %}
{% tab title="Oraculi scoring" %}

> Our service helps lenders to develop/finetune a scoring model (a range of metrics to determine the creditworthiness of a person or business)**.**&#x20;

> Your scoring model is based on the RAC parameters that you have defined and set aside for your loan products. Assign scores to the various field options your customers can provide and get a cumulative score which can help you decide if the customer is creditworthy or not.

{% hint style="info" %}
Note

Lendsqr offers a proprietary scoring model that you can make use of provided that you collect the same details as is in the module.
{% endhint %}
{% endtab %}
{% endtabs %}

## Credit Bureaus

The Credit Bureaus APIs are extensions of our partnerships with CRC Credit Bureau and FirstCentral Credit Bureau. Two of the three credit bureaus in Nigeria. you also get the CRC API checks at a relatively cheaper&#x20;

{% tabs %}
{% tab title="Credit History checks" %}

> Determine your customer's credit history before giving them a loan. Run checks using either the [CRC Credit Bureau](https://api.adjutor.io/#8d19c5d1-450c-43ca-b136-6f9541ee5603) or [FirstCentral Credit Bureau](https://api.adjutor.io/#89a04480-4a51-46c4-8342-3dc84e411077) APIs to determine if a customer has a history of defaulting on loans on several platforms or if they have a good credit standing.

> If you want to be even more cautious, run checks with both APIs (in sequence for cost effectiveness) to ensure you get maximum coverage.&#x20;
> {% endtab %}
> {% endtabs %}

## Direct Debit

Our Direct Debit APIs are designed to help you streamline and automate the process of setting up and managing direct debits for your customers.&#x20;

{% tabs %}
{% tab title="Create Mandates" %}
Create mandates on your customer's bank accounts using our Create Mandate endpoint. As soon as the mandate is created, you should inform the customer of the next steps about how to activate the mandate.&#x20;
{% endtab %}

{% tab title="Check for bank balances" %}
Using our lookup APIs, confirm the account balance of customers before triggering a debit of the loan amount.&#x20;
{% endtab %}

{% tab title="Automate repayments" %}
Configure schedules for loan repayment. With this configured, you don't need to worry about the stress of reaching out to customers to pay back their loans. Also, customers don't need to manually make payments for their loans.&#x20;
{% endtab %}
{% endtabs %}


# Loan repayment with Direct Debit

With our Direct Debit APIs, simplify your lending, by automationg loan repayments, ensuring timely repayments, and reducing the need for any manual intervention.&#x20;

## What is Direct Debit?

Simply put, Direct Debit is an automated payment method which allows lenders to collect repayments directly from a borrower's bank account on agreed dates. Once set up, payments are automatically deducted without any further action required from the borrower, providing a hassle-free repayment experience.

## How this works

* Your customer provides the bank account they would like the direct debit mandate to be attached to.
* As the lender, you proceed to create an e-mandate using the customer’s account details
* Once the direct debit mandate is created, your customer has to activate the mandate by sending N50 to the registered NIBSS account number. This is your customer’s way of granting permission to debit their account.&#x20;
* NIBSS makes a N100 debit attempt on the borrower’s account. This is to ensure that the account can be debited when it’s time for loan repayments.

And with that, the mandate is activated!

Feel free to configure constant SMS or email reminders before a debit is done to the customer’s account.&#x20;

By leveraging Direct Debit for loan repayments, you can streamline processes, ensure timely payments, and provide a better experience for your customers and reduce the rate of Non Performing Loans (NPL).

<br>


# Corporate Cash and Treasury Management

Ensure efficient Cash and Treasury management in your business thus optimizing your cash flow and financial assets in order to ensure liquidity, reduce risks and maximize returns.&#x20;

## **How this works:**

1. **Cash Management:**
   * **Checking Balances:** Our Direct Debit and Kolo APIs provide real time insights into all your bank accounts, giving you the opportunity to monitor your balances on a daily basis and ensure sufficient funds for your day-to-day operations.&#x20;
   * **Transferring Funds:** With our Direct Debit APIs, you can automatically move excess funds from one account to another thus maintaining optimal cash levels across all your accounts.&#x20;
2. **Treasury Management:**
   * **Saving Extra Money:** With your Direct Debit APIs, transfer surplus funds to high-yield savings or investment accounts, ensuring your money works for you.
   * **Monitoring and Compliance:** Maintain oversight of your funds to comply with financial regulations and corporate policies.

Our Direct Debit and Kolo APIs help you streamline your financial operations, ensuring your funds are managed efficiently, and enabling better financial health for your company.&#x20;


# Buy Now Pay Later (BNPL)

Enhance your customers' experience with our Buy Now Pay Later (BNPL) service. BNPL allows your customers to make purchases immediately (Buy Now) and pay for them in installments (Pay Later).

This flexible payment option not only boosts sales but also increases customer satisfaction and loyalty.

## **How It Works:**

1. **Seamless Integration:** Integrate our verification, scoring and payment APIs into your e-commerce platforms effortlessly. With these integrated, you can offer BNPL as a payment option at checkout.
2. **Instant Approval:** Our scoring APIs processes customer information in real-time, providing instant approval or denial for BNPL requests. However, it is up to you to configure this to be an instant approval or a manual process. Either way, this quick process enhances your customer's experience.
3. **Flexible Payment Plans:** Customize payment plans to fit your business model. Whether it's daily, weekly, or monthly installments, our API supports a variety of schedules to meet the diverse needs of your customers.

With our APIs you are able to efficiently manage your BNPL business leading to an increase in sales, reduction of Non-Performing Loans (NPL) and improvement in customer satisfaction. &#x20;

You can read this article for more insight into how our APIs can enable BNPL on your platform: <https://blog.lendsqr.com/how-to-use-lendsqrs-api-to-build-rent-now-pay-later/>


# Embedded Credit/ Finance

Integrate financial services directly into your platforms using our APIs, thus enhancing customer experience and creating new revenue streams. With Adjutor API services, businesses can offer lending services within their existing products.&#x20;

## How this works:

**Embedding Credit Services**: Provide loans or credit services to your customers based on their financial data and transaction history using our APIs.&#x20;

Our APIs help you manage the entire lending process from loan application to verification to decisioning, approval, disbursement and collection, making it a seamless process for the customers and the lenders. &#x20;

With our APIs, lenders can enhance their platform's capabilities, improve customer experiences, and drive growth for their business.

<br>


# Loan scoring/ Credit scoring

One of the biggest fears of any lender is giving loans to a borrower who won’t pay back. This is why evaluating the creditworthiness of borrowers is highly essential for making informed lending decisions.&#x20;

With our decisioning and credit scoring APIs, lenders are provided with a reliable and efficient way to access borrowers credit data, thus minimizing risk and making much better lending decisions.&#x20;

## How this works

* Your customers provide you with data which are valuable for scoring. This includes BVN and phone number.
* Using this data, you can check our database of bad actors (Karma) to confirm if such customer has been previously reported by a lender in the ecosystem.
* With our vast ecosystem of customer data, you can confirm the customer activity with other borrowers and configure the kind of customers you’d like to provide loans to.&#x20;
* Adjutor provides connections with the FirstCentral and CRC Credit Bureaus. Check for customer’s records and retrieve comprehensive credit reports to aid your decisioning. <br>

With these layers of scoring embedded in your platform, you are sure to enhance your lending processes thus making better-informed decisions, and minimizing financial risks.

<br>


# Customer Validation

Verify your customer's identity with our APIs and protect your business from fraudulent customers.&#x20;

Our API simplifies the verification process, making it quick and efficient while maintaining a high level of security.

## How this works

* Your borrowers provide you with their information during sign up.&#x20;
* To confirm customer identity, verify BVN with customer's date of birth and phone number.
* Perform liveliness check by comparing customer's live image with image linked to the customer's BVN.
* Once a possible fraud is detected, prevent the customer from going ahead with sign up or loan application.
* Confirm identification documents uploaded using Real-Time ID Verification

By integrating our customer validation APIs, you can be rest assured that the security and efficiency of your business is ensured. <br>


# Implementing GSI with Direct Debit

GSI (Global Standing Instruction) was created by the Central Bank of Nigeria (CBN) as a last resort for banks and financial institutions to recover outstanding loans from chronic debtors. It allows the creditor bank (the bank that gave the loan) to recover their debt from any or all other accounts held by the borrower with other financial institutions in the case of default.

## Objectives of GSI:

* Facilitate an improved credit repayment culture.
* Reduce Non-Performing Loans (NPLs) in the banking industry.
* Watch-list consistent loan defaulters.

## How this works:

**Borrower Authorization**: The borrower authorizes the lender to recover outstanding debts automatically from their bank accounts across different financial institutions.

**Linking Accounts**: The borrower must link all qualifying bank accounts to their Bank Verification Number (BVN).

**Triggering GSI**: In case of default, the creditor bank triggers the GSI, which initiates a balance enquiry and issues debit instructions to other financial institutions holding the borrower's accounts.

**Executing Debit**: The Nigeria Inter-Bank Settlement System (NIBSS) facilitates the transfer of funds from the borrower's accounts in other banks to the creditor bank.<br>

This use of GSI helps lenders recover outstanding debts from your customers who have funds in other bank accounts, ensuring efficient debt recovery and reducing defaults.


# Oraculi Mobile SDK (Beta)

## Introduction

Oraculi is the Lendsqr underwriting scoring engine. Oraculi means The Oracle in Latin.&#x20;

Lendsqr Oraculi provides a RESTful API for accessing user data gathered from your customer’s phones with the SDK you have embedded. The Oraculi SDK provides an effective insight into Android customers of lenders.&#x20;

{% hint style="info" %}
The SDK is only available for Android phones.&#x20;
{% endhint %}

This documentation, and the approach described here, are in Beta. They are subject to change as we take feedback from pilot lenders.&#x20;

{% hint style="warning" %}
Note

If you wish to use this service, kindly reach out to <growth@lendsqr.com>.
{% endhint %}


# Installing the SDK

The Oraculi SDK is a Java native application that can be embedded into any mobile development framework that can instantiate Java within a mobile app. For the purpose of this documentation, it would be assumed to be a React Native application.&#x20;

{% hint style="warning" %}
Note

The Java SDK is available on GitHub on a private repo. To get access, please contact <api@lendsqr.com>. The installation instructions are on the repo README.&#x20;
{% endhint %}

### Android Permissions

The SDK requires the READ\_SMS and RECEIVE\_SMS permissions which must be explicitly defined within your application Android Manifest.&#x20;

These two permissions are classified as dangerous permissions by Google and as such, beyond just declaring them in your application, there are certain guidelines for getting them approved by Google.&#x20;

### Definitions&#x20;

It’s important to understand the taxonomy of the Oraculi SDK.&#x20;

### Entities&#x20;

When the Oraculi SDK collects data from an Android phone, it creates unique identifiers for the user and the phone. However, because the developer has been required to provide an identifier for the user upon the instantiation of the SDK, it would allow the identification of such users irrespective of the different devices they may use.&#x20;

However, at the root of the entity identity are the unique identifiers (UUID) for that mobile device and the session that created the data.&#x20;

### Institutions&#x20;

Institutions define the companies, banks, or other unique stakeholders that have sent SMS or other information to an entity (or a user).&#x20;

### Transactions&#x20;

Transactions are the records of the activity of a user or an entity with an institution. It could be an SMS alert representing a financial transaction or a balance alert from a telco. For both a bank institution, a credit/debit statement is a measure of funds moving in and out of an account.&#x20;


# The Oraculi SDK data journey

When the mobile app that has the Oraculi SDK is installed, it prompts the user to grant permissions for the required functionality. Kindly note that Google requires extensive screen information to provide clear guidance for the users. If you require guidance, please contact <api@lendsqr.com>.&#x20;

Once the permissions have been granted, the SDK would collect the data from the phone, encrypt them, and send them to the Lendsqr backend services for parsing and analysis.&#x20;

The developer can then connect to the Lendsqr API endpoints to access the parsed and analyzed data for the loan underwriting workflow.&#x20;

For the sake of data consistency, every single transaction is uniquely identified against the user to ensure that even if they uninstall the developer app and reinstall it again, data would not be duplicated.

<figure><img src="/files/EzVJ80csx06N2d5D9SnI" alt=""><figcaption><p>The Oraculi SDK data journey</p></figcaption></figure>


# Validation

Learn how to use Adjutor to verify your customer's identity

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><a href="/pages/YNFSyvv3CRYCqjPMJ82k"><strong>Bank Account Verification</strong></a></td><td>This endpoint is used for verification of a bank account.</td><td></td></tr><tr><td><a href="/pages/Eo8PtUYHOO57Cjw5xI1S"><strong>Karma Lookup</strong></a></td><td>This endpoint is used to search for the identity of a bad actor using identifying information such as phone number, email, domain name, BVN, card signature, and images.</td><td></td></tr><tr><td><a href="/pages/8hP8IPC3HLn46SknKIG2"><strong>Ecosystem Lookup</strong></a></td><td>Confirm users' credit history and behaviour across the Lendsqr ecosystem</td><td></td></tr></tbody></table>

## Our validation APIs allow you to:

* Confirm a customer’s bank details
* Automate your KYC process

Learn more about these endpoints [here](https://api.adjutor.io/#c40907bb-19d3-49c3-a8b3-17ace4b2ca40)


# Bank Verification Number

Bank Verification Number (BVN) is the national ID system created by Nigerian banks to uniquely identified bank customers in the Nigerian banking ecosystem.&#x20;

The banking ecosystem has also created a mechanism where all the bank accounts tied to a specific BVN could be gotten.&#x20;

These endpoints allows you to get the bank accounts tied to a customer only after the customer has granted an explicit consent.&#x20;

This works in a two-stage process where the initial API call initiates the process, and a One Time Password (OTP) is sent to the customer's registered phone or email address. When the customer provides this OTP, the second stage verifies the OTP and provides the BVN information.&#x20;

## Known issues&#x20;

* OTP may not be delivered to the customer's phone on time or at all.&#x20;
* OTP may be delivered to the customer's phone late due to GSM network delays&#x20;
* Customer may not remember or have access to the phones or emails on record which means they may never be able to provide consent.
* The data returned may not be complete as banks may not have registered all the accounts for the customer.


# Bank Account Verification

{% hint style="success" %}
**Summary**

The bank account verification APIs allow business confirm the authenticity a customer’s account number before setting up the customer's account, setting up a direct debit or transferring money to the customer.
{% endhint %}

## Introduction

Before setting up a customer's account and performing transactions to such account, you need to ensure the customer’s account details are correct. This is to ensure you aren’t sending money to the wrong person or setting up a fraudulent customer. In order to achieve this, we provide the following APIs:

<table><thead><tr><th width="266">Name</th><th>Description</th></tr></thead><tbody><tr><td><a href="#initialize-bvn-consent">Initialize BVN Consent</a></td><td>This endpoint is used to initiate the process for getting the customer's consent</td></tr><tr><td><a href="#complete-consent-and-get-bvn-details">Complete consent and get BVN details</a></td><td>This endpoint is used to get the BVN data after the customer's consent has been approved.</td></tr><tr><td><a href="#match-customer-bvn-image">Match Customer BVN Image</a></td><td>This endpoint allows for real-time verification of an individual's Bank Verification Number (BVN) through the comparison of their photograph and facial features with their BVN record</td></tr><tr><td><a href="#verify-customer-account">Verify customer account</a></td><td>This endpoint is used for verification of a customer's bank account.</td></tr></tbody></table>

## Initialize BVN Consent

This endpoint is used to initiate the process for getting customer consent. The integrator is required to pass the customer's BVN and the phone number. Below is a sample request and sample response.&#x20;

```bash
curl --location 'https://adjutor.lendsqr.com/v2/verification/bvn/:bvn/accounts' \
--data-raw '{
    "contact": "ado****@example.com"
}'
```

```json
{
  "status": "otp",
  "message": "Please provide OTP sent to contact",
  "data": "0808***2636",
  "meta": {
    "cost": 0,
    "balance": 4815
  }
}
```

## Complete consent and get BVN details

This endpoint is used to get the bank accounts linked to a BVN. It requires the OTP that has been sent to the customer. OTP to phones are usually sent from PFAlert sender id. Below is a sample request and sample response.

```bash
curl --location --request PUT 'https://adjutor.lendsqr.com/v2/verification/bvn/:bvn/accounts' \
--data '{
    "otp": "998278"
}'
```

```json
{
  "status": "success",
  "message": "Successful",
  "data": {
    "reference": 10000001,
    "bvn": "22123456789",
    "first_name": "ADO",
    "middle_name": "JOHN",
    "last_name": "SULE",
    "dob": "1990-10-31",
    "formatted_dob": "1990-10-31",
    "mobile2": null,
    "mobile": "08012345678",
    "registration_date": "30-Mar-2015",
    "enrollment_bank": "044",
    "enrollment_branch": "RET SHOP - BABCOCK UNIVERSITY (137)",
    "email": "wunmi@yahoo.com",
    "gender": "Male",
    "level_of_account": null,
    "lga_of_origin": "Abeokuta South",
    "lga_of_residence": "Abeokuta South",
    "marital_status": "Single",
    "nin": null,
    "name_on_card": "ADO JOHN SULE",
    "nationality": null,
    "residential_address": "Ogun State",
    "state_of_origin": "Ogun State",
    "state_of_residence": "Ogun State",
    "watchlisted": 0,
    "base64Image": null,
    "image_url": "https://picsum.photos/id/1/5000/3333"
  },
  "meta": {
    "cost": 20,
    "balance": 4815
  }
}
```

## Match customer BVN image

This endpoint allows for real-time verification of an individual's Bank Verification Number (BVN) through the comparison of their photograph and facial features with their BVN record, thereby providing an additional layer of security and accuracy in customer information validation. Below is a sample request and sample response.

```bash
curl --location 'https://adjutor.lendsqr.com/v2/verification/bvn/22536011111/selfies' \
--data '{
    "image": "https://documents.lendsqr.com/irorun/45eab612ad3efff8f3da1e65130be8538b8fd6c8602da4252ec35c61ec18802b1619ba7eda625b3efb671bfc478cad84e834c5ad858722e993889b3xxxxxx.png"
}'
```

```json
{
  "status": "success",
  "message": "Successful",
  "data": {
    "match": true,
    "similarity": 99.94831085205078
  },
  "meta": {
    "cost": 30,
    "balance": 1285
  }
}
```

For this request, the image should be in a URL format that is completely accessible to anyone with the link. Feel free to configure the similarity you are comfortable with within your application.

## Verify customer account

This endpoint is used for verification of a customer's bank account and confirming that it is linked to the customer's BVN. Below is a sample request and sample response.

```bash
curl --location 'https://adjutor.lendsqr.com/v2/verification/bankaccount/bvn' \
--data '{
    "account_number": "0425571111",
    "bank_code": "058"
}'
```

```json
{
  "status": "success",
  "message": "Successful",
  "data": {
    "bank_code": "058",
    "account_name": "DOE JOHN",
    "account_number": "0425571111",
    "bvn": "22000000021"
  },
  "meta": {
    "cost": 10,
    "balance": 1245
  }
}
```


# Karma Lookup

{% hint style="success" %}
Summary

The Karma APIs grants businesses access to a large pool of data from different lenders. Businesses are able to check if their customers have been blacklisted.&#x20;
{% endhint %}

Karma is a database of blacklisted bad actors within the Lendsqr ecosystem. A bad actor is someone who has been involved with fraud or has tried to request loans with fake identity. A bad actor may also be a chronic defaulter whose loan has been written off.

This endpoint is used to check if a customer is on the blacklist of bad actors. The following qualify as valid identity to check Karma:

| **Field**            | **Descript**ion                                                                        | **Format Example**                                     |
| -------------------- | -------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| Email Address        | Format should be in the form of [email@example.com](https://mailto:email@example.com/) | [email@example.com](https://mailto:email@example.com/) |
| Phone Number         | Format should be in the form of +2347012345678                                         | +2347012345678                                         |
| Domain Name          | Format should be in the form of example.com                                            | example.com                                            |
| BVN                  | Format should be in the form of 22212345678                                            | 22212345678                                            |
| NUBAN Account number | Format should be in the form of XXX-1234567890 Where XXX is the CBN bank code          | 070-1234567890 for a Fidelity Bank account.            |
| Images               | Format is Base64                                                                       | Base64 encoded string                                  |

```bash
curl --location 'https://adjutor.lendsqr.com/v2/verification/karma/0zspgifzbo.ga'
```

```json
{
  "status": "success",
  "message": "Successful",
  "data": {
    "karma_identity": "0zspgifzbo.ga",
    "amount_in_contention": "0.00",
    "reason": null,
    "default_date": "2020-05-18",
    "karma_type": {
      "karma": "Others"
    },
    "karma_identity_type": {
      "identity_type": "Domain"
    },
    "reporting_entity": {
      "name": "Blinkcash",
      "email": "support@blinkcash.ng"
    }
  },
  "meta": {
    "cost": 10,
    "balance": 1600
  }
}
```

It is up to you to proceed with such customer or not.&#x20;


# Ecosystem Lookup

{% hint style="success" %}
Summary

The Lendsqr ecosystem provides a large data of borrowers within the Lendsqr ecosystem, granting you an overall view of customers behavious across our vast lenders.&#x20;
{% endhint %}

The Lendsqr ecosystem provides an aggregated view of borrowers which lenders could have access to make decisions. To access this service, the lender must provide an evidence of customer explicit consent.

Furthermore, where it is proven that a consent was never provided, the lender would be liable for all legal cost required to ameliorate issues that may arise. Lender may also be removed from the platform.

This endpoint is used to verify if a borrower exists on the Lendsqr ecosystem.

It is required that you have the customer's BVN as this is required in checking the Lendsqr ecosystem.

```bash
curl --location 'https://adjutor.lendsqr.com/v2/verification/ecosystem/22153475955'
```

```json
{
  "status": "success",
  "message": "Successful",
  "data": {
    "bvn": "22536011111",
    "first_name": "JANE",
    "last_name": "DOE",
    "bvn_phone_number": "07062561111",
    "date_of_birth": "1997-09-10T00:00:00.000Z",
    "age": 25,
    "unique_phone_numbers": 0,
    "phone_number": "07062561111",
    "unique_emails": 0,
    "email": "janedoe@gmail.com",
    "gender": "Female",
    "lenders": 1,
    "first_account": "2020-11-16T10:49:57.000Z",
    "last_account": "2023-06-26T07:56:37.000Z",
    "failed_selfie_bvn_check": 0,
    "lending_lenders": 0,
    "loans": 0,
    "loan_amount": 0,
    "loan_amount_minimum": 0,
    "loan_amount_maximum": 150000,
    "loan_amount_average": 5892.954545,
    "settled_loans": 0,
    "settled_loan_amount": 0,
    "settled_loan_amount_paid": 0,
    "running_loans": 0,
    "running_loan_amount": 0,
    "past_due_loans": 0,
    "past_due_loan_amount": 0,
    "past_due_loan_amount_due": 2000,
    "penalty": 0,
    "penalty_paid": 0,
    "delayed_paid_loans": 0,
    "delayed_paid_loan_amount": 0,
    "delayed_paid_loans_trials": 0,
    "delayed_paid_loans_avg": 0,
    "delayed_paid_loans_trials_max": 0,
    "delayed_paid_loans_trials_min": 0,
    "first_loan_date": "2020-12-24T07:54:37.000Z",
    "last_loan_date": "2023-07-20T11:38:02.000Z",
    "loan_requests": 0,
    "failed_loan_requests": 0,
    "logins": 115,
    "first_login": "2023-06-01T12:32:27.000Z",
    "last_login": "2023-08-08T08:23:49.000Z",
    "unique_login_ips": 0,
    "unique_device_ids": 0,
    "distinct_mobile_os": 0,
    "duplicated_devices": 0,
    "shared_device_users": 0,
    "credit_delinquency": 0,
    "processed_on": "2023-08-08T14:02:33.000Z"
  },
  "meta": {
    "cost": 25,
    "balance": 1590
  }
}
```

Each component of the response body explains the customer's records within our customer. With all of this information, you can set up configurations specific to your business and decide on the criteria for proceeding with a customer or not.&#x20;


# Decisioning

Our decisioning APIs will guide you to make quick, easy and cost-effective decisions during your loan decision processes.

## About

Risk Acceptance Criteria (RAC) is used as a loan screening tool to guide credit extension and how much risk is acceptable or tolerable. These RAC are implemented with the decisioning APIs.

These APIs provide quick, easy, and cost-effective solutions for making informed decisions during your loan decision processes, allowing you to make confident and efficient choices with ease.

## Getting started

To use the Decisioning APIs, you must have designed your decision models and configure them within the Lendsqr admin console.

Decision Models are a living process and lenders are advised to constantly iterate these models as customer behaviors evolve.

Creating a good decision model can be complex, especially at the early stages. Deciding what to include or consider can be a head-scratching moment. If you require additional help on guidance regarding this, please email your account manager at <growth@lendsqr.com> and we would be more than happy to help you think through this stage.<br>

You can read more about our Decision Model at the [Lendsqr Help Center](https://lendsqr.freshdesk.com/support/solutions/44000816023).

Learn more about these endpoints [here](https://api.adjutor.io/#3c00f132-8d60-4a29-b8bc-4c2ac5a753dc)


# Decision Model Lookup

{% hint style="success" %}
Summary

With these services, you are able to view existing decision models created by your business.&#x20;
{% endhint %}

## Introduction

Decisioning is a very important part of the lending cycle, which is why Adjutor provides endpoints that allow you fetch all the decision models that you have configured on the Lendsqr platform.&#x20;

Below are the API services available for usage:&#x20;

<table><thead><tr><th width="221">API Endpoint</th><th>Description</th></tr></thead><tbody><tr><td><a href="#get-all-decision-models">Get all decision models</a></td><td>This endpoint fetches all the decision models that you have configured on the Lendsqr platform.</td></tr><tr><td><a href="#get-details-of-a-single-decision-model">Get details of a single decision model</a></td><td>This endpoint fetches an individual decision model and its settings that have been configured on your platform.</td></tr></tbody></table>

## Get all decision models

This endpoint fetches all the decision models that you have configured on the Lendsqr platform. This endpoint returns all the decision model data you have on your platform irrespective of whether they have been activated or not.&#x20;

```bash
curl --location 'https://adjutor.lendsqr.com/v2/decisioning/models/:id/settings'
```

## Get details of a single decision model&#x20;

This endpoint fetches an individual decision model and its settings that have been configured on your platform using the decision model id.

```bash
curl --location 'https://adjutor.lendsqr.com/v2/decisioning/models/:id/settings'
```

```json
{
    "status": "success",
    "message": "Successful",
    "data": [
        {
            "id": 20,
            "product_id": null,
            "version_id": 33,
            "org_id": 1,
            "name": "Test Decision Model",
            "description": "testing",
            "decision_setting": {
                "karma": {
                    "required": true,
                    "sequence": 1,
                    "continue_on_failure": false,
                    "pre_offer": true
                },
                "ecosystem": {
                    "required": true,
                    "sequence": 2,
                    "continue_on_failure": false,
                    "pre_offer": true
                },
                "scoring": {
                    "minimum": 50,
                    "required": true,
                    "sequence": 3,
                    "continue_on_failure": false,
                    "pre_offer": true
                },
                "credit_bureau": {
                    "provider": "CRC",
                    "required": true,
                    "sequence": 4,
                    "continue_on_failure": false
                }
            },
            "offer_setting": [
                {
                    "rule": {
                        "*": [
                            1,
                            {
                                "var": [
                                    "requested_amount"
                                ]
                            }
                        ]
                    },
                    "maximum": 10000000,
                    "minimum": 1000
                }
            ],
            "status": "active",
            "created_on": "2021-07-31T08:06:27.000Z"
        }
    ]
}
```

In the case where you have no decision model configured, the endpoint returns an empty array.&#x20;


# Oraculi scoring

{% hint style="success" %}
Summary

Scoring has never been simpler. With this service, you can easily score your lenders based on the settings you configured in your decision models.&#x20;
{% endhint %}

## Introduction

This endpoint is used for scoring based on the passed parameters/data points. By default, Lendsqr provides you with a proprietary scoring model and its sample request payload which you can tweak to your specification

However, you can pass any data point you wish to; provided that you have configured the scoring model to accept this. Below is a sample request and response body:

It is highly important to you set the specific decision model you wish to use for scoring.&#x20;

| Name | Type    | Description                                                                      |
| ---- | ------- | -------------------------------------------------------------------------------- |
| id   | Integer | The decision model ID you wish to use. The **Get Models** API returns this value |

```bash
curl --location 'https://adjutor.lendsqr.com/v2/decisioning/models/2355' \
--data-raw '{
    "gender": "Female",
    "marital_status": "Single",
    "age": "21",
    "location": "lagos",
    "no_of_dependent": "0",
    "type_of_residence": "Rented Apartment",
    "educational_attainment": "BSc, HND and Other Equivalent",
    "employment_status": "Employed",
    "sector_of_employment": "Other Financial",
    "monthly_net_income": "100,000 - 199,999",
    "employer_category": "Private Company",
    "bvn": "22536051111",
    "phone_number": "08012345678",
    "total_years_of_experience": 5,
    "time_with_current_employer": 2,
    "previous_lendsqr_loans": 3,
    "phone": "07062561111",
    "bvn_phone": "07062561111",
    "office_email": "adojohnsule@lendsqr.com",
    "personal_email": "adojohnsule@lendsqr.com",
    "amount": 10000
}'
```

```json
{
   "status":"success",
   "message":"Successful",
   "data":{
      "credit_score_items":[
         {
            "score_name":"age",
            "score_value":"21 - 30",
            "weight":"7",
            "maximum_score":10,
            "borrower_score":0,
            "weighted_score":0
         },
         {
            "score_name":"gender",
            "score_value":"Female",
            "weight":"10",
            "maximum_score":10,
            "borrower_score":10,
            "weighted_score":0.0909
         },
         {
            "score_name":"location",
            "score_value":"lagos",
            "weight":"5",
            "maximum_score":10,
            "borrower_score":9,
            "weighted_score":0.0409
         },
         {
            "score_name":"customer_tier",
            "weight":"5",
            "maximum_score":10,
            "borrower_score":0,
            "weighted_score":0
         },
         {
            "score_name":"marital_status",
            "score_value":"Single",
            "weight":"5",
            "maximum_score":10,
            "borrower_score":6,
            "weighted_score":0.0273
         },
         {
            "score_name":"employer_category",
            "weight":"0",
            "maximum_score":10,
            "borrower_score":0,
            "weighted_score":0
         },
         {
            "score_name":"employment_status",
            "score_value":"Employed",
            "weight":"10",
            "maximum_score":10,
            "borrower_score":10,
            "weighted_score":0.0909
         },
         {
            "score_name":"type_of_residence",
            "score_value":"Rented Apartment",
            "weight":"5",
            "maximum_score":10,
            "borrower_score":10,
            "weighted_score":0.0455
         },
         {
            "score_name":"monthly_net_income",
            "score_value":"100,000 - 199,999",
            "weight":"10",
            "maximum_score":10,
            "borrower_score":6,
            "weighted_score":0.0545
         },
         {
            "score_name":"no_of_dependent",
            "score_value":"0",
            "weight":"8",
            "maximum_score":10,
            "borrower_score":0,
            "weighted_score":0
         },
         {
            "score_name":"sector_of_employment",
            "score_value":"Other Financial",
            "weight":"5",
            "maximum_score":10,
            "borrower_score":6,
            "weighted_score":0.0273
         },
         {
            "score_name":"educational_attainment",
            "weight":"5",
            "maximum_score":10,
            "borrower_score":0,
            "weighted_score":0
         },
         {
            "score_name":"total_years_of_experience",
            "weight":"5",
            "maximum_score":10,
            "borrower_score":4,
            "weighted_score":0.0182
         },
         {
            "score_name":"time_with_current_employer",
            "score_value":1,
            "weight":"5",
            "maximum_score":10,
            "borrower_score":2,
            "weighted_score":0.0091
         },
         {
            "score_name":"previous_paid_loans_on_pecunia",
            "weight":"25",
            "maximum_score":10,
            "borrower_score":0,
            "weighted_score":0
         }
      ],
      "total_weight":110,
      "score":40.46
   },
   "meta":{
      "balance":50000
   }
}
```

This provides you with an intuitive way of customer scoring.&#x20;


# Credit Bureaus

## About

The Credit Bureaus APIs contain resources and tools for accessing credit information through credit bureau integrations. Lendsqr is integrated with two of the three major credit bureaus in Nigeria, allowing you to make API calls to these bureaus to check the credit history of customers. It provides a convenient way to gather credit information and make informed lending decisions.

Adjutor provides you with data from two Credit Bureaus in Nigeria namely:

* CRC Credit Bureau
* FirstCentral Credit Bureau

## Getting started

In order to use these APIs, it is expected that you have the BVNs of the customers whose Credit Score you wish to look up.

Learn more about these endpoints [here](https://api.adjutor.io/#e1a99876-e6f8-4937-96ec-3a3516f52fd0).

<br>


# Direct Debit

All you need to know about creating, activating and debiting a mandate.

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><a href="/pages/vobEvwpEgu3z4HUVdZIR">How Direct Debit works</a></td><td>Understand all you need to know about Direct Debit.</td><td></td></tr><tr><td><a href="/pages/fDySVhxxNN8bYyM9MgGn">The Direct Debit process</a></td><td>Explore the full Direct debit from creation to activation.</td><td></td></tr><tr><td><a href="/pages/czYUVHokO0IUsnlGSw6b">Understanding Mandate Statuses</a></td><td>Explore each of the mandate statuses and what they mean.</td><td></td></tr></tbody></table>

Learn more about these endpoints [here](https://api.adjutor.io/#6726e0fd-7a62-4a3a-95ee-4ef545cf44b0).


# How Direct Debit works

Direct debit is a payment method that allows an account holder to grant authorization for a biller or lender to take money from their bank account for services as of when due. Direct debit is similar to debit cards in its ability to debit a customer’s account with prior authorization.

Direct debit helps businesses that require recurring payments on specific dates with fixed amounts, such as insurance premiums, loan repayments, service subscriptions, or variable recurring payments on different dates (e.g., postpaid lines, and electricity usage).

This direct debit API facilitates the process for Service Providers (referred to as Billers) to generate debit mandate instructions on their client's/customers' bank accounts for services rendered or products sold.

These debit mandate instructions are created as digital versions of physical instructions duly signed by the account owners (clients/customers). Once generated, the mandate instructions are automatically sent to the bank where the account is held for review and approval. The approval process requires the bank to contact the account owner to authorize the mandate, which typically takes 24 to 48 hours.<br>

The system automatically assigns a unique mandate code to each initiated mandate. This mandate code is used to initiate a direct debit transaction on the bank account associated with the debit mandate instruction.


# The Direct Debit process

Direct debit mandates follow a streamlined process that may take at least 2 hours from activation to when they are available for debits. These steps are:

* Mandate creation
* Mandate activation
* Setup for debit
* Transactions

## Mandate creation

The first step is the creation of a mandate using the API defined in this collection. As soon as the mandate is created, you should inform the customer of the next steps about how to activate the mandate.

From a best practices point of view, the customer should be informed on your app, by email, and SMS.

## Mandate activation

Activation of the mandate is usually done by the transfer of a N50 (or N100 for banks where the minimum transfer amount is N100) to designated bank accounts operated by NIBSS. The customer has 168 hours (7 days) to send this amount if not the mandate is automatically canceled.

Immediately the activation amount is received at either of the banks, the mandate is automatically activated. However, it is not available for debit at this time.

## Banks for mandate activation

The following are the authorized banks which customers should use for direct debit mandate activation.

| Fidelity Bank                                                                                                              | Paystack Titan                                                                                                         |
| -------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| <p>Account: 9020025928</p><p>Bank: Fidelity Bank Plc.</p><p>You can transfer from USSD, mobile app or internet banking</p> | <p>Account: 9880218357</p><p>Bank: Paystack-Titan</p><p>You can transfer from your mobile app and internet banking</p> |

## Setup for debit

There are usually some backend processes done by NIBSS that then processes the accounts for debit and this may take up to 2 hours before completion. If you try to debit the mandate before this time, it would return an error message such as "do not honor".

<br>


# Understanding Mandate Statuses

This guide will walk you through mandate statuses help you understand the various statuses and their descriptions.

| Status                     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Pending Mandate Activation | When a mandate is initially created, it will be marked as "Pending Mandate Activation."                                                                                                                                                                                                                                                                                                                                                                                                          |
| Pending                    | <p></p><p>Once your customer transfers the N50 fee to the bank account and it is received, the status changes to "Pending." The system then attempts to debit the customer’s account a fee of 100 naira to confirm sufficient funds.</p><p></p><p>The system will continue trying to debit the customer’s account until successful. You can click on each transaction to view the failure description and get guidance on how to assist the customer in activating the mandate successfully.</p> |

## Common Transaction Descriptions

| Status             | Description                                                                                                                                                                                                                                                                   |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Do Not Honor       | This occurs when the customer has placed a restriction on their bank account or the bank is unable to process the transaction at that moment. In this case, wait an hour or two after receiving a notification email from dd.lendsqr.com before reaching out to the customer. |
| Insufficient Funds | If the account lacks sufficient funds, this will be indicated under the transaction description. You should contact the customer and advise them to fund their account to enable successful mandate activation.                                                               |

<br>

<br>

***


# Embedded Loans and Payments

## About

Embedded loans and payments offers third-party distributors with Lendsqr the option to offer loans and payment options to customers on their platform outside Lendsqr.

It is a way to ensure a seamless experience for your customers via Lendsqr's services and lenders.

## Embedded Loans

With embedded loans, you can fuel Buy-Now-Pay-Later projects or generic loan services on your platform. Lendsqr's lenders are equipped to perform adequate KYC and power the loans that you give to your customers to service their needs on your platform. In the case of BNPL projects, increase your checkout rate as customers are now assured of loans to finance their purchases.

## Embedded Payments

With embedded payments, customers don't need to get loans with a Lendsqr lender. Provided that you have established a relationship with one of our lenders, your customers can now easily pay for purchases using the funds in their account with your partnered lender. This will make payments and checkout on your platform super seamless and easy.

Embedded loans allows you as a third-party to offer loan services to your customers on your platform without having to be a lender yourself.

These loans are typically powered by the lenders on the Lendsqr platform.

Note: Embedded payments only serve for checkout services.

## Getting started

* Sign up on pecunia.lendsqr.com and contact <api@lendsqr.com> when done. Ensure you provide a valid business account during the sign up process as this will be the account payment will be made to.
* After contacting us, your profile would be set up as a distributor with Lendsqr.
* To test the APIs available, you would be provided with a test API key to carry out the integration.
* After confirmation of what you have implemented, your production API key will be sent to you over secure channels.

## Concepts to understand

**Third-party distributor**: An external platform (not a Lendsqr lender) that wishes to offer their customers loans or payment options powered by a Lendsqr lender. This platform/partner could be an e-commerce platform wishing to offer BNPL opportunities to their customers with embedded loans or multiple check out options with embedded payment capabilities.

**Lender**: This is a business that gives out loans via the Lendsqr platform.

**Customers:** The end users on the distributor platform.

Learn more about these endpoints [here](https://api.adjutor.io/#e362f9c8-6bdd-4569-89fb-1ffd6a3822d9).


# Platform Data

All you need to know about the Adjutor platform data endpoints.

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><a href="/pages/imxomwWQHhApyqdIykLK">Data for Lenders</a></td><td>Explore data available to lenders via our APIs</td><td></td></tr><tr><td><a href="/pages/duazQ0DeXc62ZzYkFCG1">Operational Services</a></td><td>Understand how to monitor the API performance. </td><td></td></tr></tbody></table>

Learn more about these endpoints [here](https://api.adjutor.io/#ed72d4c5-bba8-44b0-8905-67aeb1476d32).


# Data for Lenders

Lenders and their customers generate a lot of data that are important for lenders outside of the Lendsqr ecosystem. For example, lenders may want to use new customer information to drive drip marketing. Or they may want to use loan data to send customized reminders to borrowers

Irrespective of what the lender wants, Lendsqr allows lenders to use Adjutor APIs to get these data. There are almost infinite limits to the data a lender can get for their customers, transactions, audit activities, etc.

## Common Parameters

* Getting individual data: Some endpoints allow you to get individual data instead of everything, which at times can be overwhelming. For example, you can get /data/users/:id.
* Pagination: Every data endpoint supports pagination with the default being 100.
* Filtering: Some data endpoints support filtering. The filters available would be provided in the description
* Process time: Some data endpoints are not online in real-time as they are processed as part of our batch operations. These data options would have process time to show the time the data set was created.&#x20;

Below are API services available for usage:

<table><thead><tr><th width="203">API Endpoint</th><th>Description</th></tr></thead><tbody><tr><td><a href="https://api.adjutor.io/#96aaaa83-6837-4be1-a9cb-6f1c0cd44f0e">Get Options</a></td><td>This endpoint is used to get the data options or sources available for a lender. With the options gotten from the response, you are able to get data relevant to you. </td></tr></tbody></table>


# Operational Services

These endpoints are a collection of APIs to be used by a lender or an integrator to get information about their accounts, profiles, and wallet balances.

## Monitoring API performance

Our APIs provide endpoints for customers to check  the status of the Adjútor API service to ensure that it is functioning properly. With this service, you are able to access information in a timely fashion and troubleshoot any issues, helping you stay informed and in control of your system at all times.

While some of these information are available on the web application, it is possible you might want to get these via APIs. Below are some of the services available via these APIs:

<table><thead><tr><th width="179">API Endpoint</th><th>Description</th></tr></thead><tbody><tr><td><a href="https://api.adjutor.io/#943e2b29-955e-44ff-89f0-b7778effadd4">Get Pricing</a></td><td>This endpoint is used to obtain the current pricing of the API services. Kindly note that pricing may be different from lender to lender due to commercial negotiations that could have provide some lenders with a different pricing due to volume commitment.</td></tr><tr><td><a href="https://api.adjutor.io/#a9942d12-c8a4-4be0-8da8-20f268b3af37">Get Wallet</a></td><td>This request is used to obtain the wallet information on the lender's profile.</td></tr><tr><td><a href="https://api.adjutor.io/#04211f32-f733-47b6-982a-aa54d79ddb2b">Get API Audit Logs</a></td><td>This endpoint is used to get the audit logs of the API calls made on the profile. It is currently under development</td></tr><tr><td><a href="https://api.adjutor.io/#f6bf5fab-caa8-426c-8672-23f0173debc2">Get Status Check</a></td><td>This endpoint is used to obtain the status of systems under Adjutor.</td></tr><tr><td></td><td></td></tr></tbody></table>


# Transactions and Balances with Kolo

{% hint style="info" %}
Note:

This is a beta, and so things may be a bit flaky at the edges. We are always grateful to have your feedback to make things better.
{% endhint %}

## Introduction&#x20;

[Kolo](https://lsq.li/kolo?s=documentation) is a financial management application that consolidates all your bank accounts into a single platform. With Kolo, users can view balances, transactions, categorize spending, and much more. Our API extends these functionalities, allowing developers to integrate Kolo’s features into their applications. This API enables the tracking of bank balances and transactions, giving you a glimpse of your customers financial health.&#x20;

## Getting Started&#x20;

To use the Kolo API, customers need to:&#x20;

* **Create an Account**: Users must sign up for an account with [Kolo](https://lsq.li/kolo-app?s=documentation).&#x20;
* **Grant Permissions**: Users need to authorize the API to access their bank account information.

<figure><img src="/files/SEa9SbFzPnf9iR3idLsi" alt=""><figcaption><p>Kolo permissions page</p></figcaption></figure>

## Authentication&#x20;

The Kolo API uses OAuth 2.0 for authentication.&#x20;

Ensure that you have valid credentials and have completed the necessary authorization steps to interact with the endpoints.


# Initializing Authorization

In order to gain access to the customer's data using Kolo's API, you need to initialize the authorization process. This involves exchanging an authorization code for an access token, which will allow you to interact with the other API endpoints securely and with consent.

## **Step 1: Obtain Authorization Code**

In order to obtain an authorization code, you need to redirect users to the Kolo authorization URL so they can grant you consent to access their data. Here’s the format of the authorization URL:

```
GET https://app.kolo.finance/data-share?response_type=code&client_id={CLIENT_ID}&redirect_uri={REDIRECT_URI}&scope={SCOPE}
```

| Parameter      | Description                                                                         |
| -------------- | ----------------------------------------------------------------------------------- |
| response\_type | Set this to `code` to receive an authorization code.                                |
| client\_id     | Your Adjutor application's client ID. You get this when creating an app on Adjutor. |
| redirect\_uri  | The URI to redirect to after authorization.                                         |
| scope          | The scope of the access request (e.g., `transaction:list`).                         |

**Example Request:**

```
GET https://app.kolo.finance/data-share?response_type=code&client_id=your_client_id&redirect_uri=https://app.adjutor.io&scope=transaction:list
```

## **Step 2: Exchange Authorization Code for Access Token**

Once the user authorizes your application and grants you access, they will be redirected back to your specified `redirect_uri` with an authorization code. You need to exchange this code for an access token. Using this access token, you can then call the other endpoints. The format for this can be found below:

```
POST https://adjutor.lendsqr.com/v2/kolo/auth
```

**Request Body:**

```
code=authorization_code&grant_type=authorization_code&redirect_uri=https://app.adjutor.io
```

| Parameter     | Description                                              |
| ------------- | -------------------------------------------------------- |
| code          | The authorization code received from the previous step.  |
| grant\_type   | Set this to `authorization_code`.                        |
| redirect\_uri | The same redirect URI used in the authorization request. |

**Example Request:**

```bash
curl --location 'https://adjutor.lendsqr.com/v2/kolo/auth' \
--data '{
    "redirect_uri": "https://app.adjutor.io",
    "grant_type": "authorization_code",
    "code": "kEhA1fQsT86ZxCqh"
}'
```

## **Step 3: Receive the Access Token**

If the request is successful, you will receive a response containing the access token and other related information.

**Example Response:**

```json
{
    "access_token": "your_access_token",
    "refresh_token": "your_refresh_token",
    "username": "username",
    "scope": "transaction:list",
    "token_type": "Bearer"
}
```

| Parameter      | Description                                     |
| -------------- | ----------------------------------------------- |
| access\_token  | The token to be used for authenticated requests |
| token\_type    | Type of token, typically "Bearer".              |
| username       | The name of the user                            |
| refresh\_token | Token used to refresh the access token.         |
| scope          | Scopes granted by the access token              |

By following these steps, you can successfully initialize the authorization process and start using the Kolo API to access customer financial data securely.


# Using your access token

With the access token, you can now make authenticated requests to the Kolo API endpoints. This access token should be included in the `Authorization` header of your requests.

**Example Request:**

```bash
curl --location 'https://adjutor.lendsqr.com/v2/kolo/transactions' \
--header 'x-access-token;'
```

## **Refreshing the Access Token**

Access tokens often expire quickly, causing issues with your API calls. In the instance where the access token expires, you can use the refresh token to obtain a new access token.

**Endpoint:**

```
POST https://adjutor.lendsqr.com/v2/kolo/auth
```

**Request Body:**

```
code=authorization_code&grant_type=refresh_token&redirect_uri=https://app.adjutor.io
```

| Parameter     | Description                                              |
| ------------- | -------------------------------------------------------- |
| code          | The authorization code received from the previous step.  |
| grant\_type   | Set this to `refresh_token`.                             |
| redirect\_uri | The same redirect URI used in the authorization request. |

**Example Response:**

```json
{
  "access_token": "new_access_token",
  "token_type": "Bearer",
  "username": "customer's username",
  "scope": "transaction:list"
}
```


# Permission Scopes

The Kolo API uses certain scopes to control access to various resources and actions on a customer's account. Each scope allows specific operations on the associated resources.&#x20;

Below is a detailed explanation of the available scopes, including the corresponding endpoints and how they work.

## **Scope Descriptions**

| Scope                 | Description                                        |
| --------------------- | -------------------------------------------------- |
| `transaction:list`    | Allows listing all transactions.                   |
| `transaction:view`    | Allows viewing details of a specific transaction.  |
| `transaction:update`  | Allows updating a specific transaction.            |
| `bank_account:list`   | Allows listing all bank accounts.                  |
| `bank_account:view`   | Allows viewing details of a specific bank account. |
| `bank_account:add`    | Allows adding a new bank account.                  |
| `bank_account:update` | Allows updating a specific bank account.           |
| `bank_account:delete` | Allows deleting a specific bank account.           |
| `bank_account:sync`   | Allows synchronizing a specific bank account.      |
| `profile:view`        | Allows viewing the user's profile.                 |

Depending on the use case, make sure to EXPLICITLY state what scopes you are requesting for in your request.&#x20;

{% hint style="warning" %}
Note

If any of these scopes are not clearly defined in your initial URL, you won't be able to carry out any of these actions.
{% endhint %}


# Core Services

Managing customer data effectively is crucial for any business that deals with customer-facing operations. Our Core Services APIs allow you build your own application using our APIs and empower your application to seamlessly handle various customer-related tasks within the Lendsqr ecosystem.

These APIs offer functionalities that allow you to create, retrieve, update, and delete customer information, ensuring that your customer data remains accurate, up-to-date, and organized.

With these APIs, you can manage customer profiles, as well as all the requirements of the lending cycle which include loans, direct debits, cards, wallets, among others, all within our ecosystem, thereby helping you lend smoothly.&#x20;


# Authorization and Token management

## **Accessing Core Services APIs**

To interact with any API within this core services collection (excluding the `Auth` endpoint), the following authentication mechanisms must be implemented:

* **Bearer Token:** This token, which serves as the API key, is generated via your application on Adjutor.
* **x-access-token Header:** This token is retrieved from the Auth endpoint. After providing valid credentials (email and password) in the request body, the response will include the token. This token must be included in the headers of subsequent API requests as `x-access-token`.

## **Steps to Obtain Authentication Tokens**

* Create an account on the [Lendsqr admin console](https://app.lendsqr.com/) to initiate the process.
* Add a team member to your organization using a unique email. This member will manage all API interactions through the admin console. [Learn more](https://lendsqr.freshdesk.com/support/solutions/articles/44002359125-how-to-add-a-team-member)
* The designated team member can access the [Adjutor](https://app.adjutor.io/) platform with the credentials set up on the admin console. Once logged in, they can create an application and retrieve the API key, which acts as the Bearer Token.
* Use the email and password of the team member to call the Auth endpoint. The response will include the `x-access-token`, which must be included in the header of all core service API requests.

{% hint style="info" %}
**Important Considerations**

Once the team member's credentials have been used to authenticate API calls, those credentials will no longer be valid for accessing the admin console. Ensure proper management of credentials to maintain access control.
{% endhint %}


# FAQs

To access every Frequently Asked Question, kindly visit: <https://adjutor.io/faq>


# Getting Support

If you require assistance at any time when using this documentation or the services, please email <api@lendsqr.com> and someone would be in touch with you as soon as possible.&#x20;

If you are currently using Lendsqr to lend, you can also contact your account manager at <growth@lendsqr.com>.


# Pricing

How much does it cost to use Adjútor? Find out here.

Many of the Adjutor APIs are charged at commercial rates which means that your service account must be funded as the system debits this account for every ***successful*** API call.

## How much do I pay for each API call?

The price charged for every API call varies depending on the endpoint being called.&#x20;

Find detailed information about the pricing here: <https://adjutor.io/pricing>

You can reach out to <api@lendsqr.com> for further support and inquiry.

## Funding Your Service Account <a href="#funding-your-service-account" id="funding-your-service-account"></a>

For you to make your first API call, you need to fund your service account. ***But first***, Lendsqr will make available to you a NGN1,000 credit so you can test out the capabilities of the API before committing to purchase it.

Lendsqr service accounts are virtual accounts in which you can transfer funds directly from any Nigerian bank.&#x20;

To see the details of your service account, log into your Admin panel at <https://app.adjutor.io/>

1. Navigate to the “**Wallet**” menu.
2. The bank account to fund and the balance is displayed on the view


# Glossary

Here are some common terms to take note of

> ### Adjutor
>
> Means **helper** in Latin. This is our API distribution service that gives lenders and fintechs outside the Lendsqr platform access to our key services via APIs

> ### Bad actor
>
> A bad actor is an informal term used to classify user's within the Lendsqr ecosystem that have committed fraud or defaulted on loans as such they have been blacklisted on the Karma engine.

> ### Bank Verification Number&#x20;
>
> Bank Verification Number (BVN) is an 11 digit number that serves as a unique identifier for individuals. An individual's bank accounts are linked to this number.

> ### Decisioning
>
> In relation to loans, Decisioning is the process of determining if a user is eligible to borrow money from a lending company.

> ### Lendsqr Ecosystem
>
> This is Lendsqr’s growing list of borrowers (accumulated over time) which lending companies can tap into to know more about the past performances of these borrowers with other lenders. The Lendsqr ecosystem is accessible via the [Validation](/adjutor-api-endpoints/validation#ecosystem-lookup) endpoint.

> ### Karma
>
> Karma is a database of blacklisted bad actors within the Nigerian Lending ecosystem. This platform is a blacklist engine managed by Lendsqr. You can validate your customers by running checks via the [Validation](/adjutor-api-endpoints/validation#get-karma) endpoint.

> ### Scoring
>
> Scoring or Credit scoring is a statistical analysis performed by lenders and financial institutions to determine the creditworthiness of a borrower.

> ### Service account
>
> Lendsqr service accounts are virtual accounts in which you can transfer funds directly from any Nigerian bank to pay for access to any of Lendsqr's paid services.


