Exporting Financial Transactions for import into an accounting platform

Pieter Gheysens
Sep 2, 2018 · 4 min read

Not really a typical TFS/VSTS blog post but at least this time I used VSTS for my own benefit and to end up with a fully automated process without any manual intervention.

The beginning

About a year ago I discovered Revolut, a #fintech digital banking alternative that started in 2015 and since my early experiences I have become a big fan of their platform and how they run their business. It’s all BUT the traditional and painful banking experience we have somehow become familiar with. Finally a bank with a true “customer first” digital culture, without filling and signing a zillion of paper documents from all different parties to get started. First I used Revolut for personal banking and a few months ago I opened a business account for the private company running Techorama.

Only the unboxing makes it worthwile to order a Revolut card.

Older people sit down and ask, ‘What is it?’ but the boy asks, ‘What can I do with it?’. — Steve Jobs

Opportunities

One of the (many) interesting features of Revolut for Business is the Open API to integrate Revolut into your existing business processes. A very frustrating process in the old world (before Revolut) has been to process our credit card transactions (VISA) into our accounting system. Once a month these transactions were sent by post to my home address after which I scanned the documents to pdf files to finally send these to our accountant. Staff members of the accounting firm had to manually input every transaction into the system and validate the various currency transactions with cryptic payment messages. Not quite a smooth process to perform the full matching with the actual invoices and there was always too much delay in getting this done.

The Plan

My plan was to try the Revolut API and dump all transactions (wire transfer, top-up, credit card payments) for a specific account into a CSV file which can be automatically processed by our accounting platform Yuki.

The Solution

When doing similar proof of concepts, I like to take the challenge and use some new tools/technology. I haven’t been using Visual Studio Code a lot in the past and wanted to explore a bit more the possibilities with developing/debugging PowerShell scripts inside Visual Studio Code. PowerShell Core 6 was also on my list for exploration and after some tweaking, Visual Studio Code was configured to be my development environment for this exercise.

Visual Studio Code as editor for PowerShell Core 6 development

The API documentation is self-explanatory and it didn’t take me a lot of time to grab all transactions in PowerShell, do some account filtering and export the required details to a CSV file.

API call to fetch all accounts and transactions:

The $secureKey variable contains the Revolut Api key which can be generated from the settings in your business account.

The debugging experience for PowerShell 6 in Visual Studio Code is all what you expect.

For dumping the transaction details to a CSV file I’m using the simple Add-Content method. In the end of the script I’m sending the file as attachment to an email address with Send-MailMessage. This result file must of course map with the expected format of your accounting software to be processed automatically without any manual intervention.

Schedule Export with VSTS

Once the script was working fine, I created a build pipeline in VSTS to call my PowerShell script with a weekly trigger

Because I’m using PowerShell Core 6 which is cross-platform (Windows, macOS and Linux), I can now also choose to run my build in a Hosted Linux Preview agent pool.

Using the Linux Hosted Build Agent Pool to run PowerShell Core 6

Conclusion

This simple automation to export our financial transactions will pay off in the future and lots of manual processing will now be avoided by different parties. It’s a clear win for everyone and we won’t be playing the traditional catch-up game anymore. More time for us to focus on our core business.

Using the right tools offer so many opportunities to integrate and automate boring and repetitive manual tasks. Time is so precious for us at Techorama that we invest a lot in tasks and actions that can be automated. We have become a software company ourselves, relying on a number of critical tools to run our business. Revolut, due to its Open API, has become an important asset in our portfolio of software tools.

Into ALM

Blogging About Application Lifecycle Management with…

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store