How we built PayMe from HSBC – our social payment app on the Cloud

Published: 01 July 2020

Alessio Basso explains how adopting a microservices-based architecture was critical to the design of the app’s technology infrastructure.

More than two million people in Hong Kong use PayMe from HSBC to exchange money for free within their personal network. The bank now also operates the PayMe for Business app that completes 98 percent of all transactions in 500 milliseconds or less, and allows merchants to leverage powerful, built-in intelligence to improve their customer interactions and operations.

But since I’m a technologist, I want to focus on how we enabled more and more new banking services on the Cloud to enable us to organise data more efficiently, analyse it to understand our customers better and make more core customer journeys and features available on a mobile-first basis.

The first decision we made when designing the technology infrastructure was to use managed services in the Cloud, like Platform as a Service (PaaS) or Software as a Service or SaaS, to go from ideation to a fully operational service in just a few months. Critical to our approach was adopting a microservices-based architecture that used many native services.

We designed each microservice to be independent, using its own dedicated logical instance of any service it depended on, including for the database, data streaming, storage, credentials and secrets management - the tools and methods we use to manage digital authentication credentials like passwords, for example.

We architected for this level of isolation to both strengthen security as well as increase overall application uptime because it eliminated shared dependencies.

Since each microservice provided one or just a few independent features to be consumed by our mobile apps, we could elastically scale compute resources based on the demand for specific features. We made extensive use of caching, as well as creating read replica databases to offload read-only and analytical queries without impacting payment transaction response times.

Also, from a security perspective, we could manage PaaS services as if they were deployed in our own Virtual Network, via Service Endpoints. We used Network Security groups to control the traffic internally in our network, a firewall to control the external traffic and ensuring only the services that needed to communicate with each other were allowed to do so.

At its core, PayMe from HSBC is a social app that allows consumers to establish their personal networks while facilitating interactions and transactions with the people within their circle and business entities. We model those transaction relationships as a graph and apply Machine Learning (ML) models on the data to enrich the user experience.

Massive amounts of structured and unstructured data flow from our transactional databases and event-streaming sources to be transformed and processed in near-real time. We designed and developed internally a data ingestion and processing framework to feed an analytical model we refer to as SLIM (simple, lightly integrated model), optimised to perform analytics queries as well as making data virtually available to the analytics platform.

The way we built our ML capabilities allows for quick identification of pattern and relationships in our data, as well as anomalous/fraudulent activity.

We would not have been able to build a complex social payments network – as well as a closed-loop online and an offline business platform – so quickly if it wasn’t for the Cloud.

You can watch for yourself how HSBC architected our cashless digital transaction platform.

Join us