> 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/retail-api/query-transaction-api.md).

# Query Transaction API

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

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

| **Params Name** | **Description**  | **Required** | **Notes**     |   |
| --------------- | ---------------- | ------------ | ------------- | - |
| action          | Response code    | Y            | STATUS\_QUERY |   |
| version         | Response message | Y            | 1.0           |   |
| merchant\_id    | Merchant ID      | Y            |               |   |
| data            | order\_id        | Order ID     | Y             |   |
| md5             | Message digest   | Y            |               |   |

: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                               |
| trade\_time      | Transaction time        | N            |                                 |
| order\_id        | Order ID                | N            |                                 |
| buyer\_login\_id | Buyer ID                | N            |                                 |
| total\_amount    | Order total amount      | N            | String, "100" for  1.00 dollar  |
| receive\_amount  | Merchant receive amount | N            | String, "100" for  1.00 dollar  |
| pay\_amount      | User pay amount         | N            | String, "100" for  1.00 dollar  |
| refund\_fee      | Refund fee              | N            | Only exist for a refunded order |
| md5              | Message digest          | Y            |                                 |


---

# 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:

```
GET https://docs.ottpay.com/payment-api/retail-api/query-transaction-api.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.
