---
updatedAt: 2026-01-29T14:36:02.000Z
agentTools:
  projectIndex: https://docs.leantech.me/llms.txt
---

# Migrating from Legacy Payments to Account-on-File

This guide outlines a hybrid migration approach for clients transitioning from RE-based connect/pay flows to Open Finance Account-on-File (AoF) payments, ensuring a seamless user experience throughout the transition.

## Routing by bank connection type

Lean recommends maintaining a single bank selection layer and routing users based on the connection type returned for each bank.

Use Lean's built-in bank selection screen, or
Build and host your own custom bank selection interface.

If you prefer to implement a custom bank selection screen please follow this [guide](create-your-own-bank-list). Call `GET /banks` to retrieve the complete list of available banks and render your bank picker UI using this data.

Each bank in the response includes a connection type identifier:

* `reverse_engineering` - Legacy RE connection - on the Link SDK use. the `connect`and `pay` functions
* `open_finance` - Open Finance connection - use the `authoriseConsent` function

Using your custom bank selection screen implement the following logic:

* RE bank selected → Execute existing RE connect flow
* Open Finance bank selected → Execute AoF authorisation flow

<br />

<br />

<br />

<br />

<br />