I don’t think I’ve ever underestimated the depth of a topic as much as I did with online payments. Like most people, I used to be just another customer. Unaware of what happens behind the scenes when I click that big “Pay” button. Most of the time, it just worked. Sure, the experience varied — sometimes it was seamless, and my delivery was on its way in seconds. Other times, I was redirected to a website that felt like a throwback to the days of dial-up internet, MSN and Sugababes hits. But I never gave it much thought.
That all changed when I became Product Owner of the team at Picnic responsible for this seemingly straightforward part of every online purchase: paying. I quickly realised that online payments are anything but simple. In fact, they’re incredibly complex. There’s a mind-boggling number of subtly different variations in which customers can pay, and with that, an even greater number of things that can go wrong. Countless companies are working to simplify this complexity, so customers usually don’t have to think about it. But once you pull back the curtain, the picture is very different. Let’s take a closer look at how this seemingly simple task becomes so complex, especially in the context of an online supermarket like Picnic.
A Thousand Ways Leading to Rome
Let’s start with the basics of what it means to pay in a digital store. First, there is the fun part: browsing for the items you want and adding them to your basket. When you’re done, you proceed to ‘checkout’ and choose a payment method. If you’re in the EU, you’ll typically find different Card types (Debit or Credit), PayPal and one or more local methods, like iDeal in the Netherlands.
You chose to pay with a Credit Card? Great choice! To make that transaction happen, a complex process is triggered involving multiple parties: the Merchant (in this case Picnic), an Acquiring Bank (the bank of the merchant), the Card Scheme (for example Visa or MasterCard) and an Issuing Bank (your bank). These parties must communicate and agree within milliseconds to complete the transaction.
The number of possible integrations now explodes very quickly. Typically, a single merchant has only one or two different Acquirers and there are only a handful of different Card Schemes. But on the Issuing side, the landscape is much more fragmented. In Germany alone, there are over 100 major banks. Large banks like Sparkassen have hundreds of local branches, each with their own infrastructure. This creates hundreds of thousands of possible payment flows in a country. And that’s just one payment method! More often than not, there are even more parties involved. For example, there might be a Payment Gateway that helps the merchant accept online payments, a party that supports safely storing Credit Card info, or an extra layer simplifying the whole flow on the customer side (like Apple Pay). While these additional parties simplify part of the processes, they also add even more layers of integration that need to be managed.
And remember, we’ve only discussed the initial step — agreeing to make a payment. All these systems also need to handle actions like taking money, issuing refunds, or cancelling transactions. With millions of possible configurations, there are countless ways things can go wrong.
Fortunately, there are companies whose sole mission is to tame this beast of complexity. Or well taming it… mostly mitigating it. They are doing such a great job that in most cases a customer will not experience any problems with payments at all. The thing is: payments is not a game about ‘most cases’. It’s a game about ‘every case’, especially for a company like Picnic that is handling millions of transactions. Even small percentages quickly turn into large absolute numbers and there is hardly anything more annoying for both the merchant and the customer than having a basket full of items you want, only to be blocked by a payment failure.
Dealing with Failures
When a payment fails, it’s more than just an inconvenience for the customer — it has serious consequences for the merchant too. The most obvious is lost revenue; if a customer can’t pay, you can’t make the sale. While outages of entire payment methods are rare, they do happen. As one of the biggest users of the payment method iDeal in the Netherlands, we actually spotted multiple issues even before the payment providers or banks did themselves. Luckily, these types of problems are typically quickly resolved and many customers are able to either try again later or use a different method. To reduce the risk of failures at Picnic, we also split some of our payments traffic over different providers. In this way we can always re-route payments to try again with a different party, adding yet another layer of complexity.
Another complicating factor: third parties are not the only ones in need of real-time updates on the status of the transaction, also our own systems are involved in the payment process. A glitch in the payment system can directly lead to problems in our supply chain. For example, duplicated orders (that disrupt demand forecasts) or orders that get placed without a successful payment (making it a lot harder to recover the money).
Handling Complexity At Picnic
At Picnic, there are some additional layers of complexity due to the nature of our business. As an online grocery store, we usually have to process multiple transactions for a single delivery. For example, you place an order for your weekly groceries — for which you need to make a payment — and then later decide to add toothpaste to the same delivery — another payment. When the runner comes to your door to deliver your groceries later that week, you might return some plastic bottles and give her a small tip for the great service — another payment! The runner then brings your bottles back to our hub and you receive your deposits — another payment, but this time in reverse! And if we accidentally deliver turkey instead of chicken, you can easily claim a refund through our app — once again, a payment!
Handling and executing all these relatively small, frequent transactions is not only cumbersome, but also costly. To address this we developed several ways to optimise the number of transactions, like choosing smart timing to execute a payment, combining multiple payments into one or decreasing the amount of an existing payment instead of opening a new one. In true fashion of the payments world, every market and payment method has its own set of features and rules in which these actions are possible.
As payment optimizations become more advanced, one of the key principles of software architecture becomes even more relevant: separating business concepts from technical flows is essential for building clean, scalable systems that can be easily optimised. When these concepts are too tightly coupled with technical implementations, making changes becomes complex and error-prone. Payments have a somewhat unusual position in this discussion. On one hand, they require specialised optimizations for abstract processes like authorization and settlement. On the other hand, they are closely tied to core business concepts such as placing or cancelling orders, reporting issues, or adding a tip. What’s technically feasible is often intertwined with business realities — like market regulations, product types, and delivery timing. To ensure payments systems remain clean and flexible, it’s crucial to carefully define the right business context they should operate within, while constantly challenging and refining that context for optimal performance. This is especially true for a company like Picnic, where the ability to quickly test and iterate on different approaches is crucial for staying competitive.
Optimising and modularizing a system can further increase complexity, making it harder to understand and manage. To simplify transactions for both our customers and ourselves, we’re developing the Picnic wallet. This will not only allow us to reduce the number of transactions but also provide customers with a clear, easy-to-understand overview which transactions have been combined. There’s a lot more to explore about the Picnic wallet, so stay tuned for more details in an upcoming post!