Inside a Modern Payment Platform: Architecture, Core Systems & Service Governance
This article walks through the complete architecture of a payment platform, detailing the transaction and payment cores, their interactions, service governance, data consistency, DB sharding, asynchronous processing, performance testing, and practical production practices for building robust backend payment systems.
1. Payment System Overview
Payment is the core of any transaction‑driven company. The overall architecture can be seen as two major subsystems: the transaction core and the payment core. The transaction core links business scenarios with underlying payment channels, while the payment core abstracts various payment operations such as recharge, withdrawal, refund and transfer, and integrates multiple payment providers.
Core System Interaction
Business Map
2. Core System Details
Transaction Core
The transaction core connects business systems with underlying payment channels, allowing business services to focus on domain logic without dealing with payment details.
Transaction Core Diagram
Basic Transaction Type Abstraction
Multi‑Table Aggregation & Order Association
Payment Core
The payment core abstracts four payment forms— 充值 (recharge), 提现 (withdrawal), 退款 (refund) and 转账 (transfer)—and is responsible for integrating multiple payment tools and orchestrating payment commands.
Payment Core Overview
Payment Behavior Orchestration
Its goal is to enable plug‑in development and configurable payment rules.
Exception Handling
Handles scenarios such as duplicate payments, partial payments, amount mismatches and other anomalies.
Channel Gateway
Fund Management
3. Service Governance
Platform Unified Context
After defining system boundaries and business modeling, the platform is split into dozens of services. A unique business identifier is propagated across the entire payment flow to prevent information loss.
Data Consistency Governance
Large payment companies often use heavyweight distributed transactions to guarantee data consistency. For businesses that avoid distributed transactions, alternative strategies such as CAS checks, idempotency and compensating actions are discussed.
CAS Validation
Idempotency & Compensation
Reconciliation
Near‑Real‑Time Reconciliation
DB Sharding
Asynchronization
Asynchronization improves stability and throughput for payment operations.
Message Asynchronization
External Payment Call Asynchronization
Asynchronous Parallelism
Fund Accounting Asynchronization
Hot Account Separate Processing
Accounting Transaction Segmentation
4. Production Practices
Performance Stress Testing
Build stress‑test models that simulate real scenarios, route test data to shadow databases, and evaluate both single‑node and centralized link performance to identify system stability and capacity limits.
Stability Governance
Core Link Separation
Service Degradation
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Top Architect
Top Architect focuses on sharing practical architecture knowledge, covering enterprise, system, website, large‑scale distributed, and high‑availability architectures, plus architecture adjustments using internet technologies. We welcome idea‑driven, sharing‑oriented architects to exchange and learn together.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
