Remaining Funds Amount to be Distributed Query
Update Time:2025.01.07Call API to query the transaction's remaining funds amount to be distributed.
1. API Intro
Applicable object: Common mode Institutional mode
API rules:https://apihk.mch.weixin.qq.com/v3/global/profit-sharing/transactions/{transaction_id}/amounts
Request method:GET
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 | Query 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 | Path Weixin Pay transaction ID |
Request Example
URL
3. Response Parameters
Name | Variable Name | Type | Required | Description |
---|---|---|---|---|
Weixin Pay order No. | transaction_id | string[1, 32] | Yes | Weixin Pay transaction ID |
Remaining funds amount to be distributed | unsplit_amount | int | Yes | Remaining funds amount to be distributed, in the minimum unit of currency. (CNY Currently, unit: cents). |
Currency type | currency | string[1, 10] | Yes | Only CNY is supported currently. |
Return Example
SUCCESS
ERROR
4. Error Code
Error Codes | Error Message | Description | Solution |
---|---|---|---|
400 | INVALID_REQUEST | This order does not support ledger splittin | Please check if the WeChat payment order number is filled in incorrectly and confirm that the call to the order API has been successful before executing call to the accounting mark API |
400 | INVALID_REQUEST | The WeChat Pay transaction ID is inconsistent with that in the original command | Check whether the transaction_id is filled in correctly |
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 | Receiver | Confirm that the receiver is legally compliant before requesting funds-distribution |
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 |
500 | SYSYTE_MERROR | 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 |