> For the complete documentation index, see [llms.txt](https://api.vietqr.vn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api.vietqr.vn/korea/vietqr-xin-chao/api-nang-cao/api-host-to-device-mqtts/mqtt-tra-cuu-thong-tin-giao-dich.md).

# MQTT Tra Cứu Thông Tin Giao Dịch

### <mark style="color:green;">`MQTT`</mark> Request Check Transaction <a href="#get-token" id="get-token"></a>

```
mqtt://<vietqr-port>/vietqr/request-status/{terminalCode}
```

**Message**

<table><thead><tr><th width="171">Param</th><th width="110">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>bankAccount</code></td><td>String</td><td>Số tài khoản nhận tiền</td></tr><tr><td><code>type</code></td><td>int</td><td>Loại kiểm tra (0: kiểm tra theo OrderId, 1: kiểm tra theo ReferenceNumber).</td></tr><tr><td><code>value</code></td><td>String</td><td>Giá trị cần kiểm tra (OrderId hoặc referenceNumber)</td></tr><tr><td><code>checkSum</code></td><td>String</td><td>Mã kiểm tra bảo mật được tạo từ bankAccount và userBankName.</td></tr></tbody></table>

**Note**&#x20;

{% hint style="success" %}
&#x20;"***checkSum***" sẽ do bên khách hàng cung cấp .

\- Kết hợp bankAccount và userBankName thành một chuỗi duy nhất

\- Mã hóa chuỗi đó bằng thuật toán MD5.

\- Mã MD5 sẽ được sử dụng làm ***checksum***.
{% endhint %}

### Code mẫu

{% tabs %}
{% tab title="Message" %}

```
{
  "bankAccount": "1234567890",
  "type": 0,
  "value": "ORD98765XYZ",
  "checkSum": "abc1234567890def1234567890abcdef"
}
```

{% endtab %}
{% endtabs %}

***


---

# 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://api.vietqr.vn/korea/vietqr-xin-chao/api-nang-cao/api-host-to-device-mqtts/mqtt-tra-cuu-thong-tin-giao-dich.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.
