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:
- Initiate Checkout: When a customer opts for PayLater, the partner platform generates a Checkout object containing transaction details and posts it to Lendica.
- Redirect to PayLater App: Lendica processes the Checkout object and returns a URL that redirects the customer to the PayLater app.
- User Authentication and Application: In the PayLater app, the customer logs in, completes an application if necessary, and confirms payment terms.
- 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:
Field | Type | Description |
---|---|---|
partner_name | string | Name of your service as registered with Lendica. |
company_details | dictionary | Information about the buying company (e.g., ID, company name). |
vendor_details | dictionary | Information about the selling vendor (e.g., ID, company name, email). |
total | float | Total amount to be financed (sum total of all bills). |
bills | array | Detailed list of bills involved, including individual amounts due per invoice. "Bills" are what Lendica calls A/R invoices. |
success_url | string | URL where the user should be redirected to after a successful transaction with Lendica. This should be a confirmation page for this checkout on your platform. |
callback_url | string | Checkout-specific URL for Lendica to send the event status webhook. |
pay_partner_platform | boolean | Indicates if payment should be made directly to the partner platform. (Instead of to the vendor) |
checkout_id | string | The ID of the checkout transaction within the partner system. |
checkout_datetime | datetime | The datetime of the checkout transaction. |
Example Checkout Object:
{
"partner_name": "partner_platform",
"checkout_id": "f249f79f-8841-4f36-adb6-5f39c73690d6",
"checkout_datetime": "2024-02-01T11:26:27.130Z",
"total": 200,
"callback_url": "https://success.partner.com/transaction-complete",
"pay_partner_platform": false,
"company_details": {
"partner_company_uuid": "BUYER001",
"company_name": "Buyer Co"
},
"vendor_details": {
"partner_company_uuid": "SELLER001",
"company_name": "Seller Co",
"email": "[email protected]"
},
"bills": [
{
"partner_invoice_uuid": "INV001",
"total": 100,
"subtotal": 100,
"tax": 0
},
{
"partner_invoice_uuid": "INV002",
"total": 100,
"subtotal": 100,
"tax": 0
}
]
}
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.