Login expired. Please log in again.

Feedback

0/300

Feedback

Submitted successfully

ok

Feedback

Network exception, please try again later

ok

Order Reversing API

Latest update time:2022.08.04 Release notes

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


Pathparameter is a path parameter.
Queryparameter needs to be passed in the request URL.
Bodyparameter 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 forInstitutional 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:


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

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

3. Response Parameters


            No 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


    Page navigation

Release notes

close
V1.0
2021.08.18
Order Reversing API released online

About  WeChat  Pay

Powered By Tencent & Tenpay Copyright©

2005-2024 Tenpay All Rights Reserved.

Contact Us
Wechat Pay Global

WeChat Pay Global

置顶