> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pay247.io/llms.txt
> Use this file to discover all available pages before exploring further.

# 查询订单

### 支付流程图

<img src="https://mintcdn.com/gopay/sF8dw_ucY0cv3ekq/api-reference/cn/images/payin.png?fit=max&auto=format&n=sF8dw_ucY0cv3ekq&q=85&s=2a402a7c27636eb9b956f3af0bb62a7b" alt="支付流程" width="3670" height="1804" data-path="api-reference/cn/images/payin.png" />

### 请求URL

* `https://gateway.pay247.io/gateway/payin/create`

### 请求URL

* `https://gateway.pay247.io/gateway/payin/query`

### 请求方式

* POST

### 请求参数

| 参数名            | 必选 | 类型     | 说明                                         |
| :------------- | :- | :----- | ------------------------------------------ |
| mch\_id        | 是  | string | 商户号                                        |
| mch\_order\_no | 是  | string | 商户订单号                                      |
| timestamp      | 是  | string | unix时间戳                                    |
| version        | 是  | string | 接口版本: v3.0                                 |
| uuid           | 是  | string | 请求ID: 550e8400-e29b-41d4-a716-446655440000 |
| sign           | 是  | string | 最后追加的签名                                    |

### 响应参数：

| 参数名            | 必选 | 类型     | 说明                                                                                                      |
| :------------- | :- | :----- | ------------------------------------------------------------------------------------------------------- |
| mch\_order\_no | 是  | string | 商户订单号                                                                                                   |
| order\_no      | 是  | string | 系统订单号                                                                                                   |
| utr            | 是  | string | 支付机构订单号                                                                                                 |
| currency       | 是  | string | 订单币种                                                                                                    |
| pay\_method    | 是  | string | 支付方式                                                                                                    |
| pay\_theme     | 否  | string | 支付主题，收银台/自定义json                                                                                        |
| amount         | 是  | string | 订单金额                                                                                                    |
| actual\_amount | 是  | string | 实际支付金额                                                                                                  |
| fee            | 是  | string | 手续费                                                                                                     |
| pay\_url       | 是  | string | 支付链接                                                                                                    |
| status         | 是  | string | 支付状态  PENDING：等待支付； DEALING：处理中；CLOSED：订单超时关闭； SUCCESS：转账成功；FAIL：失败； REFUND 退款；UNDERPAID 少付，OVERPAID：多付 |

### 返回示例

```
{
	"code": 0,
	"message": "Success",
	"timestamp": 1594099906123,
	"uuid": "7eb3c9e-5a1d-4a19-be2a-c80eac39830a",
	"data": {
		"mch_id": "MCH12345678",
		"mch_order_no": "Test20200707042747519753974848",
		"order_no": "P20200707042747519753974832",
		"currency": "USD",
		"amount": "99.11",
		"actual_amount": "99.00",
		"pay_method": "BANK",
		"pay_theme": "link",
		"fee": "1.99",
		"pay_url": "https://pay.xxx.com/link/DyDpCjDfkr",
		"status": "SUCCESS"
	}
}
```
