> For the complete documentation index, see [llms.txt](https://docs.ottpay.com/payment-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ottpay.com/payment-api/api-for-mobile-browser-with-wechat/query-transaction-api.md).

# Query Transaction API

## :white\_check\_mark: **Query Transaction API**

:ballot\_box\_with\_check: **Request Message Parameters**

<table data-header-hidden><thead><tr><th width="189">Params Name</th><th width="209">Description</th><th>Required</th><th width="199">Notes</th></tr></thead><tbody><tr><td><strong>Params Name</strong></td><td><strong>Description</strong></td><td><strong>Required</strong></td><td><strong>Notes</strong></td></tr><tr><td>action</td><td>Response code</td><td>Y</td><td>STATUS_QUERY</td></tr><tr><td>version</td><td>Response message</td><td>Y</td><td>1.0</td></tr><tr><td>merchant_id</td><td>Merchant ID</td><td>Y</td><td></td></tr><tr><td>data</td><td>order_id</td><td>Order ID</td><td>Y</td></tr><tr><td>md5</td><td>Message digest</td><td>Y</td><td></td></tr></tbody></table>

:ballot\_box\_with\_check: **Request Example(JSON Data):**

```
{
    "action":"STATUS_QUERY",
    "version":"1.0",
    "merchant_id":"QC00005496",
    "data": "zTadPG0YM4gD1WOFqxg7wn3vmU20NjCnCUOOnE9mTTkxYraQDflljA8W3azYG9MuOvOyl3cZhafH+io6PiWdZCwRmi3HGa19BvT215IIxRy2HvYe0Sqs2lxshm9E4y5F1gJ7HHMTqpY0wIA4DsuWA97UC55adB2G86VbanI7B5a3kErApr5mbAoE7wcNbDJfGh4CBbSoRxQyiGZ48SvYuIW/sclT4yu6okjo6CY3xL4=",
    "md5":"6AFB2E94A70D9A208F101723700EB287"
}
```

#### :ballot\_box\_with\_check: Dat&#x61;**(JSON Data, to be encrypted):**

<table data-header-hidden><thead><tr><th width="189">Params Name</th><th width="209">Description</th><th>Required</th><th width="199">Notes</th></tr></thead><tbody><tr><td><strong>Params Name</strong></td><td><strong>Description</strong></td><td><strong>Required</strong></td><td><strong>Notes</strong></td></tr><tr><td>order_id</td><td>Order ID</td><td>Y</td><td></td></tr></tbody></table>

:ballot\_box\_with\_check: **Response Message Parameters**

| **Params Name** | **Description**  | **Required** | **Notes**                  |
| --------------- | ---------------- | ------------ | -------------------------- |
| rsp\_code       | Response code    | Y            | Please refer to Appendix B |
| rsp\_msg        | Response message | Y            |                            |
| data            | order\_status    | Order status | Y                          |
| md5             | Message digest   | Y            |                            |

#### :ballot\_box\_with\_check: Dat&#x61;**(JSON Data, to be encrypted):**

| **Params Name**  | **Description**          | **Required** | **Notes**                       |
| ---------------- | ------------------------ | ------------ | ------------------------------- |
| order\_status    | Order status             | Y            |                                 |
| trade\_time      | Transaction time         | N            |                                 |
| order\_id        | Order ID                 | N            |                                 |
| buyer\_login\_id | Buyer ID                 | N            |                                 |
| total\_amount    | Order total amount       | N            |                                 |
| receive\_amount  | Merchant receives amount | N            |                                 |
| pay\_amount      | Users pay amount         | N            |                                 |
| refund\_fee      | Refund fee               | N            | Only exist for a refunded order |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.ottpay.com/payment-api/api-for-mobile-browser-with-wechat/query-transaction-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
