# 5.2 Query Order

## 1. Overview <a href="#id-1overview" id="id-1overview"></a>

Use this API to inquire about the transaction status and other information about a previously submitted payment request.

## 2. Request Info <a href="#id-2request-info" id="id-2request-info"></a>

* **Method:** post
* **Path:** <https://prod-openapi-v2.newpay.la/beta/pay/uniQueryPay>

### **2.1 Request Header** <a href="#id-21-request-header" id="id-21-request-header"></a>

| Key          | Value            |
| ------------ | ---------------- |
| Content-Type | application/json |

### **2.2 Request Data** <a href="#id-22-request-data" id="id-22-request-data"></a>

| Name          | Description                                                                                                | Type   | Required |
| ------------- | ---------------------------------------------------------------------------------------------------------- | ------ | -------- |
| appId         | Unique identifier assigned to a third-party application platform                                           | string | true     |
| mchId         | Unique identifier assigned to a third-party merchant                                                       | string | true     |
| newpayOrderNo | Order number generated in NewPay                                                                           | string | false    |
| mchOrderNo    | Order number in third-party merchant                                                                       | string | false    |
| sign          | [Data signature](https://newpay-api-document.gitbook.io/newpay-api-document/8.-signature-and-verification) | string | true     |

{% hint style="info" %}
Although both `newpayOrderNo` and `mchOrderNo` are optional, **at least one of them must be provided.**
{% endhint %}

### **2.3 Response Data** <a href="#id-23-response-data" id="id-23-response-data"></a>

| Name               | Description                                                                                                                                                                                                                     | Type    |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| success            | Success flag: true/false                                                                                                                                                                                                        | boolean |
| message            | Response message                                                                                                                                                                                                                | string  |
| code               | [Reponse code](https://newpay-api-document.gitbook.io/newpay-api-document/9.-business-code#response-code)                                                                                                                       | string  |
| timestamp          | Response timestamp                                                                                                                                                                                                              | long    |
| data               | Result                                                                                                                                                                                                                          | object  |
| > appId            | Unique identifier assigned to a third-party application platform                                                                                                                                                                | string  |
| > payStatus        | SUCCESS/EXPIRED/PROCESSING/FAIL                                                                                                                                                                                                 | string  |
| > payMethod        | <p>Payment method: <br>1.Wechat; <br>11.Alipay+;</p>                                                                                                                                                                            | int     |
| > orderType        | <p><em>STATIC\_CODE:</em> 静态收款码</p><p><em>DYNAMIC\_CODE:</em>动态收款码</p><p><em>MICRO\_CODE:</em>扫码收款(反扫)</p><p><em>MINI\_APP:微信</em>小程序</p><p><em>APP:</em>线上APP</p><p><em>ONLINE:</em>线上支付</p><p><em>AUTO\_DEBIT:</em>线上自动扣款</p> | string  |
| > orderAmt         | Payment amount                                                                                                                                                                                                                  | json    |
| >> value           | amount                                                                                                                                                                                                                          | string  |
| >> currency        | <p>CNY: 人民币<br>USD: 美元<br>LAK: 老挝币</p>                                                                                                                                                                                          | string  |
| > mchOrderNo       | Order number in third party mechant.                                                                                                                                                                                            | string  |
| > newpayOrderNo    | NewPay order number                                                                                                                                                                                                             | string  |
| > subject          | Commodity title                                                                                                                                                                                                                 | string  |
| > settlementStatus | <p>Settlement status: <br>0: No settlement;<br>1: In settlement;</p><p>2: Have already settled</p>                                                                                                                              | int     |
| > paytime          | payment timestamp                                                                                                                                                                                                               | long    |
| > attach           | Third party order supplementary fields                                                                                                                                                                                          | string  |
| > sign             | Data signature                                                                                                                                                                                                                  | string  |
