Setting up your Callback URL

Overview

Your server should expect a POST request from Lean made to the Callback URL you gave us. After your user gives you access to their bank entity, Lean will send a request to that callback informing you of the result and giving you the necessary information to proceed.

This happends after one of your users has used your application to connect their bank using the Link SDK we provide to you.

Success example

{
"status": {
"code": "200",
"message": "Success, here's everything you need to retrieve your user's information"
},
"data": {
"entity": {
"entity_uuid": "f08fb010-878f-407a-9ac2-a7840fb56185",
"app_user_id": "00001",
"permissions": [
"transactions",
"balance",
"identity",
"accounts"
],
"bank_details": {
"name": "Lean Mockbank 1",
"bank_identifier": "LEANMB1",
"logo_url": "https://www.leantech.me/mb1logo.png",
"primary_color": "#183F3F"
}
}
}
}

Failure example

{
"status": {
"code": "401",
"message": "The username or password submitted was incorrect"
},
"data": null
}

Request Body

status - Information about the status of your request

FieldDescription
codeWhat is the status code of the authorization, 200 is a success and 401 is a fail.
messageDescription of the status, this is more useful when there is a failure where it's used to give you more detail.

data/entity - Information about the entity created

FieldDescription
entity_uuidIf successful, the identifier you will use with data calls to refer to your user’s bank account.
app_user_idFor your convenience, we’ll also pass the id your application uses to reference the user
permissionsThe permissions your user granted to you

data/bank_details - Information about the bank in which your user's entity exists.

FieldDescription
nameThe name of the bank where your user's entity and accounts exist.
bank_identifierHow Lean internally refers to the bank. Can be used with the upcoming /bank endpoint
logo_urlA URL pointing to an image of the bank's logo.
primary_colorThe HEX value of the primary color the bank uses. For display purposes.

Now that you have the entity_uuid — the identifier to your user’s bank entity — let’s start making some data calls.


Last updated on