Query funds-distribution result

Update Time:2025.01.07

After requesting funds-distribution, call the API to query the funds-distribution result. After requesting to unfreeze the remaining funds, call the API to query the result of unfreezing the remaining funds.


1. Request Parameters

Applicable object: Common mode Institutional mode

API rules:https://apihk.mch.weixin.qq.com/v3/global/profit-sharing/orders/{out_order_no}

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.
Note: Only for Institutional mode
Example: 1900000109

Weixin Pay transaction ID

transaction_id

string[1, 32]

Yes

Query Weixin Pay transaction ID
Example: 4208450740201411110007820472

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 _-.
Note: This order No. is used to identify different requests of funds-distribution commands (including funds-distribution request API/Query funds-distribution result API) initiated from the merchant side.
If the funds of one transaction is distributed multiple times, change the [merchant order No.] before requesting funds-distribution. Otherwise it will be considered as a repeated request.
Example: P20150806125346

Request Example

URL

1https://apihk.mch.weixin.qq.com/v3/global/profit-sharing/orders/P20150806125346?sub_mchid=1900000109&transaction_id=4208450740201411110007820472

3. Response Parameters

Name

Variable Name

Type

Required

Description

Sub-merchant ID

sub_mchid

string[1, 32]

No

Merchant ID allocated by Weixin Pay
Example: 1900000109

Weixin Pay order No.

transaction_id

string[1, 32]

Yes

Weixin Pay transaction ID
Example: 4208450740201411110007820472

Merchant order No.

out_order_no

string[1, 64]

Yes

Merchant order No., same as the request parameter.
Example: P20150806125346

Weixin order ID

order_id

string[1, 64]

Yes

Weixin order ID, the unique identifier returned by Weixin system.
Example: 3008450740201411110007820472

Funds-distribution order state

state

string

Yes

Funds-distribution order state (see result field in receivers for funds-distribution results of each receiver).
PROCESSING: Funds-distribution is processing,
FINISHED: Funds-distribution is finished,
Example: FINISHED

Receiver list

receivers

array[1,50]

Yes

Receiver list
When a merchant initiates a funds-distribution request or a unfreeze the remaining funds request, the same transaction funds can be distributed to multiple receivers (including unfreezing funds to the sponsor). The funds-distribution detail describes each funds-distribution state of each receiver.

Receiver list

Return Example

SUCCESS

1{
2    "order_id": "7100000751202203238026613597498",
3    "out_order_no": "MCH13SFDG234155321146",
4    "receivers": [
5      {
6        "account": "999952224", # Note: The account is the sponsor merchant ID
7        "amount": 797,
8        "create_time": "2022-03-23T17:10:13+08:00",
9        "currency": "CNY",
10        "description": "Unfreeze the remaining funds to sponsor",
11        "detail_id": "7200000751202203238026613597602",
12        "detail_type": "UNFREEZE_TO_SPONSOR",
13        "rate_value": 83640300,
14        "result": "PENDING",
15        "settlement_amount": 952,
16        "settlement_currency": "HKD",
17        "type": "MERCHANT_ID"
18      },
19      {
20        "account": "of8YZ6LPmjDmYAqdobIvwTdQQjR8",
21        "amount": 99,
22        "create_time": "2022-03-23T17:10:13+08:00",
23        "currency": "CNY",
24        "description": "Distribute to xxx user-10%",
25        "detail_id": "7200000751202203238026613597699",
26        "detail_type": "DISTRIBUTE_TO_OTHERS",
27        "result": "PENDING",
28        "type": "PERSONAL_OPENID"
29      },
30      {
31        "account": "2480248971",
32        "amount": 99,
33        "create_time": "2022-03-23T17:10:13+08:00",
34        "currency": "CNY",
35        "description": "Distribute to xxx merchant-10%",
36        "detail_id": "7200000751202203238026613597767",
37        "detail_type": "DISTRIBUTE_TO_OTHERS",
38        "result": "PENDING",
39        "type": "MERCHANT_ID"
40      }
41    ],
42    "state": "PROCESSING",
43    "sub_mchid": "999968479",
44    "transaction_id": "4200000012202203235765130087"
45}

ERROR

1{
2	"code": "SYSTEM_ERROR",
3	"message": "Parameter error"
4}

 

4. Error Code

Error Codes

Error Message

Description

Solution

404

NOT_FOUND

Funds-distribution command does not exist. Check whether the out_order_no is filled in correctly

Check whether the out_order_no is filled in correctly

400

INVALID_REQUEST

The merchant information is inconsistent with that in the original command when querying the funds-distribution result

Check whether out_order_no/transaction_id/sub_mchid are filled in correctly

400

INVALID_REQUEST

The Weixin Pay transaction ID is inconsistent with that in the original command when querying the funds-distribution result

Check whether the out_order_no/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

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

 

 

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.