Skip to main content

Choosing an Integration Option

We typically recommend one of two approaches, depending on how much control and customization you need.

Option 1: Direct integration with Alipay and WeChat Pay​

In this setup, your team integrates the Alipay SDK and WeChat Pay SDK directly into your app and backend.

This option is usually suitable if:

  • You require custom or non-standard payment workflows
  • You need deep control over payment logic or provider-specific features
  • Your system has special requirements around order handling or payment states

Things to consider:

  • Two separate SDK and API integrations
  • Higher development and long-term maintenance effort
  • Transaction logging and reconciliation must be handled in your own system

Option 2: Integration with AppInChina IAP Payments System​

Our IAP Payments System provides a unified SDK and REST API around Alipay and WeChat Pay. Choose the SDK payment-initiation flow or a separate API-based flow according to your platform and requirements; the two are not interchangeable modes of the same Android SDK.

It is important to note that:

  • Alipay and WeChat Pay remain the actual payment processors
  • The IAP system acts as a wrapper, launching the official provider SDKs on the user’s device
  • Your system continues to manage users and products; the IAP system only records transactions
  • For a detailed scope breakdown (what the system does and does not include), see: Capabilities and Limitations (Scope)
Server-signed Android SDK mode is not supported

The current Android SDK startPayment() creates an order and launches the wallet; it cannot take a pre-created, server-signed order from your backend for wallet handoff. The SDK also requires APP_SECRET during on-device initialization, so the credential cannot remain server-only in this SDK integration. The REST API allows backend order creation and verification, but that does not make the Android SDK server-signed. See Android SDK guide and API reference.

Typical payment flow​

  1. A user selects a product in your app.
  2. Your app calls the IAP SDK with:
  3. The SDK invokes either Alipay or WeChat Pay.
  4. The user completes the payment in the provider’s native interface.
  5. The payment result is returned to your app.
  6. The transaction is recorded in the IAP backend with your provided identifiers.
  7. Your backend updates the user’s access or entitlement.

This option is well suited for:

  • Standard one-time purchases or subscriptions
  • Faster integration timelines
  • Unified transaction records across Alipay and WeChat Pay
  • Reduced integration and maintenance complexity