🛑 This is repo longer maintained as Starling now has native rounding. The sweeper functionality is now in https://github.com/lildude/starling-sweeper 🛑
This application allows you to round-up your Starling bank transactions to the nearest £1 and transfer the delta to a savings goal.
Note: Starling now has this functionality natively. Don't set STARLING_SAVING_GOAL
if you want to use Starling's native functionality. If you set this and have Starling's setting enabled, you will end up with duplicate transfers.
It can also "sweep" the balance in your account as the time of receiving an inbound faster payment or Nostro deposit to a savings goal.
This implementation is a fork of the original work at https://github.com/billglover/starling-roundup, but targeted at Heroku. Why Heroku? Because I already use Heroku, it has a simple "click" deploy method and gives me all the web server resources and functionality I need without having to string together, and individually pay for, a ton of AWS services. This runs quite happily in the free micro dyno.
- Starling Bank triggers a webhook on each transaction.
- This webhook is configured to POST the transaction data to this application running on Heroku.
- The application checks the signature of the request, checks the transaction UID and if it's not the transaction we rounded up, rounds up the value, and sends a request back to Starling Bank to move the delta to a savings goal.
- A Starling Bank account
- A Starling Bank Developer account
- A Heroku account
-
Deploy the application to Heroku: [Snazzy button coming 🔜]
-
Add Redis to your app:
heroku addons:create heroku-redis:hobby-dev
-
Take note of the application URL, this is the webhook URL you'll need to enter on Starling.
-
Register an application with your Starling developer account.
-
Create a personal webhook using the URL returned above.
-
Make a note of the webhook secret and the personal access token.
-
Set the following configuration variables, either in the Heroku UI, or using the Heroku CLI:
STARLING_WEBHOOK_SECRET
- used to validate inbound requestsSTARLING_PERSONAL_ACCESS_TOKEN
- used to request transfers to savings goalSTARLING_SAVING_GOAL
- the identifier of the target savings goal. If not set, rounding will not occur.STARLING_SWEEP_THRESHOLD
- optional threshold, in pence, for incoming payments to trigger a sweep. If not set, sweeping will not occur.STARLING_SWEEP_SAVING_GOAL
- optional identifier of the target savings goal for sweeps. Defaults toSTARLING_SAVING_GOAL
if not set.STARLING_ACCOUNT_UID
- the identifier of the account on which you want this to run.
For example, from the CLI:
$ heroku config:set STARLING_WEBHOOK_SECRET="your-secret" STARLING_PERSONAL_ACCESS_TOKEN="your-personal-access-token" STARLING_SAVING_GOAL="your-savings-goal-id" STARLING_ACCOUNT_UID="your-account-uid"
- Save your Heroku config vars to a
.env
file:heroku config -s >.env
. Don't commit this file to your repo unless you really don't like your money. - Start the application:
heroku local
. - Send test requests to 0.0.0.0:5000 using something like curl or httpie.
Issues and pull requests are both welcome.
- Starling Roundup (for AWS) - the origin of this fork.
- Starling CoinJar