Recurring Users
Skip the second Bank Login
Skip the second Bank Login by adding external user data to a Data Session. Once a user completes one authentication flow, you can retrieve all past data for that specific user via the Ivy API.
How it works
- Create a Data Session with one of the parameters within the
externalUser
object set. You can set one ofreferenceId
,email
,phone
, ormetadata
, depending on which you use to identify the user internally.
Parameter | Type | Description |
---|---|---|
email | String | Optional. The email of the user. |
referenceId | String | Optional. A referenceId for the user. This could be e.g., your internal id for the user. |
phone | String | Optional. The phone number of the user. |
metadata | Object | Random key-value pairs which will be stored to the external user. |
Example Request Payload
{
"referenceId": "123456789",
"permissions": ["identity"],
"market": "DE",
"externalUser": {
"email": "[email protected]",
"phone": "+49123456789",
"metadata": {
"key1": "value1",
"key2": "value2"
}
},
"successCallbackUrl": "https://example.com/callback/success",
"errorCallbackUrl": "https://example.com/callback/error",
"resultCallbackUrl": "https://example.com/callback/result",
}
After the user completed the data session flow, you can retrieve a list of completed data sessions by this exact user by calling the List Data Sessions Endpoint using one of the values from the externalUser
object:
Example Request Payload with the externalUserEmail
parameter:
externalUserEmail
parameter:{
"externalUserEmail": "[email protected]"
}
As a response, you will receive all dataSessions
as a list that match this externalUserEmail
. You can always only query with one parameter at a time. Otherwise, the request will be invalid.
Example Response Payload
{
"dataSessions": [
{
"id": "abcdef1234567890",
"referenceId": "123456789",
"status": "complete",
"data": {
"bankName": "Example Bank",
"identity": {
"name": "John Doe",
"dateOfBirth": "1980-01-01"
},
"accounts": [
{
"name": "Example Account",
"identifier": {
"iban": {
"iban": "DE12345678901234567890",
"bban": "345678901234567890",
"bic": "EXAMPLEBANK"
}
},
"type": "checking"
}
]
}
},
{
"id": "abcdef1234567123",
"referenceId": "123456123",
"status": "complete",
"data": {
"bankName": "Example Bank",
"identity": {
"name": "Doe John",
"dateOfBirth": "1980-04-01"
},
"accounts": [
{
"name": "Example Account",
"identifier": {
"iban": {
"iban": "DE12345678901234561234",
"bban": "345678901234561234",
"bic": "EXAMPLEBANK"
}
},
"type": "saving"
}
]
}
}
]
}
Updated 5 months ago