This repo is responsible for moving money between your transactional Investec account and desired Savings/Loan account. The primary goal is keeping the money in your transactional account at a minimum and money in your savings/loan account at a maximum. At the same time, you want to be able to transact freely from your transactional account.
Please note: It is probably a good idea to have some independent mechanism for understand your budgeting / spending amount, as this approach might mask your balances a bit by moving money around.
The underlying process is a script that runs every hour. The script will make sure that money is sitting in the correct accounts. The logic is as follows:
- Income goes into your transactional account
- Script moves that money into your desired savings/loan account
- You make a payment
- Script determines whether to move money back into your transactional account
based on the following parameters
- Minimum amount of money you want to keep in your transactional account (MIN_BALANCE)
- Available credit facility (FACILITY)
- Make sure that you have programmable banking access enabled with Investec.
- Go to the following link and add an Oauth app.
- Create an Individual connection and you can specify what accounts you want to connect to. (I.e. your credentials are safe to your accounts)
- This will give you your Client ID, Secret & API Key.
- Get your desired Transactional Account number & Savings Account number
To get this running on a serverless function at an hourly interval, simply click the button below. (You will need to have a GitHub account & Netlify account). The half-hourly process for a full month should still be well within Netlify's free tier.
- Clone the repo
npm install
- Once you have that, you need to create a
.env
file in the root of the project, with the following:
INVESTEC_CLIENT_ID=XXX
INVESTEC_SECRET=XXX
INVESTEC_API_KEY=XXX
TRANSACTIONAL_ACCOUNT_NUMBER=XXX
SAVINGS_ACCOUNT_NUMBER=XXX
FACILITY=XXX
MIN_BALANCE=0
npm run moneyMover