Login expired. Please log in again.

Feedback

0/300

Feedback

Submitted successfully

ok

Feedback

Network exception, please try again later

ok

WeChat Pay Development and Access Instructions

System Design
Reasonable Query Mechanism
Callback Verification
Closed-loop Transactions
Complete Refund Logic
Precautions for Development
Important Parameters
API Rules
Precautions Before Business Launch
Business Connectivity
Settlement And Reconciliation

Reasonable Query Mechanism

Business scenario

In case of transaction exception or network error, the institution/merchant system will not be able to obtain the transaction status via the transaction API or callback information. In this case, the institution needs to call the Query Order API in a round-robin manner.

If no query API is integrated or no reasonable polling mechanism is available, it might cause issues such as account inconsistency or customer complaint, while the transaction failure rate may remain high.

Solution

In the Quick Pay mode, the WeChat Pay API will return the transaction result synchronously. If the returned result indicates a failed transaction, or if no result is returned due to network issues such as jitter, the Query Order API must be used to confirm the order status. The interval and times for query can be configured by the institution/merchant based on actual business needs. A query interval of 3-5s is recommended. As WeChat will automatically revoke an order that is not paid within 45s after creation, it’s recommended to maintain the duration of the round-robin calls to the query API within 45s.

Note: The logic of automatically revoking orders not paid within 45s is only applicable to Quick Pay scenarios.

For other payment modes, WeChat Pay will notify the institution/merchant of the order payment result via async callback. WeChat Pay will send payment result notifications only for paid orders. If the institution has no order query logic, the order status will remain pending as unknown. In addition, a network error or callback URL exception will also cause a failure in returning callback information.

The institution/merchant is advised to set two time periods. If no callback is received within time period 1, the query API is called to verify the order status. While within time period 2, the query API needs to be called in a round-robin manner. The duration of two periods, the number of round-robin calls, and the query interval can be configured as needed. The duration of period 1 should not exceed 1 minute.

About  WeChat  Pay

Powered By Tencent & Tenpay Copyright©

2005-2022 Tenpay All Rights Reserved.

Contact Us
Wechat Pay Global

WeChat Pay Global