Use a computer

For full performance and fluidity, please open Pay Engineers on a desktop or laptop. On mobile, the experience is limited — especially authenticated sections and advanced tools after login.

Architectures

Software architecture patterns for payment systems, from simple monoliths well suited to early-stage platforms to event-driven and CQRS patterns needed at high transaction volume. The right pattern depends less on company size than on transaction volume, team topology and how strict your audit and replay requirements are.

Use in configurator

Monolithic

A single deployable application handling all payment platform responsibilities, including onboarding, transaction processing, reporting and admin, in one codebase and one deployment unit. It remains the right starting point for the vast majority of early-stage PSPs and fintech MVPs, where the overhead of distributed systems would slow down product discovery far more than it would help.

Advantages

Simplest possible operational model with one deployment, one database and one set of logs to reason about; fastest path to a working MVP; no distributed-systems complexity such as network partitions or eventual consistency to design around; easier to refactor internal boundaries before they are set in stone across service contracts.

Limitations

Harder to scale independent teams as headcount grows, since everyone works in the same codebase and deployment pipeline; a bug or resource spike in one module can affect the whole application's availability; eventually becomes harder to reason about as feature surface area grows without internal modularity.

Use cases

Early-stage PSPs and fintech MVPs; single-team products validating product-market fit; internal tools where operational simplicity outweighs independent scalability.

Microservices

Independent, separately deployable services organized around business domains such as onboarding, payments, ledger and notifications, which can be built, deployed and scaled by different teams on independent timelines. This pattern earns its complexity once transaction volume, team size or regulatory isolation requirements outgrow what a single deployable application can comfortably support.

Advantages

Independent scaling of hot paths such as transaction processing without over-provisioning the whole platform; teams can own, deploy and release services autonomously; failure isolation limits the blast radius of a single incident; easier to adopt different technologies per service where justified.

Limitations

Distributed systems complexity, including network latency, partial failures and eventual consistency, must be designed for explicitly; requires mature observability, service discovery and deployment tooling to operate safely; can slow down cross-service features that require coordinated changes across multiple teams.

Use cases

High-volume payment processors with multiple engineering teams; platforms needing independent scaling of specific domains such as fraud scoring or notifications; organizations with strict service-level isolation requirements for compliance.

Event Driven

An architecture where services communicate primarily through asynchronous events rather than direct synchronous calls, decoupling producers from consumers in time and deployment. Payment platforms lean heavily on this pattern because a transaction's lifecycle naturally produces a sequence of discrete, auditable events, such as authorized, captured, settled and refunded, that other systems need to react to independently.

Advantages

Naturally resilient to downstream outages since events can be queued and processed once a consumer recovers; produces a rich, replayable history of what happened and when, which is valuable for audits; decouples producing and consuming teams, letting them evolve independently; scales well for fan-out notification patterns.

Limitations

Requires careful event schema governance to avoid breaking changes between producers and consumers; debugging a business process spread across multiple asynchronous handlers is harder than following a single synchronous call stack; eventual consistency must be explicitly designed for and communicated to stakeholders.

Use cases

Transaction lifecycle pipelines covering authorize, capture, settle and refund; webhook fan-out to merchant systems; audit-trail generation and downstream analytics feeds.

Serverless

Managed, event-triggered functions and services where the cloud provider handles scaling, patching and infrastructure management, letting teams focus purely on business logic for individual, often short-lived tasks. It suits spiky, unpredictable payment workloads, such as webhook bursts around sales events, far better than provisioning a fixed fleet of servers to handle peak load year-round.

Advantages

No server management overhead since the provider handles scaling, patching and availability; pay-per-invocation pricing fits spiky workloads well, avoiding the cost of idle always-on capacity; fast to deploy small, focused pieces of logic; scales automatically with demand without manual intervention.

Limitations

Cold-start latency can be a problem for latency-sensitive payment paths, though provider improvements have narrowed this; vendor-specific runtime limits on execution duration, memory and concurrency require design around them; harder to run complex local development and integration testing environments; can become costly at very high, sustained volume compared to reserved capacity.

Use cases

Spiky webhook processing during sales events; scheduled reconciliation and reporting jobs; lightweight API endpoints with unpredictable traffic patterns.

Hexagonal

Also known as ports and adapters, this pattern isolates core business logic from external concerns such as databases, payment processors and message queues behind explicit interfaces, so any external dependency can be swapped without touching business rules. For a platform that integrates with multiple acquirers or processors, this isolation is what makes adding a new one a contained, low-risk change rather than a scattered rewrite.

Advantages

Swapping or adding a new payment processor, acquirer or database becomes a contained change behind a stable interface; core business logic can be unit tested without spinning up real infrastructure; reduces coupling between domain rules and any specific vendor's API quirks; improves long-term testability significantly.

Limitations

More upfront design effort to define the right ports and adapters before writing business logic; can feel like over-engineering for very small, single-processor integrations; requires discipline across the team to keep adapters thin and business logic out of the infrastructure layer.

Use cases

Multi-acquirer and multi-processor integration layers; platforms that need to support swapping vendors such as KYC providers or card networks with minimal core changes.

Clean Architecture

A layered, domain-centric design that places business rules at the center of the application, with frameworks, databases and UI treated as replaceable outer layers that depend inward, never the reverse. Long-lived PSP platforms benefit most from this discipline because the framework and database choices made in year one are rarely the same ones still in use by year five.

Advantages

Business rules remain isolated from framework and infrastructure churn, extending the useful life of the core logic well beyond any single technology choice; strong testability since domain logic has no dependency on databases or frameworks; clear separation of concerns makes onboarding new engineers to a specific layer faster.

Limitations

Meaningful learning curve for teams unfamiliar with dependency-inversion-heavy designs; introduces more files, interfaces and indirection than a straightforward framework-centric approach; can slow down very early-stage development where requirements are still highly uncertain.

Use cases

Long-lived PSP platforms expected to survive multiple framework or database migrations; core transaction engines with complex, evolving business rules.

Domain Driven Design

Domain Driven Design focuses on modeling software around the actual business domain, using bounded contexts such as onboarding, underwriting, settlement and dispute management, and a shared language between engineers and domain experts including compliance officers, risk analysts and finance. It is less a specific technical pattern and more a discipline for keeping complex payment domains aligned between what the business means and what the code expresses.

Advantages

Aligns technical models directly with regulatory and financial concepts, reducing costly misunderstandings between engineering and compliance or risk teams; bounded contexts provide natural seams for splitting a monolith into services later; shared ubiquitous language improves communication across cross-functional teams.

Limitations

Requires meaningful access to domain experts in compliance, risk and finance throughout the project, which not every team has readily available; can be over-applied to genuinely simple subdomains, adding ceremony without proportional benefit; takes time for engineers to build the domain fluency the approach depends on.

Use cases

Complex payment domains spanning underwriting, settlement and dispute management; platforms undergoing a monolith-to-microservices decomposition guided by bounded contexts.

CQRS

Command Query Responsibility Segregation separates the models used to write data, such as authorizing a payment, from the models used to read it, such as rendering a merchant dashboard, allowing each side to be optimized and often scaled independently. This is particularly valuable in payment platforms where the write path has strict consistency requirements but the read path serves reporting and dashboard traffic at a very different scale and shape.

Advantages

Read and write paths can be scaled and optimized independently, which matters when reporting or dashboard query volume dwarfs transactional write volume; enables purpose-built read models that make reporting queries fast without complicating the write-side domain model; pairs naturally with event sourcing for full auditability.

Limitations

Adds real architectural complexity and typically introduces eventual consistency between the write and read sides, which must be communicated clearly to anyone consuming the read model; requires more infrastructure such as separate read stores and synchronization pipelines than a single shared model; overkill for platforms without genuinely divergent read and write scaling needs.

Use cases

High-volume merchant reporting and analytics dashboards; platforms with read traffic that vastly exceeds write traffic; systems combining transactional accuracy with fast, flexible reporting.

Event Sourcing

Rather than storing only the current state of an account or transaction, event sourcing stores the full sequence of events that led to that state, letting the current state be rebuilt at any point by replaying the event log from the start. For ledger and compliance-critical systems, this gives an immutable, fully auditable history of every change, exactly the kind of evidence regulators and auditors ask for.

Advantages

Produces a complete, immutable audit trail by construction rather than as an afterthought, invaluable for regulatory and dispute investigations; enables rebuilding state at any historical point in time for debugging or reconciliation; pairs naturally with CQRS to derive multiple read models from the same event history.

Limitations

Storage grows continuously since events are never deleted, requiring a deliberate snapshotting or archival strategy at scale; replaying large event streams to rebuild state can become slow without snapshots; requires careful event schema versioning discipline as the system evolves over years.

Use cases

Ledger and core transaction history systems; compliance systems requiring full replayable audit trails; dispute and chargeback investigation tooling.