# 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

IV. Query Order List

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

IX. Relevant Messaging

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

  1. 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

  2. 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.

  3. Logistics companies code, seeAcquiring capacity id List get_delivery_list

  4. 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.

  5. Split shipping is only supported using logistics courier, and a payment order can be split up to a maximum 10 A package.

  6. 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
attribute type Required to fill in Introductions
order_number_type number yes Order number type, used to confirm orders that require the upload of details. Explanatory value 1. Use the next order merchant number and the merchant side order numberEnumeration value 2, use Weixin Pay single number.
transaction_id string no The WeChat order number corresponding to the original payment transaction
mchid string no The merchant number of the payment order, generated and issued by Weixin Pay.
out_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.
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]
attribute type Required to fill in Introductions
tracking_no string no The logistics order number, which must be filled in when a logistics courier is shipped, example value: 323244567777 Character byte limit: [1, 128]
express_company string no Wuliu Company Code, Kuai Recursive Company ID, seeCheck out a list of logistics companies' codesWhen a logistics courier is shipped, it must be filled in. Example values: DHL Character byte limit: [1, 128]
item_desc string yes Product information, e.g.: WeChat hongbao pillows*One, limited to 120 words
contact object no Contact details. When the shipping logistics company is SF Express, the contact details are required. Recipient or sender contact details are preferred
attribute type Required to fill in Introductions
consignor_contact string no The sender's contact information, the sender''s contact details, is transmitted with a mask, the last 4 digits cannot be masked Example values: `189****1234, 021-****1234, ****1234, 0**2-***1234, 0**2-******23-10, ****123-8008` Value limit: 0 value 1024
receiver_contact string no Recipient contact information. Recipient contact details are transmitted using a mask and the last 4 digits cannot be masked Example values: `189****1234, 021-****1234, ****1234, 0**2-***1234, 0**2-******23-10, ****123-8008` Value limit: 0 value 1024
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
attribute type Required to fill in Introductions
Openid string yes User ID, the unique identity of the user under appid. Get the user's Openid before placing an order Example values: oUpF8uMuAJO_M2pxb1Q9zNjWeS6o Character byte limit: [1, 128]

# 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

  1. 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

  2. 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.

  3. Logistics companies code, seeAcquiring capacity id List get_delivery_list

  4. 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.

  5. Split shipping is only supported using logistics courier, and a payment order can be split up to a maximum 10 A package.

  6. 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
attribute type Required to fill in Introductions
order_number_type number yes Order number type, used to confirm orders that require the upload of details. Explanatory value 1. Use the next order merchant number and the merchant side order numberEnumeration value 2, use Weixin Pay single number.
transaction_id string no The WeChat order number corresponding to the original payment transaction
mchid string no The merchant number of the payment order, generated and issued by Weixin Pay.
out_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.
sub_orders array< object> no Sub-List Logistics Details
attribute type Required to fill in Introductions
order_key object yes Sub-orders that need to upload logistics details, the order type is consistent with a contract order
attribute type Required to fill in Introductions
order_number_type number yes Order number type, used to confirm orders that require the upload of details
transaction_id string no The WeChat order number corresponding to the original payment transaction
mchid string no The merchant number of the payment order, generated and issued by Weixin Pay.
out_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.
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> no List of Sub-List Logistical Information Multipleness: [1, 10]
attribute type Required to fill in Introductions
tracking_no string no The logistics order number, which must be filled in when a logistics courier is shipped, example value: 323244567777 Character byte limit: [1, 128]
express_company string no Wuliu Company Code, Kuai Recursive Company ID, seeCheck out a list of logistics companies' codes.. must be filled in when a logistics courier is shipped. Example value: DHL Character byte limit: [1, 128]
item_desc string yes Product information, e.g.: WeChat hongbao pillows*One, limited to 120 words
contact object no Contact details. When the shipping logistics company is SF Express, the contact details are required. Recipient or sender contact details are preferred
attribute type Required to fill in Introductions
consignor_contact string no The sender's contact information, the sender''s contact details, is transmitted with a mask, the last 4 digits cannot be masked Example values: `189****1234, 021-****1234, ****1234, 0**2-***1234, 0**2-******23-10, ****123-8008` Value limit: 0 value 1024
receiver_contact string no Recipient contact information. Recipient contact details are transmitted using a mask and the last 4 digits cannot be masked Example values: `189****1234, 021-****1234, ****1234, 0**2-***1234, 0**2-******23-10, ****123-8008` Value limit: 0 value 1024
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
attribute type Required to fill in Introductions
Openid string yes User ID, the unique identity of the user under the merchant APPID. Get the user's Openid before placing an order Example values: oUpF8uMuAJO_M2pxb1Q9zNjWeS6o Character byte limit: [1, 128]

# 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.
attribute type Introductions
transaction_id string The WeChat order number corresponding to the original payment transaction.
merchant_id string The merchant number of the payment order, generated and issued by Weixin Pay.
sub_merchant_id string Secondary merchant number.
merchant_trade_no string 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.
description string All descriptions of goods of the bill of payment connected by a semicolon are automatically intercepted when they exceed 120 words and are then added “...” The end.
paid_amount number Statement of payment Actual amount paid, in whole form, in units: installments.
Openid string Payers openid.
trade_create_Time number Transaction creation time, in the form of timestamp.
pay_Time number Payment time, in timestamp form.
order_state number 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.
in_complaint boolean Are you in a transaction dispute?
shipping object Shipping information.
attribute type Introductions
delivery_mode number Shipping mode, shipping mode enumeration value: 1, UNIFIED_DELIVERY (unified delivery) 2. SPLIT_DELIVERY (split delivery) Example values: UNIFIED_DELIVERY
logistics_type number 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
finish_shipping boolean Have all shipments been completed?
goods_desc string Enter a description of the item in the item's shipping information entry page in the Mini Program's background.
finish_shipping_count number Number of times a full shipment has been completed, when not completed 0, when completed 1, Re-shipment and completion: 2。
shipping_list array< object> Logistics information list, shipping logistics list, supports two modes of unified shipping (single logistics list) and split shipping (multiple logistics list).
attribute type Introductions
tracking_no string Logistics order number, example value: "323244567777"。
express_company string City distribution company name or Wuliu company code, quick return company ID, seeCheck out a list of logistics companies' codes Example values: "DHL"。
goods_desc string Use uploading logistics information API The description of the goods entered for this logistics information.
upload_Time number When the logistics information was uploaded, in timestamp form.
contact object Contact details.
attribute type Introductions
consignor_contact string The sender's contact information.
receiver_contact string Contact information for the recipient.

# 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.
attribute type Required to fill in Introductions
Begin_Time number no The starting time, in the form of a time stamp, is deemed to start at 0 if not filled in.
end_Time number no End date (inclusive), in timestamp form, without which the maximum value of a 32-bit unsigned integer is considered.
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.
attribute type Introductions
transaction_id string The WeChat order number corresponding to the original payment transaction.
merchant_id string The merchant number of the payment order, generated and issued by Weixin Pay.
sub_merchant_id string Secondary merchant number.
merchant_trade_no string 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.
description string All descriptions of goods of the bill of payment connected by a semicolon are automatically intercepted when they exceed 120 words and are then added “...” The end.
paid_amount number Statement of payment Actual amount paid, in whole form, in units: installments.
Openid string Payers openid.
trade_create_Time number Transaction creation time, in the form of timestamp.
pay_Time number Payment time, in timestamp form.
order_state number 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.
in_complaint boolean Are you in a transaction dispute?
shipping object Shipping information.
attribute type Introductions
delivery_mode number Shipping mode, shipping mode enumeration value: 1, UNIFIED_DELIVERY (unified delivery) 2. SPLIT_DELIVERY (split delivery) Example values: UNIFIED_DELIVERY
logistics_type number 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
finish_shipping boolean Have all shipments been completed?
goods_desc string Enter a description of the item in the item's shipping information entry page in the Mini Program's background.
finish_shipping_count number Number of times a full shipment has been completed, when not completed 0, when completed 1, Re-shipment and completion: 2。
shipping_list array< object> Logistics information list, shipping logistics list, supports two modes of unified shipping (single logistics list) and split shipping (multiple logistics list).
attribute type Introductions
tracking_no string Logistics order number, example value: "323244567777"。
express_company string City distribution company name or Wuliu company code, quick return company ID, seeCheck out a list of logistics companies' codes Example values: "DHL"。
goods_desc string Use uploading logistics information API The description of the goods entered for this logistics information.
upload_Time number When the logistics information was uploaded, in timestamp form.
contact object Contact details.
attribute type Introductions
consignor_contact string The sender's contact information.
receiver_contact string Contact information for the recipient.

# 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

  1. Specify an order by transaction number or merchant number + merchant number.
  2. Reminders can only be made when the type of logistics is a logistics courier.
  3. 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

  1. 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.

  2. 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.

  3. 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

  1. Specify the order via Weixin Pay or merchant number.
  2. 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