Skip to content

Aggregate payment system

An Aggregate payment system (or 聚合支付系统) refers to a payment architecture that integrates multiple payment channels and methods into a single unified interface.^[600-developer-principle-aggregate-payment-system.md] This allows merchants and developers to manage various transactions—such as those from Alipay, WeChat Pay, and credit cards—without implementing separate APIs for each provider.

Core Value and Architecture

The primary goal of an aggregate payment system is to streamline the payment process by "connecting the two veins" (打通任督二脉) of transaction flow.^[600-developer-principle-aggregate-payment-system.md] This is often achieved by establishing a robust domain model that abstracts the complexities of different underlying payment channels.^[600-developer-principle-aggregate-payment-system.md]

Modern implementations frequently utilize a microservice architecture to ensure scalability and reliability.^[600-developer-principle-aggregate-payment-system.md]

Implementation Examples

Several open-source projects exist to demonstrate or facilitate the development of these systems:

  • xxpay: A comprehensive system available with source code on GitHub.^[600-developer-principle-aggregate-payment-system.md]
  • xpay: Another open-source initiative referenced in developer literature.^[600-developer-principle-aggregate-payment-system.md]

Advanced variations include automatic callback systems, such as Tpay, which use frameworks like Xposed to automate payment confirmations and callbacks for personal collections.^[600-developer-principle-aggregate-payment-system.md]

  • [[Microservices]]
  • [[Domain-driven design]]
  • [[Payment gateway]]

Sources

^[600-developer-principle-aggregate-payment-system.md]