Differences between retail and corporate integrations

The integration to use retail and corporate data has some small differences

Application dashboard

You will be able to use the same Lean account, environments and app tokens for both your retail and corporate integrations. You can check our Get set up guide to see how to create a new application.

Creating an entity

The entity creation is detailed in our Creating an entity guide. The only difference between retail and corporate is the value of account_type that is used in the connect() method when asking the customer to connect a bank account. For the case of corporate accounts, account_type=BUSINESS and retail accounts account_type=PERSONAL.

<button onClick={connectAccount([customer_id])}>Connect Account</button>

<script>
function connectAccount = (customer_id) => {
    Lean.connect({
        app_token: "YOUR_APP_TOKEN",
        customer_id: customer_id,
        permissions: [
          "identity","accounts","balance","transactions", "identities", 
          "scheduled_payments", "standing_orders", "direct_debits", "beneficiaries"
        ],
        sandbox: true,
      	fail_redirect_url: "",
      	success_redirect_url: "",
      	access_from: "2023-03-07T09:33:30.477Z", //optional
      	access_to: "2023-06-07T09:33:30.477Z", //optional
      	account_type: "BUSINESS" | "PERSONAL"
    })
}
</script>

Accessing raw data

The data retrieval process, data APIs and fields are the same for both retail and corporate accounts. Please review the guide Fetching data.