Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Plaid Integration #898

Closed
2 tasks done
culpeppers opened this issue Apr 14, 2023 · 46 comments
Closed
2 tasks done

[Feature] Plaid Integration #898

culpeppers opened this issue Apr 14, 2023 · 46 comments
Labels
feature This issue is a feature request needs votes Please upvote this feature request if you would like to see it implemented!

Comments

@culpeppers
Copy link

Verified feature request does not already exist?

  • I have searched and found no existing issue

💻

  • Would you like to implement this feature?

Pitch: what problem are you trying to solve?

Integrate Plaid Account Linking into Actual. This feature would, at a minimum, pull transactions into linked accounts.

Describe your ideal solution to this problem

I was the originator of the previous Plaid integration PR. As a lot has changed with Actual since that work, I plan on starting from scratch to ensure compatibility and close integration with other development work.

  1. Create a new account and link to Plaid there, or link an existing account that has already been created.
  2. Manual sync with Plaid per account.
  3. Manual sync with Plaid for all linked accounts.
  4. Automatic sync that runs at an interval.

I am still debating how I would like to implement Client ID and Secret. Previously I was setting these in the config files, but a more user-friendly solution is preferred.

Teaching and learning

The biggest issue with Plaid sync is back-end setup. Making sure Client ID and Secret are set appropriately. Each user would need to have a specific Plaid account. Documentation on how that is done would go a long way for users.

@culpeppers culpeppers added feature This issue is a feature request needs triage labels Apr 14, 2023
@j-f1 j-f1 removed the needs triage label Apr 14, 2023
@j-f1
Copy link
Contributor

j-f1 commented Apr 14, 2023

I am still debating how I would like to implement Client ID and Secret. Previously I was setting these in the config files, but a more user-friendly solution is preferred.

Here’s the setup we have for Nordigen at the moment: https://actualbudget.github.io/docs/Installing/Configuration#nordigen

I think it would be nice to optionally load these secret values from the database and offer an option in the web app to set them, but that would be part of a different feature.

@culpeppers
Copy link
Author

Great thanks! I'm happy to borrow as much from Nordigen as possible to get this out the door, and then work on refinements afterwards.

@sslilyous
Copy link

I think this is great. With Nordigen currently being the only option, our friends in both the United States and Canada are left out on the account syncing feature.

@rich-howell rich-howell added feature This issue is a feature request and removed feature This issue is a feature request labels May 1, 2023
@github-actions github-actions bot added the needs votes Please upvote this feature request if you would like to see it implemented! label May 1, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 1, 2023

✨ Thanks for sharing your idea! ✨

This repository is now using lodash style issue management for enhancements. This means enhancement issues will now be closed instead of leaving them open. This doesn’t mean we don’t accept feature requests, though! We will consider implementing ones that receive many upvotes, and we welcome contributions for any feature requests marked as needing votes (just post a comment first so we can help you make a successful contribution).

The enhancement backlog can be found here: https://github.com/actualbudget/actual/issues?q=label%3A%22needs+votes%22+sort%3Areactions-%2B1-desc+

Don’t forget to upvote the top comment with 👍!

@jinB2021
Copy link

jinB2021 commented Jul 6, 2023

Hey All! Is there any progress on this yet? I don't mind collaborating on this feature.

@j-f1
Copy link
Contributor

j-f1 commented Jul 6, 2023

Nothing that I know of — feel free to pick the work back up!

@acorncom
Copy link

acorncom commented Aug 5, 2023

@jinB2021 https://github.com/actualbudget/actual-server/pull/191/files shows the status of the most recent Plaid work I've found so far. I'm stuck unable to use Actual without a Plaid integration given accounts I'm working with on my end, so I'm actively considering doing the Plaid integration work atm. If you're still interested in pairing up, let me know and we might be able to work on it together

@jinB2021
Copy link

jinB2021 commented Aug 5, 2023

@acorncom Yeah I would be down to pair up for the work. Would we be using that branch as the base or have you already started in a separate branch?

@seanculver
Copy link

I'm also interested in helping with this feature, I'm still new to this codebase but would be willing to try to implement this or pair on this feature.

@acorncom
Copy link

@seanculver / @jinB2021 I'm still on the fence on using Actual due to a few other items we need for our personal accounts (multi-currency is important on my end). Maybe the two of you could pair and I could keep an eye on things / drop in occasionally? I'm pretty new in the codebase myself, so not sure my involvement significantly alters how fast this work goes ... 😉

@seanculver
Copy link

@acorncom Understandable, this is a trial for me, everything that I need besides the bank sync is here for the most part. I also would like multi-currency but I've just converted my foreign bank accounts into USD for now, not ideal but for me that works as it's not my main budget.

I'm digging into how Plaid works, I've never integrated it into an existing app but was always curious about it. Here's a useful video I found from the Plaid team. https://www.youtube.com/watch?v=sGBvKDGgPjc

@jinB2021 Let me know if you are interested in Pairing sometime.

@Kidglove57
Copy link

Just curious as I am not in the US or Canada. But how would Plaid be paid for? I can’t see a facility on their website for users to pay on an individual basis and I don’t really understand how an open source project would bear the cost ? Hopefully there is an answer I have completely missed!

@youngcw
Copy link
Contributor

youngcw commented Aug 17, 2023

@Kidglove57 There is a free "developer" tier that, iirc, limits you to 100 synced accounts.

@Kidglove57
Copy link

@youngcw Thanks! I did spot that on their pricing but, say, as an example each of our users has 3 accounts, I was thinking that would not get us very far? 30 or so users.
The original dev of Actual used to talk about $500 per month minimum subscription needed for full use.

@youngcw
Copy link
Contributor

youngcw commented Aug 17, 2023

It would have to be like the current goCardless setup where you have to bring you own credentials. I setup a developer login but never got around to trying to figure it out.

@Kidglove57
Copy link

@youngcw thanks, that's helpful. It just never occurred to me that it might be possible for say 250 individual Actual users to each set up their own Dev account.

I just wanted to be sure that the Actual team are protected from any monetary liabilities.

@youngcw
Copy link
Contributor

youngcw commented Aug 17, 2023

I just wanted to be sure that the Actual team are protected from any monetary liabilities.

@Kidglove57 Firefly-III has a secondary project and container that runs the plaid integration so its not part of the main project, probably for this reason. And the user has to provide their own login. Its seems to be working fine for them so I wouldn't expect much issue.

@Kidglove57
Copy link

That's great! Thank you. I will take a other look at Firefly

@seanculver
Copy link

@youngcw Thanks for the heads up on the firefly repositories. I see there are two repositories with connectors for Firefly.

https://gitlab.com/GeorgeHahn/firefly-plaid-connector
https://github.com/dvankley/firefly-plaid-connector-2

They are both docker containers and are written in .net / java, but they might be useful as a reference.

So, now that I've started using Plaid, here's something else to think about: I watched this video earlier, and it seems you need to apply to switch your API to development mode. That's when you can start pulling real data from banks.

I've applied but I don't know how they feel about everyone applying.

@seanculver
Copy link

I stumbled across this repo as well. https://github.com/infiniteluke/actualplaid

@youngcw
Copy link
Contributor

youngcw commented Aug 17, 2023

@seanculver Interesting. I never got very far, but everything I saw seemed like all you needed was to use the development key instead of the sandbox key and you were good to go.

I think there are a few old repos that connected old actual to plaid, but I didn't dig far enough to see what all needed updated. I think that one you linked was the best one.

@seanculver
Copy link

Just to throw it in the mix, here's an interesting read on the security implications of using a service like Plaid. https://news.ycombinator.com/item?id=28228051

People in this thread certainly have strong opinions, I don't know how legitimate some of these claims are.

@Thiesjoo
Copy link

I stumbled across this repo as well. https://github.com/infiniteluke/actualplaid

I forked this repo and made "some" changes: https://github.com/Thiesjoo/actualplaid. It now works with the most recent version of Actual and Plaid! Hopefully you guys can implement this functionality inside Actual, as that would be way easier than using a CLI script.

@youngcw
Copy link
Contributor

youngcw commented Aug 23, 2023

I forked this repo and made "some" changes: https://github.com/Thiesjoo/actualplaid.

This looks pretty great so far, but it looks to be hard coded to be in the Netherlands. Could you add a env var to set the region?

@youngcw
Copy link
Contributor

youngcw commented Aug 23, 2023

@Thiesjoo Looks like you already had a env setup for the country, it just needed added to the env file. I did have to change the language, so that probably should also be an env var.

@Thiesjoo
Copy link

@Thiesjoo Looks like you already had a env setup for the country, it just needed added to the env file. I did have to change the language, so that probably should also be an env var.

Yep, repo is now updated, 2 env vars: 1 for which countries you should select your bank from, and 1 for the language of the plaid interface

@seanculver
Copy link

@Thiesjoo Thanks for this! This is a great first step. I've got it working on my local machine, I've tried it with a development account and successfully synced transactions. I made a PR for a small breaking bug that I came across.

This would be a better experience as an actual integration into the project. If the project maintainers didn't want it in there, this would be an okay alternative for a basic solution. I would want to add a few more features to make it more robust.

@Thiesjoo
Copy link

This would be a better experience as an actual integration into the project. If the project maintainers didn't want it in there, this would be an okay alternative for a basic solution. I would want to add a few more features to make it more robust.

Of course! That would be the most optimal solution. It would also be better to use the new Plaid api's with webhooks (The repo is using a deprecated API now I think). This would mean that we do not have to make api calls every day, but can just update with transactions with webhooks!

What kind of features are you thinking about? I was thinking maybe category linking based on Plaid's suggestions, but maybe Actual rules would be better for that.

@youngcw
Copy link
Contributor

youngcw commented Aug 25, 2023

@Thiesjoo what version of actual-server and the api are you using with your plaid linking? Im getting all sorts of errors that seem to be on the Actual side.

@Thiesjoo
Copy link

@Thiesjoo what version of actual-server and the api are you using with your plaid linking? Im getting all sorts of errors that seem to be on the Actual side.

I'm using the most recent version of Actual v23.8.1 and the Actual api version is defined in package.json so 6.2.1.

What kind of errors are you getting? Is your budget maybe encrypted? I have not included functionality for that.

@youngcw
Copy link
Contributor

youngcw commented Aug 26, 2023

I think my issue was that I couldn't pull the budget down via the api if I had a web page of the same budget open. If I closed the budget in any browser windows then it worked. Ill see over the next few days if things are working on the plaid side.

@culpeppers
Copy link
Author

Yeah I keep wanting to work on this but life keeps getting in the way :(

@tjfinlinson
Copy link

I know how that goes.

@youngcw
Copy link
Contributor

youngcw commented Sep 5, 2023

@Thiesjoo I put in a PR that takes care of pending transactions instead of erroring out. Pending gets marked as uncleared, then once no longer pending, cleared.

@jamesqo
Copy link

jamesqo commented Sep 9, 2023

As an end user who has a BofA account I would looove to see this feature implemented. Would be a total game changer and finally let me switch from Mint.

@amirHizkiya
Copy link

amirHizkiya commented Sep 13, 2023

Aren't there some privacy concerns with Plaid?

Is nobody worried about that?

@nickzxcv
Copy link

I think the privacy concerns would be true for all banking API aggregators. It would make a lot more sense for bank APIs to work directly with anyone having business with the bank, but doesn't sound practical according to this other comment #1661 (comment) :(

@devinellis
Copy link

FYI mint is shutting down

@amirHizkiya
Copy link

I think the privacy concerns would be true for all banking API aggregators. It would make a lot more sense for bank APIs to work directly with anyone having business with the bank, but doesn't sound practical according to this other comment #1661 (comment) :(

IDK, I think adding one of the most egregious offenders of consumer privacy to an open source project of this nature is a bad idea.
Just because we can, doesn't mean we should.

The financial data company Plaid must pay $58 million and remove large amounts of consumer data in a class action settlement after harvesting and selling users' data

Source: https://www.courthousenews.com/judge-approves-settlement-ordering-plaid-to-pay-58-million-for-selling-consumer-data/

@derekpovah
Copy link

As far as the Plaid privacy concerns go, I don't think a project should make a value judgement on behalf of its users. It seems like there is enough support for this, especially now that the Mint refugees like myself are on the hunt for a replacement.

If it's an issue for someone, they can always choose to keep the feature off.

@policeshootout
Copy link

I am looking for an alternative to Mint and hoping to use Actual. I have installed the ActualServer on my SynologyNAS in Docker for my wife and I to use. The NAS is not exposed to the internet, only accessible from LAN. I don't have a lot of experience with this stuff and was hoping somebody could help a bit.

I don't really understand the setup instructions for the Plaid integration. Since I am using Docker, actualserver was installed using container manager and the docker-compose text which I edited to my specific needs. The location of data is stored at /volume1/docker/actualbudget/actual-data:/data.

Perhaps I am too out of my element to do this?

@youngcw
Copy link
Contributor

youngcw commented Nov 5, 2023

@policeshootout if you are just starting I recommend you try using csv/ofx import or manual entry to start. It does take at least a few days to get plaid syncing setup since you need to get approved by plaid for developer access. Once you have access it's not too bad to setup, but you have to manually setup connections and accounts.

@youngcw
Copy link
Contributor

youngcw commented Nov 6, 2023

Discord channel for plaid sync https://discord.com/channels/937901803608096828/1171096337111064626

@Bryce-MW
Copy link

Bryce-MW commented Dec 4, 2023

I was looking at the Plaid docs because I was thinking of writing my own program to fetch data from Plaid and I noticed an interesting API called enhance that can take some basic info about a transaction (most of which Actual stores), and get back data that is cleaned up a lot from the usually messy payee that banks provide: https://plaid.com/docs/enrich/ Since Plaid's transaction sync only allows a maximum of 24 months of history, this might be useful to people like myself who are interested in historical data. I'll make a follow-up if I end up using it

In order to use it even in the development environment, you must sign up for production access. In the development environment you only get 1000 transactions total. For production, the cost is $4 per 1000 transactions.

This was referenced Jan 7, 2024
@aescgar
Copy link

aescgar commented Jan 17, 2024

None of the Discord links posted on any of these issue threads have worked for me (says no text channel or I don't have access), so I haven't been able to follow all the discussion but do have a question. @Bryce-MW pointed out that Plaid requires payment for the "enrich" feature. However, for normal transaction syncing into Actual, am I right that this could be done for free up to 100 financial institutions (each user generates their own tokens)?

(Also, @youngcw @tjfinlinson, any way for me to get access to follow the Discord conversation since the link is posted publicly, or no?)

@Bryce-MW
Copy link

@aescgar The Discord is public but maybe you have to join before it works. Link should be https://discord.gg/pRYNYr4W5A

Yes you can get data through Plaid for free. It requires a bit of setup and Actual doesn't support it yet (there's some code in there that could be used as a starting point if anyone actually wants to implement it). I think an easier temporary solution would be to use a Python program that connects to Plaid and outputs an OFX.

I did try that but I found out that it didn't really do what I had hoped and I can't even test Enrich on real data without signing an agreement which I don't want to do right now. I have learned many interesting and many frustrating things about getting the best quality data. I even tried using ChatGPT to improve the quality of my data (which sort of worked but not well). I have a few more things that I want to try but my life has been busy. For now, I just have a lot of rules…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue is a feature request needs votes Please upvote this feature request if you would like to see it implemented!
Projects
None yet
Development

No branches or pull requests