# Small package shipping information management service
according toThe operating specifications for merchant-owned Mini ProgramsHowever, certain types of Mini Programs need to complete the shipping information entry and confirm the receipt process on the platform before the funds can be settled.
Developers can use this access service to complete the item shipping information entry, remind users to confirm receipt, and call the confirmation receipt component in the Mini Program to improve the efficiency of shipping information entry and optimize the user experience.
# Shipping Receipt Management Service API Capabilities:
I. Entry of shipping information into the interface
II. Entry of shipping information contracts into the interface
III. Checking the status of the order shipment
V. Confirming the shipping reminder interface
VI. Message Jump Path Settings Interface
VII. Check whether the Mini Program has activated the shipping information management service
VIII. Query whether the Mini Program has completed transaction settlement management confirmation
X. Special shipment notification
# Confirm delivery within the small printout
A Mini Program confirms receipt component access instructions
# I. Entry of shipping information into the interface
After the user makes a transaction, the default funds will be frozen, and after the shipment, the developer needs to record the relevant shipment information on the Mini Program platform, and the platform will push the shipment information in the form of a message to the WeChat user who purchased.
If you have entered shipping information, you can modify the shipping information through this interface when the user has not confirmed the receipt, but a payment order can only update the shipping information once, so be cautious.
If you have not completed the relevant API docking development work, you can also log in the background of the Mini Program and manually enter the shipping information through the shipping letter management page.
# Note
Depending on the type of order number specified, different parameters are used to upload logistics information to the specified order:
(1). In the form of merchant side order number (enumeration value 1), an order is determined by the merchant number where the order is placed and the merchant side number
(2). Weixin Pay single form (enumeration value 2), through WeChat Pay single number to determine an order
Shipping mode is selected based on specific shipping conditions:
(1). Unified shipment (enumeration value 1) A single order is shipped unified, with only one logistics number.
(2). Separate shipment (enumeration value 2). A single order is separated and shipped, including multiple logistics order numbers.
Logistics companies code, seeAcquiring capacity id List get_delivery_list。
The upload time is used to identify the order of requests. If you want to update the logistics information, the upload time must be updated compared to the previous request. Please follow RFC 3339 Fill in the format.
Split shipping is only supported using logistics courier, and a payment order can be split up to a maximum 10 A package.
The following cases will be considered re-shipment and there is only one re-shipement opportunity per payment.
(1). Call the payment order for a completed shipment again API。
(2). Use this API Modify the shipping mode or logistics mode.
# How to call
# HTTPS call
POST https://api.weixin.qq.com/wxa/sec/order/upload_shipping_info?access_token=ACCESS_TOKEN
# Third party invocation
The invocation method and entry and exit parameters are the same as HTTPS, only the calling token is different
This interface belongs to a permission set id: 142
When a service provider is authorized by one of these permissions sets, it can useauthorizer_access_TokenCall on behalf of the merchant
# Request parameters
attribute | type | Required to fill in | Introductions | ||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
access_Token | string | yes | The interface calls credentials, and the parameter is URL Parameter, non Body Parameters. usegetAccessToken orauthorizer_access_Token | ||||||||||||||||||||||||||||||||||||||||||||||
order_key | object | yes | Orders, orders that need to upload logistics information | ||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||
logistics_type | number | yes | Logistics mode, shipping method enumeration value: 1. Physical logistics distribution uses courier companies to conduct physical logistics distribution. 2. Same-day delivery Virtual goods, virtual goods, such as call ups, card subscriptions, etc., do not have physical delivery form 4. Users own their own supplies | ||||||||||||||||||||||||||||||||||||||||||||||
delivery_mode | number | yes | Shipping mode, shipping mode enumeration value: 1, UNIFIED_DELIVERY (unified delivery) 2. SPLIT_DELIVERY (split delivery) Example values: UNIFIED_DELIVERY | ||||||||||||||||||||||||||||||||||||||||||||||
is_all_delivered | boolean | no | It is necessary to fill in the split shipping mode to identify whether all shipments have been completed under the split shipping model, and only if all shipments are completed will the shipment completion notification be pushed to the user. Example values: true/false | ||||||||||||||||||||||||||||||||||||||||||||||
shipping_list | array< object> | yes | Logistics information list, shipping logistics list, supports two modes of unified shipping (single logistics list) and split shipping (multiple logistics list). Multipleness: [1, 10] | ||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||
upload_Time | string | yes | Upload time, used to identify the order of requests Example values: `2022-12-15T13:29:35.120+08:00` | ||||||||||||||||||||||||||||||||||||||||||||||
payer | object | yes | Payers, Payer Information | ||||||||||||||||||||||||||||||||||||||||||||||
|
# Return Parameters
attribute | type | Introductions |
---|---|---|
Error code | number | Error code |
errmsg | string | Reasons for the Error |
# Example call
# Example of request data
{
"order_key": {
"order_number_type": 2,
"transaction_id": "fake-transid-20221214190427-1"
},
"delivery_mode": 1,
"logistics_type": 1,
"shipping_list": [
{
"tracking_no": "fake-trackingno-2022121419042711",
"express_company": "STO",
"item_desc": " WeChat Bubble Dog Chainer*1",
"contact": {
"consignor_contact": "+86-177****1234"
}
}
],
"upload_time": "2022-12-15T13:29:35.120+08:00",
"payer": {
"openid": "ogqztkPsejM9MQAFfwCQSCi4oNg3"
}
}
# Return data example
{
"errcode": 0,
"errmsg": "ok"
}
# Error code
Error code | Error code values | Solutions |
---|---|---|
-1 | system error | The system is busy, so the developer is asked to try again in a few minutes. |
10060001 | The payment slip does not exist. | Please check the form of Weixin Pay single number transaction_id In the form of fields or merchant side numbers mchid、out_trade_no Is there an error in the field? |
10060002 | The payment order has been shipped and cannot be continued | Please check the shipping status of the payment order |
10060003 | The payment order has been used for a re-shipment opportunity | Invoking the API when the payment sheet is in the shipped state is considered as re-shipping, and only once can be re-shipped, please check the status of the payment sheet shipment |
10060004 | The payment order is in non-shipable condition | Please check the status of the payment slip |
10060005 | The type of logistics was incorrect. | Fill this field according to the logistics type enumeration in the document |
10060006 | Shipments are not allowed to be split when not delivered by courier. | Discrete shipments are not allowed when non-express shipping, please check the request parameters |
10060007 | Required to fill in in split shipping mode is_all_delivered field | Please check the request parameter is_all_delivered field |
10060008 | Product Description item_desc Fields cannot be empty | The item description field cannot be empty when the shipment information is entered in the scene |
10060009 | Product Description item_desc The field is too long | Please check the product description field |
10060012 | A system error | The system is busy, so the developer is asked to try again in a few minutes. |
10060014 | Parameter Error | Describe the modification parameter based on the cause of the error |
10060019 | A system error | The system is busy, so the developer is asked to try again in a few minutes. |
10060020 | This payment note does not allow for the completion of the shipment without any description of the goods | Please add a description of the product item_desc |
10060023 | Shipping information has not been updated | Payment slip information remains unchanged |
10060024 | The list of logistics information is too long | The length of the payment order logistics information list must not be greater than 10 |
10060025 | Logistics companies code too long | Please check the logistics company's coding for errors |
10060026 | The logistics number is too long. | Please check the shipping number for errors |
10060031 | This payment order does not belong Openid The specified user | Please check the payment number or Openid Is there a mistake? |
268485216 | The upload time is illegal, please follow RFC 3339 Fill out in format | The upload time must be met RFC 3339 Format, such as 2022-12-15T13:29:35.120+08:00 |
268485224 | The shipping pattern is illegal. | Set this field according to the shipping mode enumeration in the document |
268485195 | Weixin Pay single number form transaction_id Fields cannot be empty | Weixin Pay single number form transaction_id Fields must be set |
268485196 | In the form of merchant side numbers mchid Fields cannot be empty | In the form of merchant side numbers mchid Fields must be set |
268485197 | In the form of merchant side numbers out_trade_no Fields cannot be empty | In the form of merchant side numbers out_trade_no Fields must be set |
268485194 | The type of order number is illegal. | Fill this field according to the type of order number in the document |
268485228 | Under the unified shipping mode, the length of the logistics information list must be 1 | Under the unified shipping mode, the length of the logistics information list must be 1 |
268485226 | The logistics number cannot be empty | The logistics number must be filled when a logistics courier is shipped |
268485227 | Logistics company codes cannot be blank | When a logistics courier is shipped, the logistics company's code must be filled in |
# II. Entry of shipping information contracts into the interface
After the user makes a transaction, the default funds will be frozen, and after the shipment, the developer needs to record the relevant shipment information on the Mini Program platform, and the platform will push the shipment information in the form of a message to the WeChat user who purchased.
If you have entered shipping information, you can modify the shipping information through this interface when the user has not confirmed the receipt, but a payment order can only update the shipping information once, so be cautious.
If you have not completed the relevant API docking development work, you can also log in the background of the Mini Program, manually enter the shipping information through the shipping information entry page.
# Note
Depending on the specified order number type, use different parameters to upload logistics information to the specified Order. Note that the order number type of the sub-order and main order must be consistent:
(1). In the form of merchant side order number (enumeration value 1), an order is determined by the merchant number where the order is placed and the merchant side number
(2). Weixin Pay single form (enumeration value 2), through WeChat Pay single number to determine an order
Shipping mode is selected based on specific shipping conditions:
(1). Unified shipment (enumeration value 1) A single order is shipped unified, with only one logistics number.
(2). Separate shipment (enumeration value 2). A single order is separated and shipped, including multiple logistics order numbers.
Logistics companies code, seeAcquiring capacity id List get_delivery_list。
Upload time, used to identify the order of the request, if you want to update the logistics information, upload time must be updated than the previous request, please follow the RFC Please fill in the format 3339.
Split shipping is only supported using logistics courier, and a payment order can be split up to a maximum 10 A package.
The following cases will be considered re-shipment and there is only one re-shipement opportunity per payment. (1). Call the payment order for a completed shipment again API。
(2). Use this API Modify the shipping mode or logistics mode.
# How to call
# HTTPS call
POST https://api.weixin.qq.com/wxa/sec/order/upload_combined_shipping_info?access_token=ACCESS_TOKEN
# Third party invocation
The invocation method and entry and exit parameters are the same as HTTPS, only the calling token is different
This interface belongs to a permission set id: 142
When a service provider is authorized by one of these permissions sets, it can useauthorizer_access_TokenCall on behalf of the merchant
# Request parameters
attribute | type | Required to fill in | Introductions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
access_Token | string | yes | The interface calls credentials, and the parameter is URL Parameter, non Body Parameters. usegetAccessToken or authorizer_access_Token | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
order_key | object | yes | Consolidated orders, those that need to upload logistics details, choose one based on the type of order | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sub_orders | array< object> | no | Sub-List Logistics Details | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
upload_Time | string | yes | Upload time, used to identify the order of requests Example values: `2022-12-15T13:29:35.120+08:00` | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
payer | object | yes | Payers, Payer Information | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# Return Parameters
attribute | type | Introductions |
---|---|---|
Error code | number | Error code |
errmsg | string | Reasons for the Error |
# Example call
# Example of request data
{
"order_key": {
"order_number_type": 1,
"mchid": "fake-mchid-123",
"out_trade_no": "fake-tradeno-20221214190427-0"
},
"sub_orders": [
{
"order_key": {
"order_number_type": 1,
"mchid": "fake-mchid-123",
"out_trade_no": "fake-tradeno-20221214190427-01"
},
"delivery_mode": 2,
"logistics_type": 1,
"is_all_delivered": true,
"shipping_list": [
{
"tracking_no": "fake-trackingno-202212141904271",
"express_company": "YD",
"item_desc": " WeChat Bubble Dog Change Wallet*1",
"contact": {
"consignor_contact": "021-**34-12"
}
},
{
"tracking_no": "fake-trackingno-202212141904272",
"express_company": "DHL",
"item_desc": " WeChat Yellow Face Fabric Ties*1WeChat Bubble Dog Change Wallet*1",
"contact": {
"consignor_contact": "021-**34-12"
}
}
]
},
{
"order_key": {
"order_number_type": 1,
"mchid": "fake-mchid-321",
"out_trade_no": "fake-tradeno-20221214190427-02"
},
"delivery_mode": 1,
"logistics_type": 1,
"shipping_list": [
{
"tracking_no": "fake-trackingno-202212141904273",
"express_company": "YTO",
"item_desc": " WeChat Bubble Dog Two-Side Key Buttons*1",
"contact": {
"receiver_contact": "+86-123****4321"
}
}
]
}
],
"upload_time": "2022-12-15T13:29:35.120+08:00",
"payer": {
"openid": "ogqztkPsejM9MQAFfwCQSCi4oNg3"
}
}
# Return data example
{
"errcode": 0,
"errmsg": "ok"
}
# Error code
Error code | Error code values | Solutions |
---|---|---|
-1 | system error | The system is busy, so the developer is asked to try again in a few minutes. |
10060001 | The payment slip does not exist. | Please check the form of Weixin Pay single number transaction_id In the form of fields or merchant side numbers mchid、out_trade_no Is there an error in the field? |
10060002 | The payment order has been shipped and cannot be continued | Please check the shipping status of the payment order |
10060003 | The payment order has been used for a re-shipment opportunity | Invoking the API when the payment sheet is in the shipped state is considered as re-shipping, and only once can be re-shipped, please check the status of the payment sheet shipment |
10060004 | The payment order is in non-shipable condition | Please check the status of the payment slip |
10060005 | The type of logistics was incorrect. | Fill this field according to the logistics type enumeration in the document |
10060006 | Shipments are not allowed to be split when not delivered by courier. | Discrete shipments are not allowed when non-express shipping, please check the request parameters |
10060007 | Required to fill in in split shipping mode is_all_delivered field | Please check the request parameter is_all_delivered field |
10060008 | Product Description item_desc Fields cannot be empty | The item description field cannot be empty when the shipment information is entered in the scene |
10060009 | Product Description item_desc The field is too long | Please check the product description field |
10060012 | A system error | The system is busy, so the developer is asked to try again in a few minutes. |
10060013 | Sub-List Single Number Repeat | sub_orders You must not include a duplicate sub-number in the list. Please check |
10060014 | Parameter Error | Describe the modification parameter based on the cause of the error |
10060019 | A system error | The system is busy, so the developer is asked to try again in a few minutes. |
10060020 | This payment note does not allow for the completion of the shipment without any description of the goods | Please add a description of the product item_desc |
10060023 | Shipping information has not been updated | Payment slip information remains unchanged |
10060024 | The list of logistics information is too long | The length of the payment order logistics information list must not be greater than 10 |
10060025 | Logistics companies code too long | Please check the logistics company's coding for errors |
10060026 | The logistics number is too long. | Please check the shipping number for errors |
10060031 | This payment order does not belong Openid The specified user | Please check the payment number or Openid Is there a mistake? |
268485216 | The upload time is illegal, please follow RFC 3339 Fill out in format | The upload time must be met RFC 3339 Format, such as 2022-12-15T13:29:35.120+08:00 |
268485224 | The shipping pattern is illegal. | Set this field according to the shipping mode enumeration in the document |
268485253 | The order number type of the main order is inconsistent with the number type of sub-order | The order number type of the main order must be the same as the number type of sub-order |
268485195 | Weixin Pay single number form transaction_id Fields cannot be empty | Weixin Pay single number form transaction_id Fields must be set |
268485196 | In the form of merchant side numbers mchid Fields cannot be empty | In the form of merchant side numbers mchid Fields must be set |
268485197 | In the form of merchant side numbers out_trade_no Fields cannot be empty | In the form of merchant side numbers out_trade_no Fields must be set |
268485194 | The type of order number is illegal. | Fill this field according to the type of order number in the document |
268485228 | Under the unified shipping mode, the length of the logistics information list must be 1 | Under the unified shipping mode, the length of the logistics information list must be 1 |
268485226 | The logistics number cannot be empty | The logistics number must be filled when a logistics courier is shipped |
268485227 | Logistics company codes cannot be blank | When a logistics courier is shipped, the logistics company's code must be filled in |
# III. Checking the status of the order shipment
You can check the shipping status of the payment order by either the transaction number or the merchant number + merchant number.
# Note
# How to call
# HTTPS call
POST https://api.weixin.qq.com/wxa/sec/order/get_order?access_token=ACCESS_TOKEN
# Third party invocation
The invocation method and entry and exit parameters are the same as HTTPS, only the calling token is different
This interface belongs to a permission set id: 142
When a service provider is authorized by one of these permissions sets, it can useauthorizer_access_TokenCall on behalf of the merchant
# Request parameters
attribute | type | Required to fill in | Introductions | |
---|---|---|---|---|
access_Token | string | yes | The interface calls credentials, and the parameter is URL Parameter, non Body Parameters. usegetAccessToken orauthorizer_access_Token | |
transaction_id | string | no | The WeChat order number corresponding to the original payment transaction. | |
merchant_id | string | no | The merchant number of the payment order, generated and issued by Weixin Pay. | |
sub_merchant_id | string | no | Secondary merchant number. | |
merchant_trade_no | string | no | The order number within the merchant system can only be a number and upper and lower case letters`_-*`It's unique under the same merchant number. |
# Return Parameters
attribute | type | Introductions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Error code | number | Error code. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
errmsg | string | The wrong reason. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
order | object | Payment order information. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# Example call
# Example of request data
{
"transaction_id": "fake-transid-20221209132531-44",
"merchant_id": "fake-mchid-123",
"merchant_trade_no": "fake-tradeno-20221209132531-44"
}
# Return data example
{
"errcode": 0,
"errmsg": "ok",
"order": {
"transaction_id": "fake-transid-20221209132531-44",
"merchant_trade_no": "fake-tradeno-20221209132531-44",
"merchant_id": "fake-mchid-123",
"sub_merchant_id": "",
"description": "*1",
"paid_amount": 916,
"openid": "ogqztkPsejM9MQAFfwCQSCi4oNg3",
"trade_create_time": 1670563533,
"pay_time": 1670563533,
"in_complaint": false,
"order_state": 2,
"shipping": {
"delivery_mode": 1,
"logistics_type": 1,
"finish_shipping": true,
"finish_shipping_count": 1,
"goods_desc": "*1",
"shipping_list": [
{
"tracking_no": "JT1234567890",
"express_company": "JTSD",
"upload_time": 1670832735
}
]
}
}
}
# Error code
Error code | Error code values | Solutions |
---|---|---|
-1 | system error | The system is busy, so the developer is asked to try again in a few minutes. |
10060001 | The payment slip does not exist. | Please check the single form of Weixin Pay transaction_Id field or merchant side single number form under mchid, out_trade_Is the no field wrong? |
10060012 | A system error | The system is busy, so the developer is asked to try again in a few minutes. |
10060014 | The request parameter is illegal. | Please check the form of Weixin Pay single number transaction_id Whether the field is filled in, or the merchant side single number form under merchant_id、merchant_trade_Is the no field filled in? |
# IV. Query Order List
You can check the order list by time of payment, payer openid or order status.
# Note
# How to call
# HTTPS call
POST https://api.weixin.qq.com/wxa/sec/order/get_order_list?access_token=ACCESS_TOKEN
# Third party invocation
The invocation method and entry and exit parameters are the same as HTTPS, only the calling token is different
This interface belongs to a permission set id: 142
When a service provider is authorized by one of these permissions sets, it can useauthorizer_access_TokenCall on behalf of the merchant
# Request parameters
attribute | type | Required to fill in | Introductions | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
access_Token | string | yes | The interface calls credentials, and the parameter is URL Parameter, non Body Parameters. usegetAccessToken orauthorizer_access_Token | ||||||||||||||||
pay_Time_Range | object | no | The payment time belongs to the scope. | ||||||||||||||||
| |||||||||||||||||||
order_state | number | no | Order status enumeration:(1) To be shipped(2) Shipments have been made(3) Confirm delivery(4) The transaction was completed(5) The money has been refunded. | ||||||||||||||||
Openid | string | no | Payers openid. | ||||||||||||||||
last_index | string | no | Use when turning a page and do not need to be entered when fetching the first page if the query results are in has_More The field is True, then pass in the returned last_index The field fetches the next page. | ||||||||||||||||
Page_Size | number | no | Use when turning the page to return the length of the list, which is 100 by default. |
# Return Parameters
attribute | type | Introductions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Error code | number | Error code. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
errmsg | string | The wrong reason. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
last_index | string | Use this when you turn the page. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
has_More | boolean | Are there any more payment orders available? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
order_list | array< object> | A list of payment order information. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
# Example call
# Example of request data
{
"pay_Time_range": {
"begin_time": 1670563531,
"end_time": 1670563531
},
"page_size": 2
}
# Return data example
{
"errcode": 0,
"errmsg": "ok",
"order_list": [
{
"transaction_id": "fake-transid-20221209132531-0",
"merchant_trade_no": "fake-tradeno-20221209132531-0",
"merchant_id": "fake-mchid-123",
"sub_merchant_id": "",
"description": "",
"paid_amount": 4353,
"openid": "ogqztkPsejM9MQAFfwCQSCi4oNg3",
"trade_create_time": 1670563531,
"pay_time": 1670563531,
"order_state": 1,
"in_complaint": false,
"shipping": {}
},
{
"transaction_id": "fake-transid-20221209132531-1",
"merchant_trade_no": "fake-tradeno-20221209132531-1",
"merchant_id": "fake-mchid-123",
"sub_merchant_id": "",
"description": "",
"paid_amount": 29767,
"openid": "ogqztkPsejM9MQAFfwCQSCi4oNg3",
"trade_create_time": 1670563531,
"pay_time": 1670563531,
"order_state": 1,
"in_complaint": false,
"shipping": {}
}
],
"last_index": "092dd3cecbc6926301",
"has_more": true
}
# Error code
Error code | Error code values | Solutions |
---|---|---|
-1 | system error | The system is busy, so the developer is asked to try again in a few minutes. |
10060001 | The payment slip does not exist. | Please check the single form of Weixin Pay transaction_Id field or merchant side single number form under mchid, out_trade_Is the no field wrong? |
10060011 | last_Index is illegal. | Please check the last_The index field is incorrect. |
10060012 | A system error | The system is busy, so the developer is asked to try again in a few minutes. |
10060014 | The request parameter is illegal. | Please check the form of Weixin Pay single number transaction_id Whether the field is filled in, or the merchant side single number form under merchant_id、merchant_trade_Is the no field filled in? |
# V. Confirming the shipping reminder interface
If you have learned from your courier logistics service that the user has signed up for the relevant goods, you can use this interface to remind the user to confirm the receipt in time to improve the efficiency of financial settlement. Each order can only be invoked once.
# Note
- Specify an order by transaction number or merchant number + merchant number.
- Reminders can only be made when the type of logistics is a logistics courier.
- The receipt time is entered by the merchant and displayed when a reminder message is sent to the user. The receipt must be after the shipping time.
# How to call
# HTTPS call
POST https://api.weixin.qq.com/wxa/sec/order/notify_confirm_receive?access_token=ACCESS_TOKEN
# Third party invocation
The invocation method and entry and exit parameters are the same as HTTPS, only the calling token is different
This interface belongs to a permission set id: 142
When a service provider is authorized by one of these permissions sets, it can useauthorizer_access_TokenCall on behalf of the merchant
# Request parameters
attribute | type | Required to fill in | Introductions |
---|---|---|---|
access_Token | string | yes | The interface calls credentials, and the parameter is URL Parameter, non Body Parameters. usegetAccessToken orauthorizer_access_Token |
transaction_id | string | no | The WeChat order number corresponding to the original payment transaction |
merchant_id | string | no | The account number of the payment order merchant, generated and issued by Weixin Pay |
sub_merchant_id | string | no | Secondary merchant number |
merchant_trade_no | string | no | The order number within the merchant system can only be a number and upper and lower case letters_-* And only one under the same merchant number. |
received_Time | number | yes | The time of delivery, in the form of a time stamp. |
# Return Parameters
attribute | type | Introductions |
---|---|---|
Error code | number | Error code |
errmsg | string | Reasons for the Error |
# Example call
# Example of request data
{
"transaction_id": "fake-transid-20221209132531-44",
"merchant_id": "fake-mchid-123",
"merchant_trade_no": "fake-tradeno-20221209132531-44",
"received_time": 1670829139
}
# Return data example
{
"errcode": 0,
"errmsg": "ok"
}
# Error code
Error code | Error code values | Solutions |
---|---|---|
-1 | system error | The system is busy, so the developer is asked to try again in a few minutes. |
10060001 | The payment slip does not exist. | Please check the single form of Weixin Pay transaction_Id field or merchant side single number form under mchid, out_trade_Is the no field wrong? |
10060012 | A system error | The system is busy, so the developer is asked to try again in a few minutes. |
10060014 | The request parameter is illegal. | Please check the form of Weixin Pay single number transaction_id Whether the field is filled in, or the merchant side single number form under merchant_id、merchant_trade_Is the no field filled in? |
10060028 | The payment slip is not in shipment status | Please check the status of the payment slip |
10060029 | The time of issuance was illegal. | Please check whether the pickup time is after the shipping time |
10060030 | The payment slip has been used to remind the delivery opportunity | No more reminders to take delivery. |
10060032 | Only when a logistics courier shipments are allowed to remind the user to confirm receipt | Please check the shipping type of the payment order |
# VI. Message Jump Path Settings Interface
If you already have access to the confirmation receipt component provided by the platform within the Mini Program, you can set the jump action for the shipping message and confirmation receipts message through this interface. When users click on the shipping message, they will go directly to your Mini Program order list page or details page to confirm the receipt, further optimizing the user experience.
# Note
If set to an empty path or a path that does not exist in your Mini Program, it will still jump to the platform's default confirmation delivery page and won't enter your Mini Program.
The platform will add payment orders behind the path transaction_id、merchant_id、merchant_trade_no As a query parameter, if there is a second merchant number, it will be added again sub_merchant_id Parameters, developers can get in Mini programs through onLaunch and so on.
If you need to carry custom query parameters in the path, be careful to distinguish from the parameters above.
# How to call
# HTTPS call
POST https://api.weixin.qq.com/wxa/sec/order/set_msg_jump_path? access_token=ACCESS_TOKEN
# Third party invocation
The invocation method and entry and exit parameters are the same as HTTPS, only the calling token is different
This interface belongs to a permission set id: 142
When a service provider is authorized by one of these permissions sets, it can useauthorizer_access_TokenCall on behalf of the merchant
# Request parameters
attribute | type | Required to fill in | Introductions |
---|---|---|---|
access_Token | string | yes | The interface calls credentials, and the parameter is URL Parameter, non Body Parameters. usegetAccessToken orauthorizer_access_Token |
path | string | yes | The merchant customizes the jump path. |
# Return Parameters
attribute | type | Introductions |
---|---|---|
Error code | number | Error code |
errmsg | string | Reasons for the Error |
# Example call
# Example of request data
{
"path": "pages/order/detail"
}
# Return data example
{
"errcode": 0,
"errmsg": "ok"
}
# Error code
Error code | Error code values | Solutions |
---|---|---|
-1 | system error | The system is busy, so the developer is asked to try again in a few minutes. |
# VII. Check whether the Mini Program has activated the shipping information management service
# Features Description
Calling the interface can query whether the Mini Program account has opened the Mini Program delivery credit management service (the Mini Program has opened, you can access the delivery credit management service API for delivery management).
# Note
The service provider is licensed 18 or 142 A query can only be made when the permission set is set.
# How to call
# HTTPS call
POST https://api.weixin.qq.com/wxa/sec/order/is_trade_managed?access_token=ACCESS_TOKEN
# Request parameters
attribute | type | Required to fill in | Introductions |
---|---|---|---|
access_Token | string | yes | The interface calls credentials, and the parameter is URL Parameter, non Body Parameters. usegetAccessToken orauthorizer_access_Token |
appid | string | yes | A query for a Mini Program Appid, non-service providers can only query this account when calling |
# Return Parameters
attribute | type | Introductions |
---|---|---|
Error code | number | Error code |
errmsg | string | Reasons for the Error |
is_trade_managed | boolean | Whether the Mini Program shipping information management service has been activated |
# Example call
# Example of request data
{
"appid": "wx0123456789abcdef"
}
# Return data example
{
"errcode": 0,
"errmsg": "ok",
"is_trade_managed": true
}
# Error code
Error code | Error code values | Solutions |
---|---|---|
-1 | system error | The system is busy, so the developer is asked to try again in a few minutes. |
61003 | The service provider is not authorized | Please check whether the Mini Program has authorized 18 or 142 permissions sets. |
61004 | User IP is not authorized | Check if the caller IP is in the vendor IP whitelist. |
61011 | The service provider is not legal. | Please check access_Is the token wrong? |
40013 | Appid Illegal | Please check appid for errors |
40097 | The request parameter is illegal. | Please check that appid has been filled out |
44990 | Achieving the maximum frequency control | The system is busy, so the developer is asked to try again in a few minutes. |
# VIII. Query whether the Mini Program has completed transaction settlement management confirmation
# Features Description
Calling this interface can query whether the Mini Program account has completed transaction settlement management confirmation (i.e., all merchant numbers associated with the Mini Program have completed order management authorization or unbundled). The merchant number that has completed the order management authorization, and the resulting orders need to be shipped through the shipping information management service.
# Note
The service provider is licensed 18 or 142 A query can only be made when the permission set is set.
# How to call
# HTTPS call
POST https://api.weixin.qq.com/wxa/sec/order/is_trade_management_confirmation_completed?access_token=ACCESS_TOKEN
# Request parameters
attribute | type | Required to fill in | Introductions |
---|---|---|---|
access_Token | string | yes | The interface calls credentials, and the parameter is URL Parameter, non Body Parameters. usegetAccessToken orauthorizer_access_Token |
appid | string | yes | A query for a Mini Program Appid, non-service providers can only query this account when calling |
# Return Parameters
attribute | type | Introductions |
---|---|---|
Error code | number | Error code |
errmsg | string | Reasons for the Error |
completed | boolean | Whether transaction settlement management confirmation has been completed |
# Example call
# Example of request data
{
"appid": "wx0123456789abcdef"
}
# Return data example
{
"errcode": 0,
"errmsg": "ok",
"completed": true
}
# Error code
Error code | Error code values | Solutions |
---|---|---|
-1 | system error | The system is busy, so the developer is asked to try again in a few minutes. |
61003 | The service provider is not authorized | Please check whether the Mini Program has authorized 18 or 142 permissions sets. |
61004 | User IP is not authorized | Check if the caller IP is in the vendor IP whitelist. |
61011 | The service provider is not legal. | Please check access_Is the token wrong? |
40013 | Appid Illegal | Please check appid for errors |
40097 | The request parameter is illegal. | Please check that appid has been filled out |
44990 | Achieving the maximum frequency control | The system is busy, so the developer is asked to try again in a few minutes. |
# IX. Relevant Messaging
When a transaction or order is settlement generated, the WeChat server will receive messages and events from the developer server and third party platform parties. URL with POST
Ways to push relevant events. Note that you need to be connected first WeChat App Messaging Service Only then can you receive an incident.
# Type of event
Type of event | Introductions |
---|---|
trade_Manage_remind_access_api | Reminder Access Shipping Credit Management Service API |
trade_Manage_remind_shipping | Reminder that shipping information needs to be uploaded |
trade_Manage_order_settlement | Orders are to be settled or have already been settled |
# The timing of the message push
trade_Manage_remind_access_api
Events:
- When the Mini Program completes the authorization of the accounts
- When a Mini Program generates the first transaction
- A Mini Program that has generated a transaction but never shipped, once a day
trade_Manage_remind_shipping
Events:
- Once shipped small packages, when the order has not been shipped for more than 48 hours
trade_Manage_order_settlement
Events:
- When the order is completed and shipped
- When the order is settled
# Field Dxplaination
trade_Manage_remind_access_api
Dxplaination of the event field
parameter | type | Introductions |
---|---|---|
ToUserName | string | The original Mini Program ID |
FromUserName | string | Sender account (one) OpenID, in which case the sender is the system account) |
CreateTime | number | Message creation time (integer), time stamp |
MsgType | string | Message type, fixed value "event" |
Event | string | Type of event |
msg | string | Message Text Content |
trade_Manage_remind_shipping
Dxplaination of the event field
parameter | type | Introductions |
---|---|---|
ToUserName | string | The original Mini Program ID |
FromUserName | string | Sender account (one) OpenID, in which case the sender is the system account) |
CreateTime | number | Message creation time (integer), time stamp |
MsgType | string | Message type, fixed value "event" |
Event | string | Type of event |
transaction_id | string | Weixin Pay order number |
merchant_id | string | Merchant Number |
sub_merchant_id | string | Sub-merchant number |
merchant_trade_no | string | Merchant's Order Number |
pay_Time | number | Payment Success Time, Second Clock |
msg | string | Message Text Content |
trade_Manage_order_settlement
Dxplaination of the event field
parameter | type | Introductions |
---|---|---|
ToUserName | string | The original Mini Program ID |
FromUserName | string | Sender account (one) OpenID, in which case the sender is the system account) |
CreateTime | number | Message creation time (integer), time stamp |
MsgType | string | Message type, fixed value "event" |
Event | string | Type of event |
transaction_id | string | Payment Order Number |
merchant_id | string | Merchant Number |
sub_merchant_id | string | Sub-merchant number |
merchant_trade_no | string | Merchant's Order Number |
pay_Time | number | Payment Success Time, Second Clock |
shipped_Time | number | Shipping time, second-rate timestamp |
estimated_settlement_Time | number | Estimated settlement time, second time stamp. You only have this field when you push it when you ship |
confirm_receive_method | number | Confirm Shipping Method: 1. Automatically confirm delivery2. Manually confirm delivery. Only the field is pushed when settlement occurs |
confirm_receive_Time | number | Confirm delivery time, second time stamp. Only the field is pushed when settlement occurs |
settlement_Time | number | Order settlement time, second time stamp. Only the field is pushed when settlement occurs |
# X. Special shipment notification
# Features Description
The interface can be invoked to make special shipment reports for undispatched orders, which are suitable for pre-sold goods orders and test orders. Orders with a shipping time limit of more than 15 days need to be reported as pre-sold goods orders. After reporting, the user will receive a notification of the estimated shipping time. After the test order is submitted, there is no need to ship, and the funds will be automatically returned to the user within a period of time.
# Note
- Specify the order via Weixin Pay or merchant number.
- The expected shipment time of an order for pre-sold goods must be 15 days after the time of payment of the order and must not exceed 330 days.
# How to call
# HTTPS call
POST https://api.weixin.qq.com/wxa/sec/order/opspecialorder?access_token=ACCESS_TOKEN
# Third party invocation
The invocation method and entry and exit parameters are the same as HTTPS, only the calling token is different
This interface belongs to a permission set id: 142
When a service provider is authorized by one of these permissions sets, it can useauthorizer_access_TokenCall on behalf of the merchant
# Request parameters
attribute | type | Required to fill in | Introductions | |
---|---|---|---|---|
order_id | string | yes | Need special delivery report order number, can be passed into the Weixin Pay single number or merchant single number | |
type | number | yes | Special shipment reporting types, 1 for pre-sold goods orders, 2 for test orders | |
delay_to | number | no | Unix timestamp for the expected time of shipment, type 1 required, type 2 omitted |
# Return Parameters
attribute | type | Introductions |
---|---|---|
Error code | number | Error code |
errmsg | string | Reasons for the Error |
# Example call
# Example of request data
{
"order_id": "123456",
"type": 1,
"delay_to": 1752035828
}
# Return data example
{
"errcode": 0,
"errmsg": "ok"
}
# Error code
Error code | Error code values | Solutions |
---|---|---|
-1 | system error | The system is busy, so the developer is asked to try again in a few minutes. |
268546000 | Type Illegal | Please check type |
268546001 | delay_To illegal | Please check the delay_To Parameters |
268546002 | There is no such order number in the account. | Please check the number for errors |