API Download Address for Bill
Merchant initiates a request to delete receiver. The settled funds of the merchant cannot be distributed to the deleted receiver.
Tips:
● Unsuccessful funds-distribution orders on the WeChat side will not be listed in the bill;
● The unit of amount in the bill is Yuan (CNY).
● The Profit-sharing Downloading Reconciliation API can only download bills within 90 days.
1. API Intro
Applicable object: Common mode Institutional mode
API rules:https://apihk.mch.weixin.qq.com/v3/global/profit-sharing/bill-download-url
Request method:GET
Pathparameter is a path parameter.
Queryparameter needs to be passed in the request URL.
Bodyparameter needs to be passed in the request JSON.
3. Response Parameters
Name |
Variable Name |
Type |
Required |
Description |
Download address |
download_url |
string[1, 2048] |
Yes |
The download address of the bill file for the next request is valid for 30 seconds
Example: https://apihk.mch.weixin.qq.com/v3/bill/downloadurl?token=xxx |
Return Example
{
"download_url": "https://apihk.mch.weixin.qq.com/v3/bill/downloadurl?token=xxx"
}
{
"code": "SYSTEM_ERROR",
"message": "Parameter error"
}
{
"stock_id": ".NET",
"limit": 10,
}
{
"stock_id": "Python",
"stock_creator_mchid": "123456",
"limit": 10,
}
File Format Description
• The bill file includes two parts: detailed data and summary data. Each part contains one line of header and several lines of specific data;
• In the detail data table, funds-distribution is recorded in each line , and each data is preceded by a character ` to avoid being processed by Excel. You can replace the character in batches to summarize the amount and other data.
• Data table header format:create_time,initiator,sponsor,sub_mchid,transaction_id,order_id,out_order_no,detaill_id,receiver_account,amount,currency,
settlement_amount,settlement_currency,exchange_rate,business_type,status,description; The explanations of the headers are in the following table:
Variable |
Parameter name |
Description |
create_time |
Funds-distribution initiation time |
System acceptance time of the merchant's funds-distribution request/the system's unfreezing command |
initiator |
Funds-distribution initiator |
If the funds-distribution is initiated by a merchant, the initiator is the merchant ID. If the funds-distribution is initiated by the system, the initiator is "System". |
sponsor |
Funds-distribution sponsor |
The actual contributed merchant ID is the same as that of the settled funds account |
sub_mchid |
Sub-merchant ID |
The sub-merchant ID of the transaction corresponding to the funds-distribution |
transaction_id |
Weixin Pay order No. |
WeChat Pay transaction ID with funds-distribution mark |
order_id |
WeChat order ID |
When requesting funds-distribution, WeChat returns the order ID to the merchant |
out_order_no |
Merchant order No. |
When the merchant requests funds-distribution, the merchant order No. is generated. When the system unfreezes the remaining funds to sponsor, this field is null |
detaill_id |
WeChat funds-distribution detail ID |
The transfer detail ID corresponding to the funds-distribution to the receiver at the merchant's request |
receiver_account |
Account of receiver |
When the funds are distributed, there is an account of receiver. When the business_type=TO_SPONSOR, the receiver_account is null |
amount |
Funds-distribution amount |
Actual amount of funds-distribution in the order |
currency |
Distribution currency |
|
settlement_amount |
Settled funds amount outbound |
Only when business_type=TO_SPONSOR, there is settlement amount |
settlement_currency |
Settlement currency |
Only when business_type=TO_SPONSOR, there is settlement amount |
exchange_rate |
Exchange rate |
Only when business_type=TO_SPONSOR, there is settlement amount |
business_type |
Business type |
Distribute funds: TO_ACCEPTOR; unfreeze the remaining funds: TO_SPONSOR |
status |
Status |
"SUCCESS". Currently, only successful funds-distribution orders are listed in the bill. |
description |
Funds-distribution description |
Funds-distribution description uploaded by the merchant. If the system initiates the unfreezing command, the description is "Unfreeze the remaining funds to sponsor" |
• Summary table header format: total_count, total_amount_to_sponsor, total_amount_to_acceptor; Explanations of the headers are: total number of funds-distribution orders in the bill, total unfrozen funds amount released of the day, and total distributed funds amount of the day;
• There are empty lines between the data lines and the summary header.
create_time,initiator,sponsor,sub_mchid,transaction_id,order_id,out_order_no,detaill_id,receiver_account,amount,currency,settlement_amount,settlement_currency,exchange_rate,business_type,status,description
`2020-08-01 15:19:53,`1489578022,`1489578022,`1489578025,`4200001201202111086372797299,`7100010010202111091636447398824,`HX3804579307200708608,`7200010010202111091636447398823,`,`80.38,`CNY,`16.40,`AUD,`490176891,`TO_SPONSOR,`SUCCESS,`Unfreeze the remaining funds to sponsor
total_count,total_amount_to_sponsor,total_amount_to_acceptor
`1,`80.38,`0
{
"account": "of8YZ6LPmjDmYAqdobIvwTdQQjR8",
"appid": "wx78898sdfwe9888835",
"type": "PERSONAL_OPENID",
"sub_mchid": "999968480"
}
{
"stock_id": ".NET",
"limit": 10,
}
{
"stock_id": "Python",
"stock_creator_mchid": "123456",
"limit": 10,
}