Checkout Integration Quickstart Guide

Welcome to the Checkout integration guide. Checkout offers an instant-decision, B2B pay-over-time tool that integrates directly into your customer's checkout experience. By following this guide, you can enable your customers to access flexible payment options effortlessly.


Overview

The PayLater checkout process allows customers to choose a "Pay Later" option during checkout on a partner's platform. This initiates a seamless workflow where the necessary transaction details are communicated to Lendica, and the customer completes the payment process through Lendica's system.

Workflow Summary:

  1. Initiate Checkout: When a customer opts for PayLater, the partner platform generates a Checkout object containing transaction details and posts it to Lendica.
  2. Redirect to PayLater App: Lendica processes the Checkout object and returns a URL that redirects the customer to the PayLater app.
  3. User Authentication and Application: In the PayLater app, the customer logs in, completes an application if necessary, and confirms payment terms.
  4. Completion: Once the payment setup is finalized, Lendica sends a request to a unique callback URL to signify that the process was successful.

Step-by-Step Integration Guide

Step 1: Initiate Checkout

Triggering the Checkout

The process begins when a customer selects the PayLater option at checkout. Upon this action:

  • The partner system must generate a Checkout object that encapsulates all the relevant transaction details.
  • This object is then POSTed to Lendica's designated endpoint.

The Checkout Object

The Checkout object includes details about the transaction, the involved parties, and the intended payment outcomes:

FieldTypeDescription
partner_namestringName of your service as registered with Lendica.
company_detailsdictionaryInformation about the buying company (e.g., ID, company name).
vendor_detailsdictionaryInformation about the selling vendor (e.g., ID, company name, email).
totalfloatTotal amount to be financed.
invoicesarrayDetailed list of invoices involved, including individual amounts due per invoice.
callback_urlstringCheckout-specific URL for Lendica to send status update post-transaction.
pay_partner_platformbooleanIndicates if payment should be made directly to the partner platform.
checkout_idstringThe ID of the checkout transaction within the partner system.
checkout_datetimedatetimeThe datetime of the checkout transaction.

Example Checkout Object:

{
  "partner_name": "Partner Platform",
  "company_details": {
    "id": "BUYER001",
    "company_name": "Buyer Co"
  },
  "vendor_details": {
    "id": "SELLER001",
    "company_name": "Seller Co",
    "email": "[email protected]"
  },
  "total": 100,
  "invoices": [
    {
      "id": "INV001",
      "total": 100,
      "amount_due": 50
    },
    {
      "id": "INV002",
      "total": 100,
      "amount_due": 50
    }
  ],
  "callback_url": "https://success.partner.com/transaction-complete",
  "pay_partner_platform": false,
  "checkout_id": "f249f79f-8841-4f36-adb6-5f39c73690d6",
  "checkout_datetime": "2024-02-01T11:26:27.130Z"
}

The above object should be sent as a POST request to Lendica's checkout endpoint.

  • For the development server: https://api-dev.golendica.com/api/v1/checkout/submit
  • For the production server: https://api.golendica.com/api/v1/checkout/submit

Step 2: Open the Lendica Checkout URL

Upon receiving the Checkout object, Lendica processes it and returns a URL:

https://checkout.app.golendica.com/{params}

The partner system should use this URL to open the PayLater app either in a modal window or a new tab within the partner platform, ensuring a seamless user experience.

Step 3: Lendica Application and Invoice Confirmation

Within the PayLater app modal:

  • Users will log in to their Lendica account.
  • New users will complete the application process.
  • Users confirm their invoice details and select their preferred payment terms.

Step 4: Vendor Payment Details

If Lendica is not paying the partner platform directly, we must retrieve the vendor's bank details in order to fund the invoice. It is required to send either the vendor's complete bank details or the vendor's email along with the checkout object.

If the vendor's bank details are not included in the checkout object, Lendica will send a registration form to the vendor using the email included in the checkout object, allowing them to connect their bank account. Vendors will only need to register once.

Step 4: Completion and Callback

After the PayLater process is completed, Lendica will send a request to the unique Callback URL that was sent with the checkout data.

The data will be sent as follows:

{
  "checkout_id": "f249f79f-8841-4f36-adb6-5f39c73690d6",
  "checkout_successful": true
}

During initial onboarding, partners should provide Lendica an API key to make this request to the callback URL, which should only accept data from requests authenticated with our key.

If a callback request is never sent, the partner should assume that the process was unsuccessful, and require that a different payment method be used on their platform for this checkout.

Support and Additional Resources

Should you encounter any issues or have questions during the integration process, please don't hesitate to reach out to our support team. For more detailed documentation and best practices, visit our developer portal.