# Weixin Mini Program Shopping Order
# I. Weixin Mini Program Order management
Weixin Mini Program The order management function is designed to establish a global physical e-commerce order retrieval portal for WeChat users. Help users view and manage shopping orders in the Mini Program, solve problems that are difficult to retrieve when they want to pay attention to the order status, and improve the overall experience of users shopping in Mini Programs.
# II. Core functions
# 2.1 Order display function
After opening this capability in Weixin Mini Program, you can realize that after completing the Mini Program order, You can view the order list and transaction order details page information (payment time, payment amount, refund amount, transaction number), manage orders and other complete order center management functions through "I - Orders & Card Packages - Small Shopping Orders."At the same time, merchants can also pass accurate descriptions of goods to the Mini Program back office through the interface provided by WeChat payments and display them on the Mini Program shopping order list and on the order details page.
# 2.1.1 Functional introduction
- Weixin Mini Program Complete capability of post-trade order management center
- The order is automatically synchronized to the display information in the user side "I - Order and Card Package - Weixin Mini Program Shopping Order"
# 2.2 Order logistics information
After Weixin Mini Program activates the shipping information management service, the specific logistics information (logistics status, shipping time, mailing address, logistics company, logistics order number) of the order can be displayed in "I - Orders & Card Packages - Small Shopping Orders." Refer to Mini Programs Delivery Management Information Service
# 2.3 Order jump adaptation capability and display of product details implementation logic
# 2.3.1 Functional introduction
Both the order list and the order details page displayed in the Weixin Mini Program Shopping Orders page allow users to jump directly to the order details display page in the Mini Program by clicking the resident button "Go to the Mini Program,"Establish a direct connection between the "Weixin Mini Program shopping order" interface and the Weixin Mini Program;"Mini Programs Shopping Order" allows developers to pass in product descriptions through the WeChat payment interface and display them in the order list and order details page.
# 2.3.2 Implementation Description
WeChat will use the description and out_trade_no fields you entered in Weixin Pay JSPI interface for the presentation and jump of "Weixin Mini Program purchase order":
- Description will be displayed to the user as an item description in the "Weixin Mini Program Shopping Order"
- Out_trade_no is used to go to the Mini Program from the "Weixin Mini Program" shopping order, and the developer needs to configure the jump rules in the Mini Program management background, such as "index / orderDetail?"Id = ${product order number} & channel = 1 "
# 2.3.3 Example Description
# III. Interfaces
# 3.1 Configure Order Details Path
# Features Description
Calling this interface can configure the order details path, which is used for "I - orders and card packages - Weixin Mini Program shopping orders" to the Mini Program jump.
# Note
- The order center authorization agreement needs to be signed before invoking the interface.
- Make sure that the configured path jumps to Weixin Mini Program properly and that the path contains the character string "${order number}."
# How to call
# HTTPS calls
POST https://api.weixin.qq.com/wxa/sec/order/update_order_detail_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
The permission set to which this interface belongs is id: 182
Once authorized by one of the permission sets, a service provider can make a call on behalf of the merchant using authorizer_access_token
# Request parameters
attribute | type | Required to fill in | Introductions | |
---|---|---|---|---|
path | string | yes | Order details path |
# Return Parameters
attribute | type | Introductions |
---|---|---|
errcode | number | Error code |
errmsg | string | Reasons for the Error |
# Example call
# Example of request data
{
"path": "pages/index/index?id=${商品订单号}"
}
# 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. |
10060012 | The system is busy, so the developer is asked to try again in a few minutes. | |
10060034 | Please confirm whether the order center authorization agreement has been signed | |
10060035 | Please check if the path is incorrect. | |
10060036 | Request Please use UTF-8 code |
# 3.2 Query Order Details Path
# Features Description
Call this interface to query the configured order details path.
# Note
If the order details path has not been configured, it will return success, where the path is ".
# How to call
# HTTPS calls
POST https://api.weixin.qq.com/wxa/sec/order/get_order_detail_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
The permission set to which this interface belongs is id: 182
Once authorized by one of the permission sets, a service provider can make a call on behalf of the merchant using authorizer_access_token
# Return Parameters
attribute | type | Introductions |
---|---|---|
errcode | number | Error code |
errmsg | string | Reasons for the Error |
path | string | Order details path |
# Example call
# Example of request data
{
}
# Return data example
{
"errcode": 0,
"errmsg": "ok",
"path": "pages/index/index?id=${商品订单号}"
}
# 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. |
10060012 | The system is busy, so the developer is asked to try again in a few minutes. |