Skip to content

Files

Latest commit

ff1617a · Apr 10, 2024

History

History

example

Nordigen Ruby example app with Ruby on Rails

Set-up


You'll need to get your SECRET_ID and SECRET_KEY from the GoCardless Bank Account Data portal. In app.py file provide the token as a parameter for NordigenClient.

# Init Nordigen client
# In services/ directory you can modify secret_id & secret_key or store the values in .env file
client = Nordigen::NordigenClient.new(
    secret_id: ENV["SECRET_ID"],
    secret_key: ENV["SECRET_KEY"]
)

To initialize session with a bank, you have to specify country (a two-letter country code) and your redirect_uri. In controllers/home_controller.rb directory, modify country value.

country = 'LV'

In agreements.controller.rb modify your redirect_uri value.

redirect_url = "http://localhost:3000/results/"

Installation


Install dependencies

bundle install

Start Rails app

rails s

Below is an example of the authentication process with Revolut.

1. Go to http://localhost:3000/ and select bank

2. Provide consent

3. Sign into bank (Institution)

4. Select accounts

5. You will be redirected to specified redirect_uri in our case it is http://localhost:5000/ where details, balances and transactions will be returned from your bank account.