Eshop unique identifier.
E-shop leasing - II
Documentation version 3.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:
- Get products list from Leasing+ (Optional if E-shop configured to use only one product).
- Creating an application in the e-Leasing+ system.
- E-shop to e-Leasing+ system client forwarding.
- Return of clients from e-Leasing+ to E-shop
- Clients' leasing contract state check
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 |
|---|---|
| Please contact us at integration@inbank.lt for test data | 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:
Link for Mokilizingas | Inbank MOKI3,5,10 calculator integration:
Link for Mokilizingas | Inbank custom calculator integration through API:
Request
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".
- Demo environmenthttps://api.mokilizingas.lt/apitest/eshop/{uuid}/v2/tariff
- Live environmenthttps://api.mokilizingas.lt/api2/eshop/{uuid}/v2/tariff
{ "tariffs": [ { … }, { … } ], "error_code": "", "error_message": "", "errors": [] }
Request
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.
If e-shop have assigned 2 or more tariffs/products this parameter is mandatory, otherwise - optional. Use product information endpoint to get the list.
Decimal may be divided by dot or comma. Separation of thousands may not be used. Sum must exceed 0 EUR and equal to the order basket "order_json".
Currency code by ISO-4217. For example: LTL, EUR, USD. If field is not set, then our system default currency till 2014-12-31 is LTL, after 2014-12-31 is EUR.
- Demo environmenthttps://api.mokilizingas.lt/apitest/eshop/v2/create
- Live environmenthttps://api.mokilizingas.lt/api2/eshop/v2/create
{ "appl_token": "F0C551ECCAA8AF5882754D8BF81C1A0A9EE3FE92", "error_code": "", "error_message": "", "redirect_url": "example.com", "errors": [] }
- Demo environmenthttps://api.mokilizingas.lt/apitest/eshop/{uuid}/{appl-token}/v2/redirect/url
- Live environmenthttps://api.mokilizingas.lt/api2/eshop/{uuid}/{appl-token}/v2/redirect/url
{ "redirect_url": "example.com", "errors": [] }
Request
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).
- Demo environmenthttps://api.mokilizingas.lt/apitest/eshop/{appl-token}/v2/redirect
- Live environmenthttps://api.mokilizingas.lt/api2/eshop/{appl-token}/v2/redirect
Request
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.
Unique Leasing application token.
- Demo environmenthttps://api.mokilizingas.lt/apitest/eshop/v2/check
- Live environmenthttps://api.mokilizingas.lt/api2/eshop/v2/check
Contract status
Status code:
- ERROR
- INIT_AUTH
- POST_RECEIVED
- WAITING_FOR_PERMISSION
- PERMISSION_SIGNED
- VALIDATING_INFO
- WAITING_FOR_SIF_CONFIRM
- WAITING_FOR_DEAL_SIGN
- NEED_HELP
- NO_LOAN_POSSIBLE
- CLIENT_CANCELED
- SIGNED_DEAL
- SIGNED_DEAL_NO_ADVANCE
- SIGNED_DEAL_YOUR_ADVANCE
- SIGNED_DEAL_OFFLINE
In case of error, status code is ERROR and the definition explains the error. In case the advance payment is needed from the client - the amount is shown in the field advance. Further additional information may be displayed in the result_info field. Status code description:
- ERROR - Error
- INIT_AUTH - Session between e-shop ant web service created
- POST_RECEIVED - Client start work
- WAITING_FOR_PERMISSION - Client does not have a permission
- PERMISSION_SIGNED - Permission signed
- VALIDATING_INFO - Permission signed, client may continue shopping process
- WAITING_FOR_SIF_CONFIRM - Waiting for SIF confirmation
- WAITING_FOR_DEAL_SIGN - Credit chosen, waiting for contract confirmation
- NEED_HELP - Customers need help
- NO_LOAN_POSSIBLE - Credit cannot be given to client
- CLIENT_CANCELED - Client canceled order
- SIGNED_DEAL - Contract completed
- SIGNED_DEAL_NO_ADVANCE - Contract completed without advance
- SIGNED_DEAL_YOUR_ADVANCE - Contract completed and advance must pay to e-shop
- SIGNED_DEAL_OFFLINE - Contract completed in Inbank accounting system
{ "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": [] }