Appearance
Third-party Payment
About 2022 wordsAbout 7 min
2026-04-07
Third-party Payment: Building Independent Payment Capabilities and Fund Channels
The core of a third-party payment system is to help enterprises establish payment channels independent of WeChat Pay and Alipay, enabling direct collection and management of user funds. In many people's perception, payment is just "the final step to complete a transaction", but in the business system, whoever controls payment controls the transaction entry. The payment system is not only a pipeline for fund flow, but also the infrastructure for user data accumulation, transaction closed-loop construction, and financial business extension.
From a product perspective, a third-party payment system is an integrated platform that combines payment gateway, account system, clearing and settlement, risk control, and merchant management. It allows enterprises to no longer rely on a single external payment channel, but to have their own payment capabilities, thereby reducing channel costs, improving transaction success rates, controlling fund flows, and laying the foundation for subsequent financial businesses (wallets, installment payments, wealth management).

Why do enterprises need to build or customize their own third-party payment systems? The most direct reason is: if you only access the scan payment of WeChat Pay and Alipay, then you are just a "channel provider", and users' payment behaviors, fund data, and transaction habits are all accumulated in the systems of WeChat Pay and Alipay, and you cannot obtain in-depth data. Moreover, the channel fees are determined by the other party, and your bargaining power is weak. Once a channel fails or policy changes, your business will be severely affected
I. Core Business Process: From User Payment to Fund Settlement
The following flowchart shows the entire process from when a user initiates payment to when funds are finally settled into the merchant's account. Each step involves multiple subsystems working together, and any problem in any link will result in payment failure. Therefore, the stability and fault tolerance of the payment system are crucial.
User selects product/service, clicks "Buy Now"
↓
System generates order, redirects to checkout page (user selects payment method: WeChat Pay/Alipay/UnionPay/Bank Card)
↓
Initiates payment request, calls enterprise's payment gateway
↓
Payment gateway intelligently selects the optimal channel based on amount, channel fees, historical success rate, user preferences, etc.
↓
System forwards payment request to selected channel (e.g., WeChat Pay) and redirects to channel's payment page
↓
User enters password/fingerprint verification on channel page to complete deduction
↓
Payment channel returns successful result (asynchronous notification + synchronous callback)
↓
Enterprise's payment system receives notification, updates order status to "Paid", and triggers subsequent processes (e.g., shipping)
↓
Funds enter enterprise's reserve account (payment institution account regulated by central bank, or third-party custody account)
↓
System triggers internal account bookkeeping: increases user consumption record, increases merchant's pending settlement amount
↓
On T+1 day (or T+0, depending on settlement cycle), clearing and settlement system automatically transfers funds to merchant's bank account
↓
Generates transaction flow and reconciliation files for merchant download and financial reconciliationKey Point: Enterprises must hold a payment license or cooperate with licensed institutions. Magicsoft provides system construction capabilities and can connect to licensed institutions (such as China UnionPay Business, LianLian Pay, Ping++, etc.). Compliance is the top priority
II. Product Architecture Overview: Seven-layer System Supporting Payment Capabilities
The following architecture diagram shows the complete layered design of the third-party payment system. Each layer solves specific domain problems, from user interaction to backend technical support, with clear hierarchical structure. This architecture also enables the system to scale horizontally, supporting tens of thousands of transactions per second.
┌─────────────────────────────────────────────────────────────────────────┐
│ Merchant/User End │
│ Checkout | Merchant Backend | User Wallet | End user interface │
├─────────────────────────────────────────────────────────────────────────┤
│ Payment Gateway Layer │
│ Routing | Protocol | Sign | Callback | Payment system portal │
├─────────────────────────────────────────────────────────────────────────┤
│ Core Transaction Layer │
│ Payment | Refund | Cancel | Query | Reconciliation | Transaction logic │
├─────────────────────────────────────────────────────────────────────────┤
│ Account and Ledger Layer │
│ User | Merchant | Platform | Reserve | Double-entry bookkeeping │
├─────────────────────────────────────────────────────────────────────────┤
│ Clearing and Settlement Layer │
│ Split | Settlement | Reconciliation | Error | Fund management │
├─────────────────────────────────────────────────────────────────────────┤
│ Security and Risk Control Layer │
│ TLS | PCI-DSS | Risk | Desensitization | Security protection │
├─────────────────────────────────────────────────────────────────────────┤
│ Magic COP + Magic Fin Base │
│Concurrency | Transactions | Consistency | Monitoring | Technical support│
└─────────────────────────────────────────────────────────────────────────┘III. Detailed Explanation of Core Function Modules
The following table provides detailed explanations of each core function module of the third-party payment system. Please note that each module is not isolated, and their interactions define the behavior of the entire payment system.
| Function Module | Core Capabilities | Technical/Product Highlights | Business Value |
|---|---|---|---|
| Payment Gateway | Access to 20+ channels including WeChat Pay, Alipay, UnionPay, Quick Bank Card, Cloud Flash Pay, Apple Pay; provides unified API to shield differences between channels | Intelligent Routing: Real-time selection of optimal channel based on amount, channel fees, historical success rate, region, user preferences. Automatic Degradation: Millisecond-level switch to backup channel when main channel fails | Payment success rate can reach over 99.5% (industry average is about 97%), channel costs reduced by 10%~20%. Failover ensures business continuity |
| Account System | Establishes virtual accounts for users, merchants, platforms, and distributors, supporting types such as balance, freeze, margin, and fees | Three-level account isolation: Main Account → Sub-account → Virtual Account. All change logs use tamper-proof records | Meets central bank's reserve fund centralized custody requirements, fund security level reaches bank level. Lays foundation for subsequent financial businesses |
| Clearing and Settlement System | Automatic transaction splitting (supports proportional, fixed amount, and mixed modes); configurable settlement cycles (T+0 real-time, T+1, weekly, monthly); automatic payment to bank cards | Split engine supports multi-level splitting. Settlement engine directly connects to banks, automatically updates account balance after payment | Financial efficiency improved by more than 10 times, labor costs reduced by 90% |
| Reconciliation System | Automatically downloads bank/channel statement files; automatically matches internal transaction records; automatically alerts differences and generates error work orders | Supports T+1 reconciliation, can also backtrack historical statements | Fund error rate is less than 0.01%, financial personnel do not need to manually verify each transaction |
| Security System | Sensitive information encryption (AES-256 for storing card numbers and ID card numbers, RSA for transmitting keys); tamper-proof; PCI-DSS Level 1 compliant | Multi-factor authentication including device fingerprint, verification code, 3D security verification, biometrics | Passes security audits, zero user fund theft records. Enhances user trust |
| Merchant Management | Merchant onboarding, qualification review, fee configuration, settlement cycle management, report download | Supports multi-level merchants (e.g., multiple sub-merchants under a large merchant, independent settlement). Provides merchant API | Rapidly expands merchant scale, monthly new merchants can reach 1000+ |
IV. Why Build or Customize a Third-party Payment System?
Many enterprises ask: Can't I just use WeChat Pay and Alipay directly? Why bother building my own payment system? The following table compares the differences between the two models, clearly showing the long-term value of building a custom payment system. Especially when the enterprise's transaction scale reaches a certain level (such as annual GMV exceeding 100 million yuan), the cost savings and business flexibility brought by building a custom payment system will be very significant.
| Comparison Dimension | Only Access WeChat Pay/Alipay (No Own System) | Build/Customize Third-party Payment System (Magicsoft Solution) |
|---|---|---|
| Channel Dependency | Fully dependent on external channels, business paralyzed when channels fail; can only passively accept channel policy changes | Multi-channel access, flexible switching, strong bargaining power. Automatic degradation when a channel fails |
| Transaction Success Rate | Affected by single channel stability, average success rate about 97% | Intelligent routing + degradation, success rate can reach over 99.5% |
| Fund Data Ownership | Transaction data is mainly accumulated in WeChat Pay/Alipay backend, cannot perform in-depth analysis | All transaction data belongs to the enterprise, can be used for user portraits, consumption behavior analysis, etc. |
| Financial Business Expansion | Cannot develop wallets, installment payments, wealth management, etc., lacks account system | Naturally scalable, wallets, credit, wealth management, insurance can be seamlessly integrated |
| Channel Cost | Standard fees are usually 0.6%~1%, almost no bargaining space | By aggregating multiple channels, lower channel fees can be obtained, annual channel fee savings of 20%~30% |
| User Stickiness | Users leave after payment, no brand perception in payment process | Can guide users to open balance accounts and wallet payments, increase repurchase rate |
💡 Real Customer Case: An e-commerce platform with annual transaction volume of 1 billion yuan, after building its own payment system, reduced the average channel fee from 0.6% to 0.4% through intelligent routing, saving 2 million yuan in annual channel fees; at the same time, the transaction success rate increased from 97% to 99.2%, recovering about 8 million yuan in lost transaction volume. With just these two items, it created an additional 10 million yuan in value in one year. Moreover, the platform later launched its own wallet and installment products based on the payment system, adding new revenue streams
V. Typical Business Scenarios
Scenario 1: E-commerce Platform Acquiring
This is the most common scenario. E-commerce platforms need to support multiple payment methods (WeChat Pay, Alipay, UnionPay, Cloud Flash Pay, Quick Bank Card Payment) and be able to automatically reconcile and settle payments to merchants on the platform (if it is a multi-merchant platform). Magicsoft's third-party payment system provides a complete acquiring solution, including checkout SDK, payment gateway, splitting system, and reconciliation system. Merchants can view transaction flows in real-time in the backend and apply for withdrawals. The platform can set different rates (e.g., 0.6% for standard merchants, 0.5% for VIP merchants). The entire process is fully automated, and financial personnel only need to handle a very small number of abnormal orders.
Scenario 2: Offline Store Scan Payment
Chain stores or retail stores need to support user scan payments (active scan: user scans store QR code; passive scan: cashier scans user payment code). Magicsoft's system can generate dynamic QR codes (refreshed every 30 seconds to prevent fraud) or static QR codes (suitable for small vendors), and supports voice broadcast of payment arrival reminders. For chain brands, the system can also implement the function of "headquarters unified collection, branch independent reconciliation", that is, all store transaction funds first enter the headquarters account, and then the system automatically splits funds to each branch account according to branch identifiers. This simplifies financial processes while facilitating unified marketing by the headquarters.
Scenario 3: Cross-border Payment
E-commerce platforms or SaaS service providers targeting overseas users need to support multi-currency collection in US dollars, euros, yen, etc., and handle complex cross-border compliance declarations. Magicsoft's payment system can access cross-border payment channels such as PayPal, Stripe, LianLian Pay, Airwallex, etc., providing multi-currency accounts and automatic currency exchange functions. The system will lock or exchange currencies immediately based on current exchange rates to reduce exchange losses. At the same time, the system supports generating statements that meet the tax requirements of various countries to help the platform complete compliance declarations.
VI. Summary of Product Advantages
The following summarizes the core advantages of the third-party payment system in concise points for quick memorization and dissemination:
- ✔ Control Fund Entry: All transactions must go through your payment system, no longer subject to a single payment institution, with complete transaction data ownership
- ✔ Improve Transaction Success Rate: Intelligent routing + fault degradation + real-time monitoring, success rate increased from industry average 97% to over 99.5%, directly recovering revenue losses
- ✔ Reduce Channel Costs: Multi-channel price comparison and intelligent routing select the lowest fee channel, annual channel fee savings of 20%~30%, which can reach millions of yuan for enterprises with annual transaction volume exceeding 100 million yuan
- ✔ Support Multi-business Expansion: The payment system is the cornerstone of financial businesses. With account system and clearing and settlement capabilities, you can seamlessly integrate products such as wallets, installment payments, wealth management, insurance, etc., upgrading the transaction platform to a financial platform
- ✔ Data Asset Accumulation: Every transaction and every payment behavior becomes the enterprise's own data, which can be used for user portraits, precise marketing, risk control, with data value far exceeding channel fee savings
One-sentence Summary: Third-party payment system = Enterprise's "fund entry control right" — not just a tool, but a business barrier. It transforms you from "renting channels" to "owning channels", and from "passively accepting rules" to "proactively setting rules"