All Products
Search
Document Center

Mobile Platform as a Service:Payment flow

Last Updated:Jun 04, 2026

A Mini Program payment involves four stages: order placement, checkout, payment confirmation, and result handling. This topic describes the end-to-end flow and the APIs your SuperApp must provide to support it.

From the user's perspective, the payment flow proceeds as follows:

  1. The user selects a product, places an order, and clicks Confirm payment to start the payment process.

  2. The Mini Program navigates to the checkout page, where the user initiates payment and a payment confirmation screen appears.

  3. The user verifies the recipient and amount, then completes the payment. The payment result is displayed.

  4. The user is returned to the Mini Program, where the order status is updated based on the payment result.

The following diagram shows the API call flow:

image

SuperApp API requirements

To support the payment flow, the SuperApp must expose the following APIs to the Mini Program:

  • An API to create orders

  • A tradePay API injected by the SuperApp, which the Mini Program uses to invoke the checkout and receive payment result callbacks

  • An API to query payment results

  • An API to issue refunds (as needed)

  • An API to cancel payments

  • An API to query refund results (as needed)

  • An API to close transactions

Important
  • Enable signature verification on all APIs to prevent data tampering and protect your application and its interactions.

  • Use encrypted channels for all API data transmission.

  • Configure an IP address allowlist on the merchant server to guard against private key leaks and protect user funds.