# Get order details

# Dxplaination of Interface Call Request

You can search for business order details, payment order details, and payment order status by payment order number or external order number.

http请求方式:POST
https://api.weixin.qq.com/shop/order/get?access_token=xxxxxxxxx

# Request parameters

{
    "order_id": 3302968738502279424,
    "out_order_id": "***************",
    "openid": "oTVP50O53a7jgmawAmxKukNlq3XI"
}

# Examples of back-up

{
    "errcode": 0,
    "errmsg": "ok",
    "order": {
        "order_id": 3302968738502279424,
        "out_order_id": "***************",
        "status": 20,
        "path": "/pages/order.html?out_order_id=xxxxx",
        "default_receiving_address": {
            "city": "广州市",
            "country": "中国",
            "detailed_address": "龙洞250号",
            "province": "广东省",
            "receiver_name": "我爱我家",
            "tel_number": "18712345678",
            "town": "温柔乡"
        },
        "order_detail": {
            "promotion_info": {
                "promoter_id": "PROMOTER_ID",
                "finder_nickname": "FINDER_NICKNAME",
                "sharer_openid": "SHARER_OPENID"
            },
            "product_infos": [
                {
                    "out_product_id": "12345",
                    "out_sku_id": "23456",
                    "product_cnt": 10,
                    "sale_price": 200,
                    "path": "pages/productDetail/productDetail?productId=2176180",
                    "title": "标题",
                    "head_img": "http://img10.360buyimg.com/n1/s450x450_jfs/t1/85865/39/13611/488083/5e590a40E4bdf69c0/55c9bf645ea2b727.jpg",
                    "real_price": 200
                }
            ],
            "pay_info": {
                "pay_method": "微信支付",
                "prepay_id": "42526234625",
                "prepay_time": "2020-03-25 14:04:25",
                "transaction_id": "131456479687",
                "pay_time": "2020-03-25 14:05:25",
                "pay_method_type": 0
            },
            "price_info": {
                "order_price": 1600,
                "freight": 500,
                "discounted_price": 1000,
                "additional_price": 100,
                "additional_remarks": "税费"
            },
            "delivery_detail": {
                "delivery_type": 1,
                "finish_all_delivery": 1,
                "delivery_list": [
                    {
                        "waybill_id": "SFXXXX",
                        "delivery_id": "SF",
                    }
                ]
            }
        }
    }
}

# Dxplaination of request parameters

parameter type Is it necessary? Introductions
order_id number(uint64) no WeChat Side order id (order id choose one)
out_order_id string no Merchant custom order ID (order ID two choose one)
openid string yes User's openid

# Dxplaination of callback parameters

Field Name type Introductions
errcode number Error code
errmsg string Error message
data Order Order Information

# Order

Field Name type Introductions
create_time string Create time, yyyy-MM-dd HH: mm: ss, and WeChat server must not exceed 5 seconds
out_order_id string Merchant custom order ID (character set including upper and lower case subtitles, less than 128 characters long)
openid string User's openid
scene number Order Weixin Mini Program Scene Value
order_detail OrderDetail Order details
delivery_detail DeliveryDetail Shipping Information
status number Condition of product
path string Order Details Page Path
address_info AddressInfo Address Information
settlement_info SettlementInfo Order funds settlement information
refund_info RefundInfo Order refund information
related_aftersale_info RelatedAfterSaleInfo After sales order information
fund_type number Order Type: 0, General Order, 2, Secondary Merchant Order
expire_time number Second-level timestamp, the order timeout time, get the payment parameter will use this time as the prepay_id expiration time;When the time expires, WeChat will cancel the order over time (status = 181)
aftersale_duration number How long after confirmation of receipt is prohibited to initiate after-sales, unit: days, need > = 5 days, default = 5 days
promotion_info PromotionInfo Extension and Sharing Information
default_receiving_address AddressInfo Default Return Address
commission_info CommissionInfo Account assignment information
receive_time number Confirm receipt time, second timestamp, fund_type = 1 and exist after confirm receipt

# OrderDetail

Field Name type Introductions
product_infos OrderProductInfo[] List of Products
price_info PriceInfo Price Information
pay_info PayInfo Payment Information

# DeliveryDetail

Field Name type Introductions
delivery_type enum 1: Standard courier delivery, 2: No need for courier delivery, 3: Offline delivery, 4: Pickup by the user; at present, the WeChat Channels scenario only supports 1, standard courier delivery.
finish_all_delivery number Is the shipment complete?
delivery_list DeliveryInfo[] Logistics Information
delivery_list[].delivery_id string Quick-recursive company ID, obtained by getting the Quick-recursive company list
delivery_list[].waybill_id string Tracking number
delivery_list[].product_info_list DeliveryProduct[] Product Information
delivery_list[].product_info_list[].out_product_id string Merchant side spuid
delivery_list[].product_info_list[].out_sku_id string Merchant side skuid

# RelatedAftersaleInfo

Field Name type Introductions
aftersale_list RelatedAfterSale[] After sales order information
aftersale_list[].aftersale_id number WeChat Side aftermarket single id
aftersale_list[].out_aftersale_id string Merchant side after-sales single id

# PayInfo

Field Name type Introductions
pay_method_type number 0: WeChat Pay (currently only Weixin Pay)
prepay_id string Prepaid ID
prepay_time string Prepayment time (time to get prepay_id)
transaction_id string WeChat payment stream number
pay_time string Payment time, yyyy-MM-dd HH: mm: ss
promotion_detail_info PromotionDetailInfo WeChat Payment Voucher Information

# PromotionDetailInfo

Field Name type Introductions
promotion_detail_list PromotionDetail[] yes

# PromotionDetail

Field Name type Introductions
coupon_id string 券ID
name string Offer Name
scope string 优惠范围

GLOBAL:全场代金券

SINGLE:单品优惠
type string 优惠类型:

CASH:充值型代金券

NOCASH:免充值型代金券
amount number Coupon Amount
stock_id string Activity ID
wechatpay_contribute number WeChat Contribution
merchant_contribute number Merchants contribute
other_contribute numver Other contributions
goods_detail GoodsDetail[] Item List Information

# GoodsDetail

Field Name type Introductions
goods_id string Product Codes
quantity number Quantity of goods
unit_price number Unit price of commodities
discount_amount number Item Offer Amount
goods_reamark string Merchandise Notes

# OrderProductInfo

Field Name type Introductions
product_id number Commodity spuid
out_product_id string External goodspuid
sku_id number Product skuid
out_sku_id string External product skuid
product_cnt number Number of goods
sale_price number The sale price (in units of cents) of an item at the time of the creation of an order may not be consistent with the price of the item uploaded to the item interface
sku_real_price number SKU total paid price
title string The title of the item at the time of the order is generated
head_img string Headmap of the item at the time of creation of the order
path string Bound Weixin Mini Program product path

# AddressInfo

Field Name type Introductions
receiver_name string Name of the recipient
detailed_address string Detailed shipping address information
tel_number string Recipient's mobile phone number
country string country
province string province
city string city
town string Township

# PriceInfo

Field Name type Introductions
freight number freight
discounted_price number Discount Fees
additional_price number Other costs
additional_remarks string Additional cost explaination
order_price number Total order price

# PromotionInfo

Field Name type Introductions
promoter_id string Unique Promoter ID
promoter_openid string OpenID (abandoned, do not use)
finder_nickname string Username for the WeChat Channels of the promoter
sharer_openid string Sharer openid

# SettlementInfo

Field Name type Introductions
settlement_list SettlementRecord[] List of Settlements
handing_fee number Final payment charged in settlement
settle_status number Merchant settlement status, enumeration values see settle_status
settle_time string Merchant settlement time
settle_abnormal_reason string Cause of unusual settlement

# SettlementRecord

Field Name type Introductions
type number Ledger type, see settlement_type for enumeration values
amount number Amount, in units
settle_no string The bill number segmented by the WeChat Channels system
settle_id string WeChat payment system ledger number
create_time string When the accounts were created
finish_time string Payment completion time
result string The result of splitting accounts, the enumeration value is shown in settlement_result
fail_reason string Reasons for the failure of the reconciliation
is_finished number Was the accounting completed, 0: Not completed, 1: Completed

# RefundInfo

Field Name type Introductions
refund_list RefundRecord[] List of refunds

# RefundRecord

Field Name type Introductions
type number Refund Type, 1: After Sale Refund
amount number Amount, in units
refund_no string WeChat Channels system refund order number
refund_id string WeChat Payment System Refund Number
create_time string When the accounts were created
finish_time string Payment completion time
result string Refund result, see result_result for enumeration value
fail_reason string Reasons for the failure of the reconciliation

# CommissionInfo

Field Name type Introductions
commission_list CommissionRecord[] List of billings

# CommissionRecord

Field Name type Introductions
mchid string Merchant Number
account_type number Account Type, 0: Merchant
out_product_id string External goodspuid
out_sku_id string External product skuid
amount number Amounts divided, in units
commission_type number Payment Type, 1: Servicer, currently only supports 1

# status enum

The enumeration value describe
10 Payment to be made
11 Cash register payment is completed (automated transfer and treated equally to 10 for merchants)
20 Pending shipment (i.e. payment is completed)
21 Part of shipment
30 To be received
100 complete
181 Cancellation without payment over time
200 Cancel all items after they are sold.
250 User Cancels

# settle_status enum

The enumeration value describe
1 To be settled
2 Settled
3 It is closed.
4 A transactional anomaly

# settlement_type enum

The enumeration value describe
0 merchant
1 Service providers

# settlement_result enum

The enumeration value describe
PENDING To be divided up.
SUCCESS The accounting was successful.
CLOSED It is closed.

# refund_result enum

The enumeration value describe
SUCCESS The refund was successful
CLOSE Refund closed
PROCESSING Refund processing is in progress
ABNORMAL Unusual refunds