Experimental feed of transactions from Revolut.
This project is OBSOLETE. Crunch implemented their own transaction feed via Open Banking API, which is compatible with Revolut.
-
Clone this repo
git clone git@github.com:softwareventures/revolut-feed.git&&cd revolut-feed
. -
Install dependencies:
yarn
. -
Copy example .env file:
cp .env.example .env
. -
Create ssl keys:
openssl genrsa -out privatekey.pem openssl req -new -x509 -days 1825 -key privatekey.pem \ -out publickey.cer -subj '/CN=softwareventures.co.uk'
-
In
.env
, fill inSSL_PRIVATE_PATH
with the path toprivatekey.pem
. -
Go to
https://business.revolut.com/settings/api
and setup the api app. Copy the contents of the filepublickey.cer
for theX509 public key
field and enterhttp://127.0.0.1
as the redirect URL. -
On the next page, copy the client_id and paste it in the .env file.
-
If working in production, add your IP or IP range to the Production IP whitelist.
-
Click on the
Enable API access to your account
button and give access to our app. This will redirect you localhost. Copy the access code in the url. It will be in the url param calledcode
. -
Run the program with
yarn start
and paste the code into the terminal
Now the app is authenticated and will run!
Outputs the current version.
The debug argument will run the script using the sandbox subdomain. This is used for development and testing.
This flag specifies the path to the output csv. This can be used to customise the csv filename when generated. This needs to be a valid path on your system. This defaults to revolut-feed.csv
.
A date with the format yyyy-mm-dd
to filter transactions starting from this date.
A date with the format yyyy-mm-dd
to filter transactions to this date. This defaults to now
which will be today's date.
-
There is currently no way to refresh api access after the 90 days is up. If you are not authenticating after 90's days after the initial setup, delete
access_token.json
and repeat the final two steps -
Time needs to be in-sync with internet time or authentication will fail due to the usage of ssl keys to authenticate.