# Synchronize order payment results

# Interface call request specification

If action_Type = 1, that is, after payment successfully invoked the interface, the order status status will change from 10 (pending payment) or 11 (checkout completion) to 20 (pending delivery).

Otherwise, the order status changes from 10 (pending payment) to 250 (canceled)

If the order status is not 10 (pending payment), an error will be reported, the error code is 100000.

transaction_idRequired in the following cases:

action_type=1andorder/Add whenPassablepay_method_type=0(Default 0)When required

Http request method: POST
https://api.weixin.qq.com/shop/order/pay?access_Token = xxxxxxxxx

# Request Parameter Sample

    "out_order_id": 'xxxxx';
    "openid": "oTVP50O53a7jgmawAmxKukNlq3XI",
    "action_type": 1, 
    "transaction_id": "131456479687",     
    "pay_time": "2020-03-25 14:04:25"     

# Return Package Example

    "errcode": 0,

# Request Parameter Dxplaination

parameter type Required Required Introductions
order_id number(uint64) no Order ID
out_order_id string no Merchant custom order ID, and order_id Either way,
openid string yes User's openid
action_type number yes Type, default 1: payment succeeds, 2: payment fails, 3: user cancels, 4: overtime not paid5: Businesses canceled10: Other Reasons Cancelled
action_remark string no Other specific reasons
transaction_id string no Payment order number, action_type=1且order/Pay when you add_method_Required when type = 0
pay_time string no Payment completion time_Required when type = 1, yyyy-MM-dd HH: mm: SS

# Return parameter specification

parameter type Introductions
Errcode number Error code
errmsg string Error message