Reconstructing Ctrip's Payment Engine: Architecture, Services, and Operational Practices

This article presents Hong Guangming's detailed overview of Ctrip's payment engine reconstruction, covering the legacy system's challenges, the new split‑service architecture, channel‑specific services, settlement reconciliation, and the multi‑layered strategies employed to achieve high availability and operational stability.

Ctrip Technology
Ctrip Technology
Ctrip Technology
Reconstructing Ctrip's Payment Engine: Architecture, Services, and Operational Practices

Hong Guangming, Development Director of Ctrip's Finance Division, introduces his work on rebuilding the company's payment backend system.

The existing payment platform, after years of growth, struggles to handle daily millions of transactions and annual trillion‑level volume, suffering from a lack of unified payment flow design, missing independent accounting, heavy reliance on stored procedures, inflexible database design, and complex mesh‑like service calls.

The redesign adopts a core concept of separating the system into two main services: a Payment Plan Service responsible for request validation, acquisition, routing, risk checks, and plan generation; and a Payment Engine Service handling plan execution, channel integration, and result notification.

Each payment channel (e.g., bank cards, third‑party providers, gift cards, wallet balance) is encapsulated in its own dedicated service.

Current payment platform architecture
Current payment platform architecture

The new overall architecture is illustrated in the following diagram.

New payment system architecture
New payment system architecture

A typical WeChat/Alipay payment flow under the new system is shown, demonstrating a simpler and clearer inter‑service call structure compared to the legacy system.

WeChat/Alipay payment flow
WeChat/Alipay payment flow

The presentation also introduces the settlement reconciliation system, which matches multi‑channel transaction and settlement data against internal accounting records, quickly identifies discrepancies, and processes nearly a hundred channel reconciliations daily, greatly enhancing operational efficiency and fund safety.

Reconciliation system
Reconciliation system

Given the high stability requirements of payment services, weekly availability metrics are presented, followed by three layers of improvement measures:

Architectural: design for high availability from the start, separate order and payment, allow multiple payment attempts per order, convert synchronous payments to asynchronous for automatic retries.

Technical: adopt distributed services, high‑availability architectures, eliminate single points of failure, improve fault tolerance.

Operational: build comprehensive monitoring and alerting, provide accurate predictive baselines for critical services, enable rapid detection and response to anomalies.

The talk concludes with a summary of the Ctrip payment engine reconstruction project.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

BackendOperationspaymentCtripreconstruction
Ctrip Technology
Written by

Ctrip Technology

Official Ctrip Technology account, sharing and discussing growth.

0 followers
Reader feedback

How this landed with the community

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.