Payments14 min read

WeChat Pay Partner & Alipay ISV Integration Guide: How SaaS & POS Platforms Scale Multi-Merchant Payments in China (2026)

TL;DR

Multi-tenant SaaS platforms, POS software vendors, and franchise retail systems operating in China cannot legally collect funds into a central account and redistribute them to sub-merchants. Instead, platforms must integrate WeChat Pay Partner Mode (sp_mchid + sub_mchid) and Alipay ISV Proxy Mode (Third-Party App + app_auth_token). Under this architecture, 100% of consumer funds settle directly into each merchant venue's bank account with zero custody liability for the SaaS platform, while the platform earns official transaction rebates and automates unified POS barcode scanning, refunds, T+1 reconciliation, and e-Fapiao tax receipts.

Executive Summary: Why SaaS & POS Platforms Cannot Use Standard Merchant Accounts

When global software providers—such as restaurant POS systems, hotel property management platforms, retail ERPs, or fitness booking SaaS—expand into China or build solutions for multi-venue brands, payment integration is the first major architectural hurdle.

In Western markets, platforms routinely plug in Stripe Connect, Adyen for Platforms, or Square to onboard sub-merchants and route payouts. In China, where WeChat Pay and Alipay account for over 92% of all in-store and digital consumer transactions, international card rails simply do not work for local commerce.

Even more critically, international software teams often make two costly architectural mistakes when approaching Chinese payments:

  1. Mistake #1: Asking Every Client Venue to Integrate Direct Mode Individually: In Direct Merchant Mode (直连模式), every individual restaurant, retail store, or hotel must generate its own cryptographic keys, deploy SSL certificates, and maintain dedicated webhook servers. Scaling this across 50 or 500 client locations creates an operational nightmare.
  2. Mistake #2: Aggregating Funds into the SaaS Platform's Own Account: Under the People's Bank of China (PBOC) Announcement No. 217, any software platform without a Chinese Payment Business License that collects consumer funds into its own corporate account and later settles them to sub-merchants commits Unlicensed Secondary Clearing ("Erqing" / 二清). This triggers immediate account freezes and regulatory penalties.

The Compliant Solution: Official Partner & ISV Architecture

To enable multi-tenant payments legally and at scale, both Tencent and Ant Group provide dedicated platform architectures:

  • WeChat Pay Partner Mode (服务商模式 / 合作伙伴模式)
  • Alipay ISV Third-Party Application Proxy Mode (支付宝 ISV 第三方应用代调用模式)

Under this dual-rail architecture, your SaaS platform maintains one centralized cryptographic identity, onboards new merchant locations in minutes without touching their API certificates, routes 100% of consumer payments directly into each merchant's own bank account, and earns official commission rebates or automated revenue-sharing splits on every transaction.

(Note: If you are a single brand registered outside China looking to sell directly to Chinese consumers and settle in USD/EUR/GBP without a Chinese entity, read our WeChat Pay Cross-Border Integration Guide instead.)


How Multi-Tenant Partner & ISV Architecture Works

In a compliant multi-tenant payment gateway, information flows through your SaaS platform, while money flows directly from the payment network to the merchant venue:

┌─────────────────────────────────────────────────────────────────────────┐
│                    1. CONSUMER CHECKOUT CHANNELS                        │
│  [ POS Barcode Scanner ]   [ Dynamic Table QR ]   [ Mini Program / Web ]│
└───────────────────────────────────┬─────────────────────────────────────┘
                                    │  Unified Payment Request
                                    ▼
┌─────────────────────────────────────────────────────────────────────────┐
│                2. YOUR MULTI-TENant SAAS / POS GATEWAY                  │
│  • Single Cryptographic Identity (1 Partner Cert + 1 ISV Private Key)   │
│  • Tenant Routing Engine (Maps Venue ID ──► sub_mchid / app_auth_token) │
│  • Unified State Machine (Auto-Polling, Safe Reversal, Webhook Engine)  │
└─────────────────┬───────────────────────────────────┬───────────────────┘
                  │                                   │
     WeChat Pay Partner API                Alipay ISV OpenAPI
     (sp_mchid + sub_mchid)            (ISV app_id + app_auth_token)
                  │                                   │
                  ▼                                   ▼
┌─────────────────────────────────┐ ┌─────────────────────────────────────┐
│     3A. WECHAT PAY CLEARING     │ │       3B. ALIPAY CLEARING           │
│  • Direct Settlement (T+1)      │ │  • Direct Settlement (Real-time/T+1)│
│  • Partner Commission Tracking  │ │  • ISV Rebate Tracking (PID)        │
└─────────────────┬───────────────┘ └─────────────────┬───────────────────┘
                  │                                   │
                  └─────────────────┬─────────────────┘
                                    │  100% Direct Fund Settlement
                                    ▼
┌─────────────────────────────────────────────────────────────────────────┐
│             4. SUB-MERCHANT VENUE BANK / ALIPAY ACCOUNTS                │
│     [ Restaurant Venue A ]     [ Retail Store B ]     [ Hotel C ]       │
│     (SaaS platform never custodies merchant funds — 100% PBOC compliant)│
└─────────────────────────────────────────────────────────────────────────┘

Three Core Pillars of the Partner / ISV Model

  1. Zero Funds Custody (100% Regulatory Compliance): When a guest pays ¥500 RMB at a restaurant or retail checkout, the funds clear inside WeChat Pay or Alipay and settle directly into that specific venue's designated bank or merchant account. Because your SaaS platform never touches the settlement pool, you operate completely outside financial licensing restrictions.
  2. Centralized Security, Zero Venue Key Management: Your engineering team manages a single set of platform credentials. Individual store managers never have to generate RSA key pairs, download PEM certificates, or configure server URLs.
  3. Instant Multi-Tenant Onboarding: Adding a 100th merchant venue requires zero code deployments. A store owner simply binds their Sub-Merchant ID (sub_mchid) for WeChat Pay and scans an OAuth authorization QR code once to grant a permanent token (app_auth_token) for Alipay.

Direct Merchant Mode vs. SaaS Partner / ISV Mode

For CTOs and product leaders evaluating how to structure their China payment layer, here is how standard single-merchant integration compares against multi-tenant Partner/ISV architecture:

Evaluation Dimension Direct Merchant Mode (直连模式) SaaS Partner & ISV Mode (服务商 / ISV 模式)
Best Suited For Single-brand standalone websites or apps with 1 legal entity POS systems, SaaS platforms, franchises, and multi-venue groups
API Key & Certificate Management Must deploy and rotate separate API certificates for every single merchant entity Single platform certificate signs API requests across thousands of sub-merchants
New Merchant Onboarding Effort Days of manual technical configuration per venue Minutes — scan an OAuth QR code (Alipay) or bind a 10-digit ID (WeChat Pay)
PBOC Compliance ("Second-Tier Clearing") Illegal if a platform collects funds for multiple legal entities under 1 account 100% Compliant — licensed clearing engines settle directly to each sub-merchant
Platform Monetization Cannot natively split transaction fees or earn channel rebates Built-in ISV Commission Rebates + official Profit Sharing API (up to 30% split)
Standard Merchant Processing Fee 0.60% standard rate 0.20% – 0.60% (Partners can apply for discounted industry tiers for sub-merchants)

WeChat Pay Partner Mode vs. Alipay ISV Mode: Architectural Comparison

While both ecosystems achieve the same commercial goal, their underlying onboarding workflows and transaction rules differ significantly. Your unified payment gateway must bridge these seven structural differences behind a clean internal API:

Architectural Dimension WeChat Pay Partner Mode (微信支付服务商) Alipay ISV Mode (支付宝 ISV 第三方代调用)
Platform Identity Partner Merchant ID (sp_mchid) + Partner AppID (sp_appid) ISV Application ID (app_id) + 16-digit Partner PID (sys_service_provider_id)
Sub-Merchant Routing Credential 10-digit Sub-Merchant ID (sub_mchid) bound under the Partner console 40-character OAuth Token (app_auth_token) granted via one-time QR scan
Currency Unit Precision Integer Cents (Fen / 分) — e.g., 8800 represents ¥88.00 RMB Decimal Yuan String (Yuan / 元) — e.g., "88.00" RMB
POS Barcode Prefix Rules 18 digits starting with 10, 11, 12, 13, 14, 15 16–24 digits starting with 25, 26, 27, 28, 29, 30
Platform Rebate Mechanism Automatic based on sp_mchid parent-child binding Requires passing sys_service_provider_id in order extension parameters
Refund Authorization Requires explicit Partner API Refund Authorization confirmed by sub-merchant Included automatically within standard OAuth payment scopes
Testing Environment Live 0.01 RMB micro-transactions (no realistic multi-tenant sandbox) Full OpenAPI Sandbox + live 0.01 RMB production verification

Omnichannel Checkout Scenarios Every Retail & Hospitality System Needs

A production-ready China payment gateway must support both physical counter hardware and mobile digital touchpoints through a single unified order ledger.

1. In-Store POS Counter: Cashier Scans Guest ("B-Scan-C" Barcode Pay)

In high-volume restaurants, bars, coffee shops, and retail stores, B-Scan-C (付款码支付 / 当面付条码支付) is the fastest checkout method. The guest opens WeChat or Alipay to display their dynamic payment barcode, and the cashier scans it with a handheld laser scanner or desktop barcode box.

Unified Single-Scanner Auto-Routing:
Cashiers should never waste time clicking "WeChat Pay" or "Alipay" on the POS screen before scanning. Because WeChat Pay barcodes strictly begin with prefixes 10–15 (18 digits) and Alipay barcodes begin with 25–30 (16–24 digits) or fp (for Alipay SmilePay facial recognition), a well-architected POS gateway inspects the scanned string and routes the transaction to the correct payment rail automatically in milliseconds.

  • Frictionless Small-Ticket Deduction: For transactions below the user's risk threshold (typically under ¥1,000 RMB), payment completes in under 1 second without requiring a PIN.
  • High-Value PIN Challenge: For larger bills or risk-flagged accounts, the payment gateway returns an "In-Process / User Paying" status while the guest's phone prompts for their 6-digit password or Face ID.

2. Customer Display & Printed Check: Guest Scans Venue ("C-Scan-B" Dynamic QR)

When a POS terminal features a customer-facing secondary screen—or when a server brings a printed bill to a dining table—the system generates an order-specific Dynamic QR Code (Native 支付 / 当面付预下单).

  • The QR code locks the exact bill amount and expires automatically after a configurable window (typically 2 to 5 minutes) to prevent stale payments.
  • Once the guest scans and confirms payment on their phone, an encrypted webhook notifies your SaaS backend within 1 second, automatically closing the table check on the POS terminal and printing the receipt.

3. Table QR Ordering & Mini Program Checkout (In-App JSAPI)

Across Chinese hospitality and retail, Scan-to-Order at the Table (扫码点餐) is standard practice. Guests scan a static table QR code using either WeChat or Alipay, browse the digital menu inside a branded Mini Program or mobile web view, and pay directly inside the app.

  • Because the payment happens natively inside the WeChat or Alipay web container, conversion rates exceed 95%.
  • Using WeChat Pay Gold Plan (点金计划), your platform can customize the post-payment digital voucher screen—embedding branded loyalty prompts or a one-tap button to request an official tax invoice (e-Fapiao).

4. Mobile & Desktop Web Checkout (H5 & PC Web)

For hotel room reservations, event ticketing, or e-commerce storefronts accessed via external browsers like mobile Safari or desktop Chrome, the gateway dynamically serves either a Mobile App-Jump Link (H5 Pay) that wakes up the local WeChat/Alipay app or an Embedded Desktop QR Cashier.


Platform Monetization: How SaaS Providers Earn Revenue

Operating as an official WeChat Pay Partner and Alipay ISV unlocks two compliant revenue streams on top of your standard SaaS subscription fees:

  1. Official Channel Commission Rebates (服务商返佣): Both WeChat Pay and Alipay reward certified technology providers for bringing transaction volume onto their networks. While the sub-merchant pays the standard processing fee (e.g., 0.38% – 0.60%), the payment network rebates a basis-point margin (typically 0.05% – 0.20% depending on industry tier and monthly volume) directly to your Partner/ISV corporate account each month.
  2. Automated Profit Sharing (分账 API): If your business model charges a per-order transaction fee, marketplace commission, or delivery split, both platforms offer native Profit Sharing APIs. When a consumer pays ¥100 RMB, the funds remain frozen briefly in the clearing engine; your backend instructs WeChat Pay or Alipay to route ¥95 RMB to the merchant venue and ¥5 RMB to your platform account (up to 30% of the transaction total without special manual approval).

4 Production Traps That Break Foreign SaaS Integrations (And How We Solve Them)

Many international engineering teams attempt to build China payment integrations by translating official API docs with AI tools—only to encounter severe financial discrepancies in production. Here are the four critical edge cases every architecture must handle:

Trap 1: The "Pending Password" (USERPAYING) Cashier Freeze

When a guest pays a large dining or retail bill via POS barcode scan, the initial API response does not return "Success"—it returns USERPAYING (WeChat) or 10003 (Alipay) while the guest enters their password on their phone.

  • The Failure Mode: Naive POS integrations treat any non-instant response as a failure, prompting the cashier to scan the guest's phone a second time—resulting in double charges, furious customers, and manual accounting nightmares.
  • The Engineering Solution: We implement an automated asynchronous state machine. When USERPAYING is detected, the POS UI locks the order into an active 3-second polling loop for up to 45 seconds. If the guest abandons payment or times out, the gateway automatically fires an encrypted Reverse / Cancel API call to void the lock and guarantee zero phantom charges.

Trap 2: Unconfirmed Sub-Merchant Refund Permissions

In WeChat Pay Partner Mode, being authorized to collect payments for a sub-merchant (sub_mchid) does not automatically grant permission to issue refunds on their behalf.

  • The Failure Mode: A venue goes live, processes thousands of dollars in sales, and when a manager clicks "Refund" on the POS terminal, every request fails with NO_AUTH.
  • The Engineering Solution: Our onboarding workflow enforces a pre-flight authorization check that guides the venue administrator to confirm Partner API Refund Authorization (服务商API退款授权) before the terminal is allowed to switch into live production mode, paired with idempotent refund retry logic that prevents accidental double-refunds during network hiccups.

Trap 3: Alipay ISV Routing & Missing Rebate Tags

In Alipay's documentation, developers frequently confuse "Indirect Bank Acquiring" (sub_merchant parameter) with "ISV Third-Party Proxy Mode" (app_auth_token).

  • The Failure Mode: Passing the wrong sub-merchant field causes immediate transaction rejection, while forgetting to inject your 16-digit ISV Partner PID (sys_service_provider_id) inside the order extension payload means Alipay processes the payments but credits your SaaS platform $0 in monthly commission rebates.
  • The Engineering Solution: Our unified gateway middleware automatically injects verified OAuth routing headers and rebate tracking identifiers on every transaction.

Trap 4: T+1 Financial Reconciliation & e-Fapiao (Electronic Tax Invoices)

In China, corporate diners and business travelers require an official government electronic tax invoice (e-Fapiao / 全面数字化的电子发票) for expense reimbursement, and finance teams require daily cent-level settlement matching.

  • The Engineering Solution:
    • Automated T+1 Bill Reconciliation: Every morning at 10:00 AM (GMT+8), our reconciliation worker downloads the official trade and fund-flow CSV statements from both WeChat Pay and Alipay, verifies cryptographic SHA-1 file digests, normalizes currency units, and flags any discrepancy against your internal POS database.
    • Seamless e-Fapiao Integration: Once an order reaches PAID status, the system automatically prints a "Scan for e-Fapiao (扫码开票)" QR code on the paper POS receipt (or embeds a one-tap invoicing button on the mobile payment completion screen), connecting directly to Chinese tax bureaus (via Aisino / Baiwang / Digital Tax APIs) so guests generate their own VAT invoices in 10 seconds without bothering store staff.

The 4-Stage Implementation Roadmap (3–4 Weeks to Production)

Whether we are building a standalone payment microservice for your existing SaaS platform or developing a custom POS and Mini Program suite from scratch, our delivery follows a battle-tested four-stage schedule:

[ Week 1 ]  Stage 1: Partner/ISV Qualification & Multi-Tenant Architecture Design
[ Week 2 ]  Stage 2: Unified Dual-Rail Gateway & POS/Web State Machine Engineering
[ Week 3 ]  Stage 3: OAuth Onboarding Portal, T+1 Reconciliation & e-Fapiao Linkage
[ Week 4 ]  Stage 4: Live 0.01 RMB End-to-End Verification & Pilot Venue Rollout
  1. Stage 1: Architecture & Credential Setup (Week 1): We review your platform's multi-tenant data model, configure your WeChat Pay Partner (sp_mchid) and Alipay ISV (app_id) consoles, and design a clean REST/Webhook contract for your core engineering team.
  2. Stage 2: Core Payment & State Machine Engineering (Week 2): Implementation of unified B-Scan-C barcode auto-routing, C-Scan-B dynamic QR generation, Mini Program/H5 checkout, and the automated USERPAYING polling and reversal engine.
  3. Stage 3: Onboarding, Refunds & Tax Automation (Week 3): Building the one-scan sub-merchant OAuth onboarding flow, idempotent partial/full refund pipelines, automated T+1 statement reconciliation, and optional e-Fapiao tax receipt integration.
  4. Stage 4: Live Production Verification & Go-Live (Week 4): End-to-end production testing using controlled 0.01 RMB live micro-transactions across iOS, Android, and physical POS scanners—verifying payment deduction, webhook delivery, T+1 settlement routing, and instant refund return before opening to your first pilot venues.

Frequently Asked Questions (FAQ)

Does a SaaS or POS platform need a Chinese financial payment license to support multiple merchants?

No. As long as your platform integrates via official WeChat Pay Partner Mode and Alipay ISV Mode, consumer funds are cleared by Tencent and Ant Group and settled 100% directly into each sub-merchant's bank account. Because your software platform never takes custody of merchant funds, you do not need a payment license and remain fully compliant with PBOC regulations.

Can an overseas SaaS company integrate WeChat Pay Partner and Alipay ISV modes, or do we need a local entity?

If your SaaS platform serves brick-and-mortar venues inside mainland China (such as restaurants, hotels, or retail stores with Chinese business licenses), the onshore Partner/ISV model is the standard architecture—and can be operated either through your China subsidiary (WFOE) or via an authorized onshore technology partner. If your platform serves overseas merchants (in the US, Europe, UK, Australia, or Asia) accepting payments from Chinese tourists or cross-border shoppers, both WeChat Pay and Alipay offer Overseas Institutional Partner / ISV Programs that settle in local foreign currencies (see our WeChat Pay Cross-Border Guide).

How quickly can we onboard a new restaurant or retail store once the gateway is built?

Once the unified gateway is deployed, onboarding a new merchant location takes less than 10 minutes of technical setup. For Alipay, the store owner simply scans your platform's OAuth 2.0 QR code with their main merchant Alipay account to grant an instant app_auth_token. For WeChat Pay, you bind their 10-digit Sub-Merchant ID (sub_mchid) in your Partner Console and confirm refund authorization. Zero certificate files or code changes are required per store.

Can our POS scanner automatically detect whether a customer is showing a WeChat Pay or Alipay code?

Yes. Every dynamic payment barcode generated by a customer's phone follows strict numbering standards: WeChat Pay codes are 18-digit numbers beginning with 10 through 15, while Alipay payment codes are 16-to-24-digit numbers beginning with 25 through 30. Our gateway inspects the scanned string automatically and routes the charge to the matching payment rail in real time.

How does our SaaS platform collect fees or commissions from sub-merchants?

You have three compliant ways to monetize: (1) Charge standard SaaS software subscriptions; (2) Receive monthly official channel rebates (服务商返佣) directly from WeChat Pay and Alipay based on total payment volume processed through your Partner/ISV credentials; and (3) Use the native Profit Sharing API (分账) to automatically split a percentage of each transaction (up to 30% by default) into your platform account at settlement.

How do refunds work if a customer cancels part of an order?

Both WeChat Pay Partner Mode and Alipay ISV Mode support full and partial refunds (up to 50 partial refunds per order) within 365 days of the original transaction. Refunded amounts are deducted from the specific sub-merchant's unsettled daily balance (or available account balance) and returned directly to the customer's original payment wallet within seconds.

Can we connect WeChat Pay and Alipay orders to China's electronic tax invoice (e-Fapiao) system?

Yes. We implement two proven patterns: (1) Receipt & Web QR Invoicing, where the printed POS check or post-payment mobile screen displays a unique QR code that lets the guest submit their corporate tax title and receive an automated PDF/OFD e-Fapiao via certified tax providers (Aisino or Baiwang); and (2) Native Digital Wallet Invoicing, which pushes the issued e-Fapiao directly into the user's WeChat Card Pack (微信卡包) or Alipay Invoice Butler (支付宝发票管家).


How WeChatDev Pro Accelerates Your SaaS or Enterprise POS Rollout

Engineering a financial-grade, multi-tenant China payment gateway from scratch—while navigating Chinese-only API specifications, hybrid V2/V3 cryptographic protocols, POS hardware state machines, and PBOC compliance rules—routinely costs internal product teams 4 to 6 months of trial and error.

At WeChatDev Pro, we have already solved every edge case in production. We help global SaaS companies, POS vendors, hospitality platforms, and multi-location brands launch rock-solid China payment infrastructure in weeks, not months:

  • Turn-Key Unified Payment Microservice: We architect and deliver a clean, drop-in multi-tenant gateway service (Node.js/TypeScript, Go, Java, or Python) that exposes a single Stripe-like REST API to your core engineering team while handling all WeChat Pay Partner and Alipay ISV cryptography under the hood.
  • Complete Handoff & Engineering Blueprints: Need your in-house team to maintain the code? We provide comprehensive English architectural specifications, multi-tenant database schemas, state-machine diagrams, and hands-on engineering support.
  • End-to-End Ecosystem Integration: Beyond payments, we build companion WeChat & Alipay Mini Programs (table ordering, loyalty memberships, booking engines) and automated e-Fapiao tax invoicing pipelines.

Schedule a free architectural consultation with our team to discuss your platform requirements and get a tailored integration roadmap.

Building a POS, SaaS, or multi-venue payment system for China?

Cross-border payment integration is included in our Standard and Premium packages. Let us handle the complexity so you can focus on your business.

Schedule a Free Consultation