# iOS Integration

WeChat's Mini Program now supports virtual payment services on iOS. Developers can follow these guidelines for integration:

# I. Basic Functions

Developers must first enable Mini Program virtual payment and complete the basic configuration. Refer to: Virtual Payment - Product Introduction

# II. Feature Activation

The following conditions must be met:

Note: To comply with Apple Pay's requirement for displaying a user's display name, a Mini Program nickname must be configured.

# III. Item and Token Configuration

Items and tokens configured by developers are compatible across both Android and iOS. These can be used directly.

To add new items or tokens, use the same method as described in Basic Functions.

# IV. User Ordering

For Apple Pay to be used, users must meet the following conditions:

  • Using an iPhone or iPad with iOS 15 or later.
  • WeChat client version 8.0.68 or higher.
  • Minimum payment amount of 1 yuan.

Call wx.requestVirtualPayment, and the platform will route the payment to the appropriate system based on the device type:

Device Type Payment System User Interface
Android, HarmonyOS, Windows WeChat Pay
iOS Apple Pay

Note: Apple Pay does not support sandbox environments; only live production environments are allowed.

# V. Order Display

Orders can be viewed through two methods: web interface and API.

  • Web: Virtual Payment - Transaction Orders. Switch between "Regular Payment" and "Apple Pay" based on the payment channel.
  • API: Use the query_order interface provided for order retrieval.

# VI. User Refunds

Apple Pay does not allow developers to initiate refunds. Users must request refunds through the App Store. The process is as follows:

After a user requests a refund, Apple Pay will evaluate it according to its policies and send the developer three refund inquiries. Developers should respond accordingly based on their own policies.

Apple Pay will finalize the refund based on the developer's responses. For more details, consult Apple Inc.

Message push notifications follow the same standards as specified in Message Push.

# Response API: xpay_subscribe_ios_refund_query_notify

If no response is given within 3 seconds for three consecutive inquiries, WeChat will report "Uncertain" to Apple Pay, leaving the decision to Apple Inc.

# Message Format: WxaVirtualPayIosRefundQueryNotifyEvent
Field Type Description
refund_time string Inquiry time, in Unix timestamp format
order_time string Time of the order for which the refund is requested, in Unix timestamp format
channel_bill string Apple Pay transaction reference number
bundleid string Application's Apple bundle ID
product_id string Item ID
p_count string Quantity of items/tokens
refund_request_reason string Reason given by the user for requesting a refund
provide_status string Shipping status: 0-Not shipped, 1-Shipped, 2-Shipping
pay_order_id string Payment order ID corresponding to the refund
# Response Format: IosRefundQueryResponse
Field Type Description
result_code int32 Result code: 0-Approved refund; 1-Refund denied
result_info string Detailed explanation of the result
evidence string Decision-making evidence (required). Provide reasons for approving or denying the refund for audit purposes

If Apple Pay initiates a refund and it is successful, the platform will send a refund notification using the existing xpay_refund_notify mechanism.

# VII. Settlement and Funding

For orders paid via iOS, Apple Inc. handles the settlement. For details, contact Apple Inc.

Apple typically settles accounts 30–50 days after the end of each month. After deducting Apple's commission, the funds are transferred to Tencent.

Upon receipt, Tencent promptly transfers the funds to the developer's virtual payment account, where they can be withdrawn.

# VIII. Service Fees

For Mini Program virtual payments on iOS, the standard fee is 17%. This includes commissions charged by Apple Inc. and Tencent.

To encourage Mini Program developers and promote the development of the virtual economy, Tencent will waive its technical service fee in 2026.

Item Provider Standard Fee 2026 Fee
Apple Service Fee Apple Inc. 12% Based on Apple's commission policy, currently 12%
Tencent Service Fee Tencent 5% Temporarily waived, 0%
Total 17% 12%