API Reference

Lendica PayLater Backend Integration Guide

This document provides an overview of integrating your platform with Lendica using a backend-only integration. It outlines the integration flow, API endpoints, data models, configuration options, and best practices to ensure a seamless and scalable implementation.

Table of Contents


Introduction

Lendica's PayLater product allows companies to finance their accounts payable, providing them with the flexibility to pay vendors over time. This guide is intended for partners who wish to integrate with Lendica's PayLater product through a backend integration. The integration enables partners to offer financing options to their customers seamlessly within their platform.


Terminology

TermDefinition
PartnerYour platform integrating with Lendica.
CompanyYour customer who will be borrowing funds via your platform.
VendorThe supplier or entity to whom the Company owes money (accounts payable).
PayLaterA Lendica product that allows companies to pay vendors later by financing their bills.
Partner NameThe name for your platform in Lendicaโ€™s system.
Partner Company UUIDThe unique identifier for your customers within your platform.

Integration Overview

The backend integration with Lendica's PayLater product involves the following key components:

  • Application Submission: Collecting and submitting your customer's information to Lendica for underwriting.
  • Approval Retrieval: Fetching approval statuses and credit details for your customers.
  • Bill Submission: Submitting bills (accounts payable invoices) on behalf of your customers for financing.

By integrating with Lendica's PayLater product, you can offer your customers extended payment terms, improve cash flow management, and enhance their purchasing power.


Integration Flow

The integration process consists of three main steps:

  1. Company Application Submission
  2. Fetching Approval Details
  3. Bill Submission for Financing

1. Company Application Submission

๐Ÿ“˜

View the Submit Application API documentation here:

Submit Application

When a new customer (Company) is onboarded to your platform, you need to submit their application details to Lendica for underwriting.

  • Purpose: To onboard the Company and apply for an Approval (credit line) in Lendica's system.
  • API Endpoint: /submit/application
  • Data Required: Application details including company and contact information.

Flow:

  1. Data Collection: Collect the necessary information from your customer during onboarding or application.
  2. API Request: Send a POST request to Lendica's /submit/application endpoint with the application data.
  3. Underwriting Process: Lendica processes the application and performs underwriting to assess creditworthiness.
  4. Response Handling: Lendica responds with the ID of the created Company.

โ˜๏ธ

Submitting Documents:

To submit documents along with the application, first submit the Application details. Upon success, you can submit files using the Submit Document API route

2. Fetching Approval Details

๐Ÿ“˜

View the Approval Status API documentation here:

GET Approvals

After the underwriting process, you need to retrieve the approval status and credit details for your customer.

  • Purpose: To determine financing eligibility and available credit limits.
  • API Endpoint: /partner/status/approvals (from Lendica's Status API)
  • Data Required: partner_company_uuid to identify the customer.

Flow:

  1. API Request: Send a GET request to Lendica's /partner/status/approvals endpoint with the partner_company_uuid.
  2. Data Retrieval: Lendica responds with the approval details.
  3. Integration Logic: Use this information within your platform to enable or disable financing options, display credit limits, etc.

3. Bill Submission for PayLater Financing

๐Ÿ“˜

View the Create PayLater Deal API documentation here:

Create PayLater deal

To finance a bill (accounts payable invoice) on behalf of your customer, submit the bill details to Lendica.

  • Purpose: To initiate financing for a bill or a batch of bills.
  • API Endpoint: /submit/paylater/bill
  • Data Required: Bill details, including Company information, and optionally Vendor information.

Flow:

  1. Data Preparation: Gather the bill details from your platform, including any child bills for batch financing.
  2. API Request: Send a POST request to Lendica's /submit/paylater/bill endpoint with the bill data.
  3. Financing Process: Lendica processes the request and evaluates the financing terms.
  4. Response Handling: Lendica provides a response, which may include a URL for the PayLater flow or confirmation of financing.
  5. Customer Interaction: If applicable, direct your customer to complete any necessary steps or display confirmation within your platform.

Configuration Options

When submitting a bill for financing, you can configure how funds are disbursed and collected using the following flags in your request:

  • pay_partner_platform:

    • Purpose: Determines whether Lendica should disburse funds to your platform's bank account instead of the vendor's bank account.
    • Usage:
      • Set to true if you want funds to be disbursed to your platform.
      • Set to false if funds should be disbursed directly to the vendor.
  • collect_from_partner_platform:

    • Purpose: Determines whether Lendica should collect repayments from your platform's bank account instead of from the customer's bank account.
    • Usage:
      • Set to true if you will handle collecting repayments from the customer.
      • Set to false if Lendica should collect repayments directly from the customer.
  • partner_is_vendor:

    • Purpose: Indicates whether your platform is also the vendor of the bill.
    • Usage:
      • Set to true if your platform is the vendor. In this case, you do not need to include the vendor object in the bill.
      • Set to false if the vendor is a separate entity, and include the vendor details in the bill.

Examples:

  • Scenario 1: Your platform is the vendor, and you want Lendica to disburse funds to you and collect repayments from the customer.

    • partner_is_vendor: true
    • pay_partner_platform: Can be true or false (since you are the vendor).
    • collect_from_partner_platform: false
    • Vendor Details: Not required in the bill.
  • Scenario 2: Your platform is not the vendor, but you want funds disbursed to you and you will pay the vendor.

    • partner_is_vendor: false
    • pay_partner_platform: true
    • collect_from_partner_platform: false
    • Vendor Details: Include vendor details in the bill.
  • Scenario 3: Lendica should disburse funds to the vendor and collect repayments from you.

    • partner_is_vendor: false
    • pay_partner_platform: false
    • collect_from_partner_platform: true
    • Vendor Details: Include vendor details in the bill.