Login expired. Please log in again.

Feedback

0/300

Feedback

Submitted successfully

ok

Feedback

Network exception, please try again later

ok

Report Speed Testing API

Latest update time:2019.11.20 Release notes


This API is used to assist the Merchants in improving overall service quality when they call the WeChat payment APIs. With this API, merchants obtain relevant returned data and response duration. Based on the Merchant's uplink network speed, the WeChat payment system optimizes its networking deployment, so as to continuously improve service reliability and speed.

API intro

Request Url: https://api.mch.weixin.qq.com/payitil/report

Request Method: POST

Certificate Requirements: No certificate is required.

Applicable Object: Common modeInstitutional mode

Request Parameters

Name ID Type Required Description
Official Account ID appid String(32) No Specifies Official Account ID assigned by WeChat
Example: wx8888888888888888
Merchant ID mch_id String(32) Yes Specifies merchant ID assigned by WeChat Payment
Example: 1900000109
Sub Official Account ID sub_appid String(32) No Specifies an Sub Official Account ID assigned by WeChat
Specifies Sub merchant ID of institution's sub-merchant assigned by WeChat Pay
Note: Only for Institutional mode
Example: wx8888888888888888
Sub  Merchant ID sub_mch_id String(32) Yes Specifies Sub Merchant ID assigned by WeChat Payment
Specifies Sub merchant ID of institution's sub-merchant assigned by WeChat Pay
Note: Only for Institutional mode
Example: 1900000109
Device ID device_info String(32) No Specifies the terminal device ID assigned by WeChat Payment. This field is defined by merchants.
Example: 013467007045764
Random String nonce_str String(32) Yes 32 characters or fewer. For more information, see Random String Algorithm.
Example: 5K8264ILTKCH16CQ2502SI8ZNMTM67VS
Signature sign String(64) Yes Specifies a signature. For more information, see Signature Algorithm.
Example: C380BEC2BFD727A4B6845133519F3AD6
Sign Tyep Sign_type String(32) No Currently HMAC-SHA256 and MD5 are supported, default is MD5. This field is only required when sign_type is HMAC-SHA256.
Example: HMAC-SHA256
interface URL interface_url String(128) Yes Complete interface URL to be reported is similar to the following:
https://api.mch.weixin.qq.com/pay/unifiedorder
When Quick Pay is used, in order to analyze the overall duration of a single service with merchants, WeChat requires a report for each Quick Pay service call made in either mode 1 or mode 2. The report URL is as below:
https://api.mch.weixin.qq.com/pay/micropay/total
For more information about mode 2, see Process for merchants.
For other payment methods, calling and reporting is only required once.
Example: https://api.mch.weixin.qq.com/pay/unifiedorder
API Execute Duration execute_time_ int Yes Specifies the duration for calling the API. The units are expressed in milliseconds.
Example: 1000
Return Status Code return_code String(16) Yes SUCCESS or FAIL
Specifies communicating label instead of transaction label. The status of a transaction is determined by the value oftrade_state.
Example: SUCCESS
Return Data return_msg String(128) No If not empty, this is the error description
Signature failure
Parameter format checking error
Example: Signature failure
Service Result result_code String(16) Yes SUCCESS or FAIL
Example: SUCCESS
Error Code err_code String(32) No ORDERNOTEXIST: Order does not exist
SYSTEMERROR: System error
Example: SYSTEMERROR
Error Code Description err_code_des String(128) No Describes result data
Example: System error
Merchant Order Number out_trade_no String(32) No Specifies an order number created by the Merchant’s system. The Merchant can report this order number to WeChat payment system in order to help improve payment services.
Example: 1217752501201407033233368018
Access interface IP user_ip String(16) Yes Specifies the machine IP used when calling this interface
Example: 8.8.8.8
Merchant Report Time time String(14) No Specifies system time in the format of yyyyMMddHHmmss, such as 20091227091010 for Dec 27, 2009 09:10:10. For more information, see Time Protocol.
Example: 20091227091010

Return Data

If the request has failed, the following fields will be returned.


Name ID Type Required Description
Return Status Code return_code String(16) Yes SUCCESS or FAIL
Specifies communicating label instead of transaction label. The status of a transaction is determined by the value of result_code.
Example: SUCCESS
Return Data return_msg String(128) No If not empty, this is the error description
Signature failure
Parameter format checking error
Example: Signature failure

If return_code is SUCCESS, return data will also include the following fields:


Name ID Type Required Description
Service Result result_code String(16) Yes SUCCESS or FAIL
Example: SUCCESS


Release notes

关闭
V1.0
2019.11.20
1. Report Speed Testing released online

About  WeChat  Pay

Powered By Tencent & Tenpay Copyright©

2005-2024 Tenpay All Rights Reserved.

Contact Us
Wechat Pay Global

WeChat Pay Global