Documentation version v3.01, 24.10.2022
"AS Inbank filialas" e-Leasing+ online solution implementation and steps of integration into online platform of E-shop are described in this document. E-Leasing+ online solution consists of two cornerstone components: web service and remote web application.
E-shop must program:
E-shop server application (backend) will contact e-Leasing+ web service and transmit information about Client and his shopping cart in an exchange of a unique e-Leasing+ application token. With the unique token it will forward the Client to the e-Leasing+ system. In case the Client cancels the process or Leasing contract, Client is redirected to the E-shop along with the information of the leasing contract status.
Data exchange between the E-shop and e-Leasing+ system is encoded in UTF-8 format.
E-Leasing + implementation and integration steps are shown in the the following chapters.
URL examples for test and live:
Test | Live |
---|---|
https://api.mokilizingas.lt/apitest/ | https://api.mokilizingas.lt/api2/ |
E-Leasing+ web service (WS) performs two main functions: Leasing application creation and final contract status check. WS client part must be implemented at the server level of E-shop (server side). The data exchange between E-shop and the WS must be through the secure socket layer (SSL). All API endpoints require authorization API key which must be provided in header with name ix-api-key
.
In case of an important change during the process of contract completion, E-shop is informed to alert_url
using POST method. Once the E-shop has the information, it must check the current status of contract. Status code indicates Leasing contract status.
Input parameters:
Attributes | Required | Type | Definition and Examples |
---|---|---|---|
appl_token | Yes | String | Unique Leasing application token |
order_id | Yes | String | Unique E-shop shopping cart id |
appl_phase | Yes | String | INIT, OPTION, DEAL, FINISH, etc |
appl_status | Yes | String | OK or error code |
sha1 | Yes | String | Generated SHA1 from symbols: uuid , appl_token , appl_phase , appl_status |
contract_no | No | String | If application in DEAL phase, then contract does not exist |
close_reason | No | String | The reason why an application was closed (e.g. phase = CLOSED ) |
Application token parameter identifies e-Leasing+ application. Order id is unique E-shop order_id
. uuid
is unique e-shop id assigned by Inbank.
No output parameters exist.
List of application phases:
Phase | Description | Last Phase |
---|---|---|
NEW | New application | No |
INIT | Data input | No |
EVAL | Evaluating | No |
REJECTED | Rejected | Yes |
OPTION | Options | No |
PROPOSAL | Proposal | No |
DEAL | Deal | No |
FINISH | Finish | Yes |
CANCEL | Cancel | Yes |
CLOSE | Close | Yes |
List of contract closure reasons:
Code | Description |
---|---|
UNFINANCEABLE | Client is unfinanceable |
KAC | Closed by our communication center |
EXPIRED | Application has expired |
Link for Mokilizingas | Inbank calculator integration:
https://skaiciuokles.inbank.lt/doc/calculator
Link for Mokilizingas | Inbank MOKI3,5,10 calculator integration:
https://skaiciuokles.inbank.lt/doc/moki_calculator
Link for Mokilizingas | Inbank custom calculator integration through API:
GET /eshop/:uuid/v2/tariff
This method is used to get all products information (pricing) from e-Leasing+ which are assigned to specific partner e-shop.
If e-shop have assigned only one tariff this endpoint may not be used.
To get all information about assigned tariffs/products to e-shop need provide e-shop uuid
, this value is provided by "AS Inbank filialas".
Get product information
Unauthorized
Not Found
{- "tariffs": [
- {
- "tariff_code": "T_TG_0_00001",
- "valid_from": "2019 - 03 - 21 T00: 00: 00 ",
- "valid_to": "",
- "moki": "5",
- "tariff_data": [
- {
- "term_from": 3,
- "term_to": 3,
- "amount_from": 50,
- "amount_to": 10000,
- "advance_from": 0,
- "advance_to": 0.75,
- "admin_fee": 6,
- "monthly_admin_fee": 0,
- "monthly_interest": 15.9
}, - {
- "term_from": 6,
- "term_to": 6,
- "amount_from": 50,
- "amount_to": 10000,
- "advance_from": 0,
- "advance_to": 0.65,
- "admin_fee": 0,
- "monthly_admin_fee": 0,
- "monthly_interest": 0
}
]
}, - {
- "tariff_code": "T_TG_0_00002",
- "valid_from": "2019 - 01 - 25 T00: 00: 00 ",
- "valid_to": "2023 - 01 - 09 T00: 00: 00 ",
- "tariff_data": [
- {
- "term_from": 10,
- "term_to": 10,
- "amount_from": 50,
- "amount_to": 10000,
- "advance_from": 0,
- "advance_to": 0.75,
- "admin_fee": 0,
- "monthly_admin_fee": 0,
- "monthly_interest": 0
}
]
}
], - "error_code": "",
- "error_message": "",
- "errors": [ ]
}
POST /eshop/v2/create
This method is used to create contract and primal data exchange between E-shop and e-Leasing+ online platform. Data exchange is in the safe background mode (Server To Server).
API key is provided by "AS Inbank filialas" once the contract is signed. Return_url
is used to return user to E-shop webpage. Order_id
parameter defines unique shopping cart id. Alert_Url
is used to inform Eshop about major changes in the process. If the term
attribute will be provided, the contract will be evaluated for that specific term without possibility to change it later in the process. The price
attribute in shopping cart list order_json
must be filled by price per unit.
Error code
attribute defines the result of the user authentication. If this value is empty - authentication was successful; otherwise error code will be filled, and the error definition will provide further information about the error. In case of successful authentication, appl_token
parameter is filled with unique value; otherwise it is empty. appl_token
attribute value is required for the further steps, this parameter is a unique identifier that is valid for only a certain period of time.
Creates a new contract
Unauthorized
Not Found
Unprocessable Entity
{- "return_url": "example.com",
- "alert_url": "example.com",
- "order_id": "A123",
- "order_amount": 900,
- "uuid": "c3945e9e-426f-8859-8b60-3b9e9a46d101",
- "tariff_code": "T_TG_0_2375",
- "term": 12,
- "order_currency": "EUR",
- "order_info": "Eshop basket name",
- "testing": "Y",
- "first_name": "John",
- "last_name": "Smith",
- "pers_code": "39108190000",
- "client_phone": "7013534",
- "client_email": "john.smith@test.test",
- "client_address": "Niine 11",
- "doc_type": "AK",
- "doc_no": "LS4L310D93",
- "vendor_phone": "7237450",
- "vendor_email": "vendor@eshop.test",
- "vendor_name": "Test shop",
- "order_json": [
- {
- "name": "prek1",
- "category": "TGR",
- "price": "300.00",
- "quantity": "2"
}, - {
- "name": "APPLE",
- "category": "TGR",
- "price": "300.00",
- "quantity": "1"
}
]
}
{- "appl_token": "F0C551ECCAA8AF5882754D8BF81C1A0A9EE3FE92",
- "error_code": "",
- "error_message": "",
- "redirect_url": "example.com",
- "errors": [ ]
}
GET /eshop/:uuid/:appl-token/v2/redirect/url
This endpoint returns a URL that is used to redirect the client to the correct e-Leasing+ system step.
Redirect to e-Leasing+
Unauthorized
Not Found
Unprocessable Entity
{- "redirect_url": "example.com",
- "errors": [ ]
}
GET /eshop/:appl-token/v2/redirect
Client from the E-shop is redirected to the e-Leasing+ system during this process.
This communication happens at the level of Clients web browser. Therefore, the most important information regarding the E-shop shopping cart is provided during the process of application creation (during the background "Server To Server" process).
Client is forwarded/returned from the e-Leasing+ system to the E-shop during this process. HTML form is composed containing appl_token
and order_id
as parameters for the forwarding. Application token will be used to identify shopping cart in Leasing+ and order id and uuid will be used for validation. GET method
forwards Client along with the parameters to the E-shop return_url
address (see chapter). E-shop must check the status of contract at this step - endpoint ...eshop/v2/check (see chapter).
Redirect to e-Leasing+
Unauthorized
Not Found
Unprocessable Entity
{- "message": "unauthorized"
}
POST /eshop/v2/check
This method is used to check the leasing contract status. E-shop uses this method to find out what is the status of the Leasing contract.
Unique appl_token
with e-shop order_id
and uuid
must be provided to check agreement status. Parameters must be the same which were used to create an application.
Contract status
Unauthorized
Not Found
{- "appl_token": "0E7F74967CA051F45E14AE2B0E6EB1B70A3292EE",
- "order_id": "5E13I266GV",
- "uuid": "c3945e9e-426f-8859-8b60-3b9e9a46d101"
}
{- "appl_token": "0E7F74967CA051F45E14AE2B0E6EB1B70A3292EE",
- "result": "SIGNED_DEAL",
- "result_info": "Contract completed",
- "result_msg": "Contract completed",
- "order_id": "5E13I266GV",
- "advance": 999,
- "currency": "EUR",
- "contract_no": "TBK90126FDPA",
- "errors": [ ]
}