Rather than bombard you with our musings on why Open Banking is the future (because it is), in this post we focus on one area, payments, and show you how we built them into the Nutmeg journey.
Why build Open Banking Payments?
Open Banking, in short, helps vendors like Nutmeg to pass payment details to the user’s bank via a third-party payment initiator. This simply requires the user to log into their bank account and confirm the payment, in effect reducing the process to just a couple of taps.
Without Open Banking, customers can only make a transfer direct from their online bank account by inputting their details manually. Not only is this tedious, it leaves scope for error. And because we value a simpler user experience and faster payments at Nutmeg, Open Banking payments were an obvious development for us.
“Resilience is a feature”
Before we dive into the technical detail, let us first mention a mantra that underpins much of the work we do in the payments team: resilience is a feature.
We’re acutely aware that a payment is the crucial point at which a customer entrusts their money to us. We therefore need to reward that trust by ensuring their experience is a positive one.
In keeping with our mantra, we do the following:
- Never assume things will work. It’s only natural to focus on happy outcomes, but here we’re equally focused on the unhappy outcomes.
- Fallback where possible. If something doesn’t work, can we offer the customer an alternative way to achieve the same thing?
Happy and unhappy paths
As for Open Banking payments, there are several opportunities for so-called “unhappy paths”, as shown in the image below.
- List of banks unavailable
- Bank not listed
- Initiate transfer fails
XState is a state machine, which in their own words is “a mathematical model of computation that describes the behaviour of a system that can be in only one state at any given time.”
A “state” is a set of observable properties that control the behaviour of a component. In other words, an object that holds some information that may change over the lifetime of a component.
We found XState to be a useful tool during the planning and development phases. The model maps well to our user journey, since a user can only be in one state at any given time and can only do certain things within a specific state. For example, if the list of banks is unavailable, the user will not be given the option to submit – or even see – the form.
Using the XState visualiser, we modelled all possible outcomes when making a bank transfer as part of our planning process. Not only would this help us in the technical implementation, it’s a valuable reference point in discussions about user journey with the product and design teams.
Turning the plan into code
The process of turning the model into final code was not particularly difficult. By using a pattern XState calls async sequences allowed us to handle the happy and unhappy paths. For example, if the providers – in this case banks – are available, the state machine transitions to the CAPTURE_PAYMENT_INTENT state, through which the user can fill in and submit the form.
If the providers are not available, we transition to the MANUAL_FALLBACK state, which allows the user to still make a bank transfer, albeit a manual one
We also transition to the MANUAL_FALLBACK state whenever the submission of forms to authorise a bank transfer fail.
It is too early to say, but it is clear that the simplicity of Open Banking payments offers customers a benefit that could see this method of payment increase in popularity. In a world where products and services need to be delivered more securely, more quickly, and at a lower cost, payment initiation via Open Banking will surely have a role to play.
At Nutmeg, we’re always looking for new and novel ways to improve our systems and processes. Anyone with great ideas is welcome to bring them to our platform. And if you’re interested in joining us, you’ll find Nutmeg job vacancies on our careers page.
As with all investing, your capital is at risk. The value of your portfolio with Nutmeg can go down as well as up and you may get back less than you invest.