Open Banking Flow

This guide will show you how to integrate the Fuse open banking flow into your product. This will give you access to affordability and risk features generated by Fuse from the open banking data.

πŸ“˜

Note

This guide does not deep dive into authentication. Where an Authorization header is present, the token is an API token which should be generated as per the documentation on Authenticating with Fuse APIs.

1. Register A Webhook

Register a new webhook to receive the open_banking_report.finished event. Later, this will notify your API whenever a user's affordability and risk features are finished generating.

2. Create The User

In your back-end API, make a call to the Fuse Create User API whenever you are ready to have the user assessed by Fuse:

POST /v1/users

{
  "user": {
    "first_name": "Bob",
    "last_name": "Fellow",
    "email": "[email protected]"
  }
}

A successful call will return a Fuse User ID, which should be stored in your database:

{
  "type": "user",
  // You must store this ID!
  "id": "11111111-2222-3333-4444-555555555555",
  "email": "[email protected]",
  "first_name": "Bob",
  "last_name": "Fellow",
  "latest_open_banking_report_created_at": null
}

3. Redirect The User To The Bank Auth Process

When the user needs to be prompted to connect their bank accounts, call the Auth New Bank Connection API to start the process:

GET /v1/users/<user id>/bank_connections/new?redirect_url=<redirect url>

Where:

  • <user id> is the Fuse User ID for this user.
  • <redirect url> is a URL on your back-end API where the user should return to when their flow completes (whether successful or failure). Take care to URL encode this value.

This API call returns the following payload, containing a URL that we should redirect the user to:

{
  "bank_connection_url": "https://..."
}

Take the value of bank_connection_url property, and redirect your user to that URL.

At the competition of the flow, the user will be redirected to the redirect_url, with an extra status query parameter added that can determine if the flow was successful or not. If the value of status is success, you can now retrieve the user's open banking report.

4. Wait For The Open Banking Report

Now the user's data is being processed, show a screen to your user telling them that they are awaiting their results.

When the Fuse API calls your webhook registered above, and confirms this user's data is ready, call the Get Features API to retrieve all the features for this user:

GET /v1/users/11111111-2222-3333-4444-555555555555/features

This returns a JSON payload that can inspected and stored as needed for your use-case:

{
  "type": "list",
  "data": [
    {
      "label": "some_feature",
      "units": "count",
      "feature_type": "balance",
      "factors": [
        {
          "window": "180",
          "period": null,
          "code": "OB-BW01_180D",
          "value": 132
        },
        // More windows here...
      ],
      "type": "feature"
    },
    // And more features here...
  ]
}

5. Use The Data In Your Decisions

Now tell your user in some way that the process is complete β€”Β either by notifying your front-end/mobile app that this is data available now (eg. polling, websockets, etc) or by notifying the user to return to your product so that they can proceed with their user journey.

Your product can now use this data to make decisions on a user's affordability status, and the user should continue in the normal flow of your product from here.

Next Steps