Skip to main content

Start Here: Integrate AppInChina IAP

This is the entry point for integrating AppInChina's payment services. It sets the scope, the client/AppInChina ownership boundary, the prerequisites, and the required reading path.

SDK setup alone is not a completed payment integration

A payment marked PAID in AppInChina's system is not, by itself, proof that your app has granted access. Payment acceptance is complete only when the full path — payment, server-side verification, entitlement, and refreshed access — works in your release candidate. See the Release Checklist / Definition of Done.

Scope and ownership

AppInChina's SDK/API initiates and processes supported payment transactions through the configured payment methods (WeChat Pay and Alipay). Your app and backend must implement the user-account, payment-result, order-verification, entitlement, purchase-history, and refund-reconciliation logic appropriate to your product.

CapabilityClient responsibilityAppInChina responsibility
Product and user accountDefine products, authenticate the user, supply a stable client identity, and determine access rules.Provide configured IAP credentials / product support as agreed.
Payment initiationCall the SDK/API with validated parameters and handle platform requirements.Process the payment request and expose order status.
Post-payment returnImplement and package app-side callback/result handling; update UI only from authoritative entitlement state.Return the payment result through the SDK/API contract.
Order verificationQuery/verify through the client backend; implement idempotent state transitions.Expose the documented order-status interface.
Entitlement and restoreGrant, revoke, and restore access based on your own rules and verified order data.No ownership of the client's account or content-access system.
RefundsReconcile status and revoke/adjust access according to product policy.Process supported refunds and expose updated transaction state; no refund webhook unless separately documented.

For the detailed boundary and worked patterns, see Capabilities and Limitations.

Required reading path

Before beginning implementation, assign an Android owner, a backend owner, a product/entitlement owner, and one designated tester for each wallet you plan to offer. Then complete the following path in order:

  1. Start Here and prerequisites (this page) → Prerequisites & Setup
  2. Platform SDK guideAndroid SDK Integration (or PC & H5 for web)
  3. Server verification and entitlementsServer Verification and Entitlements
  4. Purchase history and refundsPurchase History & Refund Workflows
  5. Client payment preflight and acceptance testingClient Payment Preflight and Acceptance Testing
  6. The release checklistRelease Checklist / Definition of Done

Owners and required outcomes before handoff

RoleRequired page(s)Required outcome before handoff
Technical leadStart Here; Release ChecklistConfirms named owners, supported payment methods, product model, and release plan.
Android developerAndroid SDK guide; TroubleshootingBuild can start a payment, return safely to the app, and emit usable logs.
Backend developerServer Verification & Entitlements; Purchase History & Refunds; API ReferenceBackend verifies payment state, updates entitlements idempotently, and supports history/refund reconciliation.
Product / membership ownerServer Verification & Entitlements; Release ChecklistEntitlement rules, restore behavior, and post-payment UX are defined.
Designated testerClient Payment Preflight & Acceptance TestingWallet account and eligible card are ready for the first in-app low-value purchase.

Reading paths by role

The required path above is sequential. If you want a role-focused starting point, use these:

For Product Managers

If you are defining the feature set, sales model, or integration strategy:

  1. Choose an integration strategy: Read Integration Options to decide between the unified SDK (recommended) or direct integration.
  2. Understand the scope: Read Capabilities & Limitations to understand what the system handles (payments) vs what your backend must handle (users, products, entitlements).
  3. Define your sales model: Read Sales Models & Architecture to understand how to implement subscriptions, one-time purchases, and cross-device entitlements in China.

For Developers

If you are implementing the solution:

  1. Start with the flow: Read Understanding the IAP Flow to see how the SDK wraps Alipay and WeChat Pay.
  2. Check prerequisites: Read Prerequisites & Setup to get your credentials (APP_ID, APP_SECRET) and prepare your environment.
  3. Handle user identity: Read Login & Identity to understand how to link payments to your user accounts using customerIdentity.
  4. Implement the client:
  5. Verify on the server: Use Server Verification and Entitlements and the API Reference to verify orders and grant access.
  6. Preflight and ship: Run the Client Payment Preflight and complete the Release Checklist.

Documentation Index

Concepts & Architecture

SDKs & Implementation

Backend & Guides

Testing, Support & Sign-off

References

Getting started

Before you begin, make sure you have obtained your AppInChina App ID (APP_ID) and APP_SECRET. These credentials are required for SDK initialization and all API requests, and are distinct from your WeChat App ID (the WeChat Open Platform AppID used to initialize the WeChat SDK, shared with WeChat Login).

Start with the Prerequisites and environment setup.