Order Reversing

Update Time:2025.01.07

The order reversing interface needs to be called in the following circumstances: If payment for the merchant’s order fails and a new order ID needs to be generated to initiate payment again, the order closing interface needs to be called for the original order No. to avoid repeated payment; after an order is placed in the system, the user's payment times out and the system will exit without accepting the order, the order closing interface needs to be called to prevent the user from continuing operation.


1. API Intro

Applicable object: Common mode Institutional mode

Request Url: https://apihk.mch.weixin.qq.com/v3/global/papay/transactions/out-trade-no/{out_trade_no}/reverse

Request method: POST

 

Path parameter is a path parameter.

Query parameter needs to be passed in the request URL.

Body parameter needs to be passed in the request JSON.


2. Request Parameters

Name

Variable Name

Type

Required

Description

Sub-merchant ID

sub_mchid

string[1,32]

Yes

Body Sub-merchant ID allocated by WeChat Pay
Note: Only for Institutional mode
Example: 10000097

Merchant order No.

out_trade_no

string[1,32]

Yes

path Order No. inside the merchant system, which consists of 32 characters and can contain letters; to change the authorization code, you must replace the merchant order No. with a new one. For other information, please refer to Merchant order No.
Example: 1217752501201407033233368018

Example:

Scenario 1:Common mode

1POST
2https://apihk.mch.weixin.qq.com/v3/global/papay/transactions/out-trade-no/1217752501201407033233368018/reverse    

Scenario 2:Service Provide Mode/Institution Mode

1POST
2https://apihk.mch.weixin.qq.com/v3/global/papay/transactions/out-trade-no/1217752501201407033233368018/reverse
3{
4  "sub_mchid": "20000100"
5 }  

 

3. Response Parameters

1No data (the HTTP status code is 204).			


4. Error Codes

Error Codes

Error Message

Description

Solution

400

PARAM_ERROR

Parameter error

Please check the request parameter format.

400

ORDERPAID

The order has been paid

The order cannot be closed; to request a refund, please call the refunding interface

500

SYSTEMERROR

System error

Please try the request again

400

ORDERCLOSED

The order is closed

Do not send the request again because the order has been closed

 

 

About  WeChat  Pay

Powered By Tencent & Tenpay Copyright©

2005-2025 Tenpay All Rights Reserved.

Contact Us
Wechat Pay Global

WeChat Pay Global

Contact Us

Customer Service Tel

+86 571 95017

9:00-18:00 Monday-Friday GMT+8

Business Development

wxpayglobal@tencent.com

Developer Support

wepayTS@tencent.com

Wechat Pay Global

About Tenpay
Powered By Tencent & Tenpay Copyright© 2005-2025 Tenpay All Rights Reserved.