# 订单查询

#### 请求URL

* `https://newapi.mbd.pub/release/main/search_order`

#### 请求方式

* POST
* Json

#### 请求参数

| **参数名**        | **必选** | **类型** | **说明**                                   |
| -------------- | ------ | ------ | ---------------------------------------- |
| out\_trade\_no | 是      | string | 订单号（也支持微信/支付宝流水号）                        |
| app\_id        | 是      | string | 你的 app\_id，可在控制台查看                       |
| sign           | 是      | string | 请求签名，参照[签名算法](/api/qian-ming-suan-fa.md) |

#### 返回示例

```
//成功
{
  "order_id": "36b4272290745783269904952a40d6d1",
  "charge_id": "4002110000491201231021102123",
  "description": "突字幕高级版",
  "share_id": null,
  "share_state": "0",
  "amount": "12900",
  "state": "1",
  "create_time": "1615479215",
  "payway": "1",
  "refund_state": "0",
  "refund_amount": "0"
  
}

//失败
{
    "error": "找不到该订单"
}
```

#### 返回参数说明

| **参数名**        | **类型** | **说明**                                                  |
| -------------- | ------ | ------------------------------------------------------- |
| order\_id      | string | 订单号                                                     |
| charge\_id     | string | 支付渠道流水号                                                 |
| description    | string | 商品描述                                                    |
| share\_id      | string | 结算ID                                                    |
| share\_state   | int    | 结算状态                                                    |
| amount         | int    | 支付金额，单位为分                                               |
| state          | int    | 支付状态，0-未支付，1-已支付，2-已结算，3-投诉中，4-投诉完结，5-投诉超时，6-投诉中(买家处理中) |
| create\_time   | int    | 支付时间（时间戳）                                               |
| payway         | int    | 支付渠道，1为微信支付，2为支付宝                                       |
| refund\_state  | int    | 退款状态，0为无退款，1为部分退款，2为全部退款                                |
| refund\_amount | int    | 已退款金额，单位为分                                              |
| plusinfo       | string | 附加参数（json格式）                                            |

#### 备注

* 此接口用于订单的辅助查询，请勿直接使用此接口做订单状态的高频轮询，调用频率过高可能会导致IP进入黑名单
* 正确的业务逻辑：通过接收异步通知后更新自己订单状态，用户前端轮询应放在商户侧订单状态


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.mbd.pub/api/ding-dan-cha-xun.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
