Hire developers Community Blog Find a dev job Log in
Close menu
Tech insights: Programmable Banking Community: How To Save On Your Mortgage Interest
Less noise, more data. Get the biggest data report on software developer careers in South Africa.

Programmable Banking Community: How To Save On Your Mortgage Interest

17 August 2022, by Nick Benson

Members of the Programmable Banking community got together to demo their Transfer API solutions for the Q4 2021 Investec Programmable Banking hackathon. Here Peter Thompson walks us through his and colleague Tiaan van der Merwe‘s Home Loan Interest Saver, which helps homeowners save interest paid on their home loans.

Transcript of the demo

Peter Thompson 0:00

Okay, cool. Basically, it was myself and my colleague Tiaan who developed this, but he couldn’t make the call tonight, unfortunately. And this was basically his idea.

The Problem To Be Solved

He was always going on about his dad who managed to knock off four years from his home loan because he’d always put his salary straight into his home loan account and then transfer what he needed for debit orders. And I know Tiaan has been doing this manually.

So, every month on the 25th, he was kind of transferring the bulk of his salary to the home loan and then transferring it back. Because basically, you get, I don’t know, four or five days that you’re not paying as much interest. And yeah I did the quick math; it’s, I think, 1 400 days where you’re paying less interest, not obviously no interest or anything. And I’m not exactly sure what the calculations are, because obviously it scales depending on your salary, and the size of your home loan, and all of that.

But, yeah, you’re definitely able to knock off some time. And I guess, pay less interest in total, which is great.

How to works

I guess I just want to give one disclaimer. We mostly work with on-prem systems, and I’ve never really done anything on Azure before, or AWS or anything. I thought this was a good opportunity to go the serverless route.

And I think 90% of my time just went on figuring out how to use key vaults and deploying a function, but the actual code was the quick and dirty part. So, bear with me if there’s anything that isn’t quite right.

Everything is basically an Azure function that we deploy, and the whole CIC pipeline is set up. You basically push to GitLab and that pushes to Azure. And this is scheduled to run daily, I think at five in the morning. And the basic idea is that you pull your balance from your transactional account and your balance from your home loan account. And you pull all the transactions, or you basically pull your statement for that day. And then I guess the neat part is you can look for transactions which you expect. So, there are these two functions. I think the one is called a Large Deposit Checker. And you can basically parse in the list of regular expressions.


Basically, what it comes down to, is you can parse in, if you know what your statement, or your salary, looks like, on your account, if you’re getting rental income or investment income regularly or even irregularly. But if you know what it looks like, you can kind of set up a list of custom regular expressions that will kind of just flag true to say that the type of income that you expect to have come in, that you’d want to contribute to a home loan temporarily, came in, that would just flag as true. And then there’s also just a checker to see what your available balance is.

And basically, you then transfer an amount across to your home loan depending on how much money you want to have in your account.

Available new transactional accounts at any stage and then another amount, just specifying how much you want in your account for the first, so if there’s any debit orders you’re servicing or anything like that, you can at least have money available. Zoom is saying my connection is unstable. Am I still there?

Nick Benson 3:37

Yeah, you’re still here. You came back up.

Peter 3:41

Cool. I hope I didn’t miss anything. So that’s basically the gist of it. We tried this out on Tiaan’s account, too. And we set it up all today for him. We originally set it up on my account. And it was a pretty effortless process to set it up. I think it took us half an hour. And again, most of the time was just clicking all this stuff on Azure. I have the function running here.

I guess another disclaimer is I don’t have a home loan, but I have a savings account. We can run it and it should transfer some money into my home loan account. I’ve just kind of put a low threshold, so I know that there should be some money to transfer. I guess, let’s see what happens.

I’m not sure how familiar everyone is with serverless functions, but I’ve been struggling with the log sometimes. I see things going through, but the logs don’t appear. I don’t know if that’s something that’s just happening to me.

Basically, there we go. Get an access token. Get a statement, to check for large deposits. Get the home loan balance. Transfer should happen. Well, I don’t know, the logs aren’t displaying it, but yeah in theory, the transfer happens. And I have validated that. I guess I could also show my app. But that’s not maybe that informative, but there is money being transferred. I can hear my phone buzzing. But that’s basically the gist of it.

If anyone has questions, and I documented my struggles with setting everything up on Azure, which is probably very familiar to most people on this call, but it was just kind of something valuable for me to refer back to. Now, so if there’s any questions.

Community Questions

Nick 5:52

Thank you, Peter. That was pretty cool. I really love the part where you documented the challenges, helping other people. That was really cool. Thanks.

Peter 6:03

Sure. I just wanted to mention, I think you asked earlier if there’s any feature requests, and I was wondering, maybe I missed something, but is there a place for us to get your overdraft from because I think it was Russell who posted the solution for checking for your pending transaction? I put an MR Open that. Just take that into account. I kind of hardcoded my overdraft facility and that’s something I’d probably like to pull in automatically from somewhere. I was wondering if that’s available and that’s something obvious that I kind of want to fix and test and all those kinds of standard things as well.

Hennie Spies 6:50

So that’s currently not available. There’s your running balance and your available balances, the only thing that’s coming through on the account stuff. But like I mentioned to Russell, I think it’s definitely something that we need to address.

Russell Knight 7:12

I also hardcoded my credit limit, Peter.

Peter 7:15

Because it’s just that I realised in what I submitted, I didn’t take the pending transactions into account when I was transferring money across and I kind of added that logic in now but I’m kind of hard coding my credit limit, which I guess is fine, but…

Russell 7:31

I’ve just made mine a parameter that can be maintained.

Hennie 7:39

I think from a feedback perspective, I really like the real-world application; that’s very sweet. I think probably that the one thing that I would say is potentially creating some kind of UI where you can manage those parameters and so for instance, add as opposed to going through the deployment cycle to change those parameters, i.e., regular expressions or the minimum balance, etc., just to make it easier for you, the consumer, etc. Just to play around with it a bit. But overall friggin awesome. And I think like Nick was saying, just that ploughing back into the community, from your learnings, etc. I think it’s a struggle that every new guy is going through. So, sweet.

Peter 8:33

Cool, thanks.

Nick 8:34

Thank you, Peter.


Get involved in the Programmable Banking Community.

If you have questions or just want to say hi to the Programmable Banking Community core team, you can pop us a mail, and we will get back to you.

If you want to see more from what the community has been up to, you can:


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Subscribe to our blog

Don’t miss out on cool content. Every week we add new content to our blog, subscribe now.

By subscribing you consent to receive OfferZen’s newsletter and agree to our Privacy Policy and use of cookies.