Backend Development 11 min read

Payment Business Architecture: Process Decomposition, Sequence Design, and Structural Modeling

The article outlines the payment business background, breaks down the payment process into modular components, presents sequence diagrams and structural designs, summarizes key technical considerations, and additionally promotes a ChatGPT community and related services.

Top Architect
Top Architect
Top Architect
Payment Business Architecture: Process Decomposition, Sequence Design, and Structural Modeling

In the business context, payment-related functions are common and can be challenging for inexperienced developers due to the risk of reconciliation errors and high remediation costs.

The article analyzes the payment scenario, highlighting technical details such as transaction management, asynchronous processing, retry mechanisms, and locking.

1. Business Background

Payment processes involve complex business rules, lengthy workflows, and third‑party integrations, requiring careful handling of account balances, transaction records, payment gateway interactions, and order structures.

2. Payment Business

2.1 Process Decomposition

The payment workflow is divided into four core modules:

Account Management – handling available, frozen, and billed amounts.

Transaction Flow – recording all financial actions, including recharge, withdrawal, and refunds.

Payment Integration – logging requests and messages to third‑party payment platforms.

Order Structure – managing order models, split strategies, and product specifications.

2.2 Sequence Design

The payment lifecycle is split into three stages:

Pre‑payment – create order, validate inventory, freeze funds, and generate pending transaction records.

Payment Integration – send request to the third‑party gateway, record parameters, and await notification.

Post‑payment – upon success, update transaction records, release frozen funds, adjust inventory, and finalize order status.

2.3 Structural Design

A reference data model includes:

Account Management – core dimensions: total amount, available balance, frozen amount.

Transaction Records – storing user actions, possibly with multiple transaction details.

Transaction Details – handling split orders and distributing funds to different merchants.

Payment Integration – persisting request parameters and callback payloads.

Order Records – supporting multiple sub‑orders with various split strategies.

Order Details – capturing product, specification, buyer/seller, price, quantity, and amount.

3. Associated Business

Beyond core payment logic, related domains such as product management, inventory, logistics, and coupon rules must be considered.

Product Management

Product Entity – maintaining product attributes, specifications, and pricing tiers.

Warehouse Management – validating stock, freezing inventory, and handling shipment after payment.

Coupon Rules

Coupon Entity – supporting discount, threshold, tiered pricing, and validity constraints.

Distribution Rules – enabling marketing activities, user lifecycle management, and channel conversion.

4. Practical Summary

Business Model – clear understanding, modular decomposition, and sequence/structure design.

Transaction Management – use TCC (Try‑Confirm‑Cancel) pattern for reliable transactions.

Locking & Retry – lock order identifiers during asynchronous updates to avoid duplicate processing.

Fund Settlement – ensure precise monetary calculations to pass reconciliation checks.

Process Maintenance – provide visual workflow tools and manual maintenance mechanisms.

The article concludes that complex business scenarios require iterative refinement, with a focus on core logic and progressive implementation.

Promotional Content

The author also promotes a ChatGPT community and related services, offering free ChatGPT accounts, tutorials, and membership benefits, along with various pricing and discount details.

backend architectureoperationspaymentTransaction Managementbusiness process
Top Architect
Written by

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.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.