This API integration guide provide details to integrate with the MrLender system.

General Info

All Web API responses will at least have the following fields:

Status:
This will be either 'SUCCESS' OR 'FAILED' and can be used to determine if the response is successful.
ResponseCode:
Internal code describing the results of the request. 'S100' for Success and every other code is for some sort of error.
ResponseMessage:
This field provides additional details related to the response code.
UniqueReferenceId:
The unique ID generated by MrLender for each web request.

Authentication

MrLender External API uses Basic Authorization header to validate all requests to the API. To authenticate with the MrLender API in either the Production or QA environment you will need:

Company Username:
API Company ID issued by MrLender.
Company Password:
API Password required for all requests to MrLender External API.

Web Requests

Endpoint
https://extapi.mrlender.com/v1.0/account/lookup
Request
{
  "MobileNumber": "07000000000",
  "WebSessionID": null
}
Success Response
{
  "Accounts": [
    {
      "AccountRef": 8270491,
      "DateOfBirth": "01/01/1986",
      "CanMakeAutomatedPayment": true
    }
  ],
  "Status": "SUCCESS",
  "ResponseCode": "S100",
  "ResponseMessage": "Success",
  "UniqueReferenceId": "45"
}
Error Response
{
  "Accounts": [],
  "Status": "FAILED",
  "ResponseCode": "A201",
  "ResponseMessage": "Applicant Not Found",
  "UniqueReferenceId": "47"
}
Endpoint
https://extapi.mrlender.com/v1.0/account/paymentoptions
Request
{
  "AccountRef": 2345678,
  "WebSessionID": null
}
Success Response
{
  "ExistingCardLast4Digits": "1234",
  "CanUseExistingCard": true,
  "CanAddNewCard": true,
  "PaymentOptions": [
    {
      "PaymentType": 1,
      "Description": "Instalment",
      "Amount": 136.56
    },
    {
      "PaymentType": 2,
      "Description": "InterestOnly",
      "Amount": 45.34
    }
  ],
  "Status": "SUCCESS",
  "ResponseCode": "S100",
  "ResponseMessage": "Success",
  "UniqueReferenceId": "45"
}
Error Response
{
  "ExistingCardLast4Digits": "",
  "CanUseExistingCard": false,
  "CanAddNewCard": false,
  "PaymentOptions": [],
  "Status": "FAILED",
  "ResponseCode": "A202",
  "ResponseMessage": "Invalid account reference",
  "UniqueReferenceId": "47"
}
Endpoint
https://extapi.mrlender.com/v1.0/payment/newcard
Request
{
  "CardNumber": "4444333322221111",
  "CVV": "123",
  "ExpiryMonth": 12,
  "ExpiryYear": 22,
  "AccountRef": 12345678,
  "PaymentType": 1,
  "Amount": 123.45,
  "WebSessionID": null
}
Success Response
{
  "CanAddNewCard": false,
  "CanRestartFlow": false,
  "ErrorMessage": "",
  "Status": "SUCCESS",
  "ResponseCode": "S100",
  "ResponseMessage": "Success",
  "UniqueReferenceId": "45"
}
Error Response
{
  "CanAddNewCard": false,
  "CanRestartFlow": false,
  "ErrorMessage": "",
  "Status": "FAILED",
  "ResponseCode": "P304",
  "ResponseMessage": "InvalidPaymentType",
  "UniqueReferenceId": "47"
}
Endpoint
https://extapi.mrlender.com/v1.0/payment/existingcard
Request
{
  "AccountRef": 12345678,
  "PaymentType": 1,
  "Amount": 123.45,
  "WebSessionID": null
}
Success Response
{
  "CanAddNewCard": false,
  "CanRestartFlow": false,
  "ErrorMessage": "",
  "Status": "SUCCESS",
  "ResponseCode": "S100",
  "ResponseMessage": "Success",
  "UniqueReferenceId": "45"
}
Error Response
{
  "CanAddNewCard": false,
  "CanRestartFlow": false,
  "ErrorMessage": "",
  "Status": "FAILED",
  "ResponseCode": "P304",
  "ResponseMessage": "InvalidPaymentType",
  "UniqueReferenceId": "47"
}
Endpoint
https://extapi.mrlender.com/v2.0/account/addcard
Request
{
  "AccountRef": 12345678,
  "EmailAddress": "[email protected]",
  "CustomerName": null,
  "CardNumber": "4444333322221111",
  "CVV": "123",
  "ExpiryMonth": 12,
  "ExpiryYear": 22
}
Success Response
{
  "Status": "SUCCESS",
  "ResponseCode": "S100",
  "ResponseMessage": "Success",
  "UniqueReferenceId": "45"
}
Error Response
{
  "Status": "FAILED",
  "ResponseCode": "A201",
  "ResponseMessage": "Applicant Not Found",
  "UniqueReferenceId": "47"
}