Skip to content

Add Enable Banking Data Provider#1122

Merged
JC5 merged 11 commits intofirefly-iii:developfrom
barreeeiroo:enable-banking
Jan 25, 2026
Merged

Add Enable Banking Data Provider#1122
JC5 merged 11 commits intofirefly-iii:developfrom
barreeeiroo:enable-banking

Conversation

@barreeeiroo
Copy link
Contributor

This PR fixes issue firefly-iii/firefly-iii#10753

Added Enable Banking as supported provider in Data Importer


Disclaimer: Generative AI has been used for this contribution (my PHP is a bit rusty). All guidance, decisions, revisions, and validation are human-made.

@barreeeiroo barreeeiroo marked this pull request as ready for review January 24, 2026 21:01
@barreeeiroo barreeeiroo requested review from JC5 and SDx3 as code owners January 24, 2026 21:01
@barreeeiroo
Copy link
Contributor Author

This PR is ready for review. I didn't test many edge cases, but the simple E2E flow works. It has been based on Nordigen/GoCardless, except for how the bank list works: EB requires to pre-select a country to show it. However, the benefit is that we know beforehand for how many days the credentials are valid.

For users:

  1. Go to https://enablebanking.com/, and create an account
  2. Create a new app, and connect your bank accounts from their portal first
    1. This is the most important step to avail for the "free own accounts" plan. You will only be able to access the accounts which you have previously linked here, without going to a paid one.
  3. For the redirect URLs, set https://<DATA_IMPORTER_URL>/eb-callback (Production access require HTTPS; Sandbox are good with HTTP)
  4. You will get a Client ID and a PEM File; we will need them later.

That's all in Enable Banking website. You will see the app as "Restricted": this is expected as per Step 2. Restricted means it's limited to pre-authorized accounts.

Now, let's do the Data Importer:

  1. Go to Data Importer, and authenticate for Enable Banking
  2. Specify the Client ID, and upload the PEM file. An alternative is to open the PEM file with a text editor, and past it into the environment variables.
  3. Select a country, and then the bank name to import.
  4. You will be redirect to Enable Banking to authorize, and then to the bank platform to authorize.
  5. You will be sent back to Data Importer to finalize the import.

If, between Steps 4 and 5, you do not receive any bank account, it is because it has not been authorized in the Step 2 of the Enable Banking step. EB will NOT return bank accounts in Restricted mode which have not been previously authorized.

@JC5
Copy link
Member

JC5 commented Jan 24, 2026

Very nice, thanks for the hard work!

I'll spend some time tomorrow nitpicking the code first, and then I'll try to get it running. I'll leave some comments left and right and then it can be merged into the develop branch.

Thanks again!

Cheers,
James

@barreeeiroo
Copy link
Contributor Author

Some example screenshots for the journey:

image

(Mocked data for Sandbox)

image

Firefly III Data Importer

image image image image image image image

@barreeeiroo
Copy link
Contributor Author

You're welcome @JC5! Feel free to ping back if you face any issues. I've just posted a couple of screenshots for the "happy path journey".

The only callout is that, for some reason, receiving the activation email from EB takes a couple of minutes, like 5-10 took me. After that, creating the apps in Restricted mode is quite straightforward.

Once this PR is ready to go, I'll raise a different one for the documentation, as users need to be aware about the "pre-linking" requirement for own accounts.

@JC5
Copy link
Member

JC5 commented Jan 25, 2026

In app/Services/Shared/Conversion/CreatesAccounts.php on rule 73+, you need to add an if statement for the Enable Banking account class, something like this:

use App\Services\EnableBanking\Model\Account as EnableBankingAccount;

// ...

if ($entry instanceof EnableBankingAccount) {
                return $entry->getUid() === $importServiceId;
            }

@JC5
Copy link
Member

JC5 commented Jan 25, 2026

In file app/Services/Shared/Model/ImportServiceAccount.php, you need a little routine to convert the Enable Banking account to an array. See line 146 and up.

@barreeeiroo
Copy link
Contributor Author

In app/Services/Shared/Conversion/CreatesAccounts.php on rule 73+, you need to add an if statement for the Enable Banking account class, something like this:

use App\Services\EnableBanking\Model\Account as EnableBankingAccount;

// ...

if ($entry instanceof EnableBankingAccount) {
                return $entry->getUid() === $importServiceId;
            }

Ah, I was going crazy why I was getting a 500 when creating accounts lol. I thought it was an existing bug in the Data Importer, but makes sense.

@barreeeiroo barreeeiroo requested a review from JC5 January 25, 2026 13:16
@JC5
Copy link
Member

JC5 commented Jan 25, 2026

Nice work! I see two points, but this is something I / you can pick up after the merge:

  • config/enablebanking.php needs this exact option as well.
  • I could not get the data importer to map data, despite indicating I want to map data.

Other than that, ready for the develop branch.

Expect some code cleanup / formatting commits while I play around with your code.

@JC5 JC5 merged commit b5bfceb into firefly-iii:develop Jan 25, 2026
1 check passed
@barreeeiroo
Copy link
Contributor Author

No problem @JC5! If you are going to do minor changes already, I'll let you take care of the unique_column_options field in config, just to not create a PR with 3 lines lol.

I'll send you the PR for the documentation in a few minutes though.

@JC5
Copy link
Member

JC5 commented Jan 25, 2026

Yeah that sounds good, I'll pick that up.

Thanks again for the work, this looks really good!

@pettersandvand
Copy link

@JC5 When will a new release of the data importer be published, including this functionality? Really looking forward to use it. Great work!

@JC5
Copy link
Member

JC5 commented Feb 2, 2026

Thanks, but mainly thanks to @barreeeiroo!

I hope to promote this after I have finished firefly-iii/firefly-iii#11544.

@joskfg
Copy link

joskfg commented Feb 2, 2026

I'm trying the develop image and there is an issue when trying to execute import:import the enum that idnicates the available banks is not including "eb", so it fails to load the config. I don't know if this is expected and it will be done in another PR or it was expected to work with this one.

Thanks!

@JC5
Copy link
Member

JC5 commented Feb 3, 2026

Come on, you can't just ask for support like this in a closed PR. I'm locking this one. If you need help, start a discussion. This is messy, don't do this.

@firefly-iii firefly-iii locked and limited conversation to collaborators Feb 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants