Unfreezing Remaining Funds
Update Time:2025.01.07For transactions that do not require funds-distribution, call the API directly to unfreeze all the transaction amount to the sponsor account (original transaction funds settlement account); After the funds-distribution interface is called, and when remaining funds need to be unfrozen, call the API to unfreeze all remaining funds to the sponsor.
|
1. API Intro
Applicable object: Common mode Institutional mode
API rules:https://apihk.mch.weixin.qq.com/v3/global/profit-sharing/orders/unfreeze
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] | No | Body Sub-merchant ID allocated by Weixin Pay. It needs to be consistent with the sub-merchant ID in the transaction of Weixin Pay. |
Weixin Pay transaction ID | transaction_id | string[1, 32] | Yes | Body Weixin Pay transaction ID |
Merchant order No. | out_order_no | string[1, 64] | Yes | Body The order No. in the merchant system, which is unique. It can only include numbers, capital letters and lowercase letters _-. |
Funds-distribution description | description | string[1, 80] | Yes | Body Reason description of funds-distribution, to be reflected in the funds-distribution record |
Request Example
JSON
3. Response Parameters
Name | Variable Name | Type | Required | Description | |||
---|---|---|---|---|---|---|---|
Sub-merchant ID | sub_mchid | string[1, 32] | No | Merchant ID allocated by Weixin Pay | |||
Weixin Pay order No. | transaction_id | string[1, 32] | Yes | Weixin Pay transaction ID | |||
Merchant order No. | out_order_no | string[1, 64] | Yes | Merchant order No., same as the request parameter. | |||
Weixin order ID | order_id | string[1, 64] | Yes | Weixin order ID, the unique identifier returned by Weixin system. | |||
Funds-distribution order state | state | string | Yes | Funds-distribution order state (see result field in receivers for funds-distribution results of each receiver). | |||
Receiver list | receivers | array[1,50] | Yes | Receiver list | |||
|
Return Example
SUCCESS
ERROR
4. Error Code
Error Codes | Error Message | Description | Solution |
---|---|---|---|
400 | INVALID_REQUEST | The merchant information in the request of funds-distribution is inconsistent with that in the original transaction | Carefully check whether the transaction ID is filled in correctly and whether the sub-merchant has been filled in or filled in incorrectly |
400 | INVALID_REQUEST | The transaction does not support funds-distribution | Check whether the Weixin Pay transaction ID is filled in incorrectly and confirm that the Funds-distribution Mark API is called successfully before calling the transaction API |
403 | NO_AUTH | The merchant has not signed the overseas funds-distribution product | Refer to the product process and access preparation, confirm that the merchant has funds-distribution authorization, and initiate the request again |
403 | NO_AUTH | The merchant has enabled the funds-distribution product and is waiting for it to take effect (Usually takes effect the next day) | The funds-distribution function cannot be initiated on the first day. Please initiate the request on the next day |
403 | NO_AUTH | The parent-child relationship of the merchant does not exist. Please use correct sub-merchant ID to initiate the request | Please check if the sub-merchant ID (sub_mchid) is filled in correctly |
400 | INVALID_REQUEST | The command (out_order_no) already exists when the merchant unfreezes the remaining funds and the details are not as expected | In case of different funds-distribution requests, change the command (out_order_no) before requesting funds-distribution |
403 | NOTENOUGH | The funds amount to be distributed is insufficient at the time of request | The current remaining funds amount to be distributed of the transaction can be obtained through [Remaining Funds Amount to be Distributed Query API] |
500 | SYSYTEMERROR | The freeze process of the transaction funds specified by the merchant when initiating funds-distribution request has not been completed. Try again later | After the user completes the payment, the fund freezing process for the transaction with funds-distribution will be triggered. It is recommended that the merchant try again after 3~5 mins |