Building a Modern Payment Processing Platform: Architecture and Design Decisions

Today, we’ll switch gears into high-level software architecture and explore the architecture behind a cloud-native payment processing platform. I’ll share design decisions and technical approaches we’ve used to handle diverse payment methods, from traditional cards to cryptocurrencies.

Payment infrastructure is complex. What begins as a simple card processing system inevitably grows to encompass multiple payment methods, regulatory requirements, and intricate integrations. The key challenge lies in building an architecture that’s both robust and adaptable.

I’ll break down our approach to addressing these challenges, covering core payment flows, API design, and infrastructure considerations. While this post focuses on online payments, the architectural patterns apply to many financial processing systems.

Breaking It Down

We'll take a practical approach to exploring this architecture by starting with the business fundamentals. Understanding different payment flows and how money moves through the system will guide our API design choices and ultimately shape the platform architecture we'll need.

Throughout this post, we'll cover:

  1. How different payment methods work: from cards and bank transfers to mobile money and crypto
  2. The APIs that make it all accessible, including security considerations and webhook patterns
  3. The nuts and bolts of the platform architecture, including how we handle PCI compliance
  4. Additional capabilities like merchant onboarding and analytics that build on top of this foundation

1. Payment Flows

Overview

The PaymentIntent is the core object representing a payment. Each intent follows a create-then-confirm flow, similar to patterns used by Stripe and Adyen. This aligns with well-known patterns, reducing integration friction for developers familiar with existing payment systems.

This section covers five payment flows: