# MQTT Phản Hồi Tra Cứu Thông Tin

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

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

**Message**

<table><thead><tr><th width="204">Param</th><th width="113">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>referenceNumber</code></td><td>String</td><td>Mã tham chiếu giao dịch</td></tr><tr><td><code>orderId</code></td><td>String</td><td>Mã đơn hàng.</td></tr><tr><td><code>amount</code></td><td>Long</td><td>Số tiền giao dịch</td></tr><tr><td><code>content</code></td><td>String</td><td>Nội dung giao dịch</td></tr><tr><td><code>transType</code></td><td>String</td><td>Số tiền giao dịch</td></tr><tr><td><code>status</code></td><td>int</td><td>Trạng thái giao dịch</td></tr><tr><td><code>type</code></td><td>int</td><td>Loại kiểm tra</td></tr><tr><td><code>timeCreated</code></td><td>Long</td><td>Thời gian tạo giao dịch</td></tr><tr><td><code>timePaid</code></td><td>Long</td><td>Thời gian thanh toán giao dịch</td></tr><tr><td><code>terminalCode</code></td><td>String</td><td>Mã điểm bán hoặc mã cửa hàng</td></tr><tr><td><code>note</code></td><td>String</td><td>Ghi chú</td></tr><tr><td><code>refundCount</code></td><td>int</td><td>Số lần hoàn tiền</td></tr><tr><td><code>amountRefunded</code></td><td>int</td><td>Số tiền đã hoàn lại</td></tr></tbody></table>

**Note**&#x20;

{% hint style="info" %}
**status**:

* 0: Giao dịch đang chờ thanh toán
* 1: Giao dịch thành công
* 2: Giao dịch đã hủy
  {% endhint %}

{% hint style="info" %}
**type**:

* 0: Kiểm tra theo Mã đơn hàng
* 1: Kiểm tra theo Mã tham chiếu giao dịch
  {% endhint %}

{% hint style="info" %}
**transType**:

* "C": Giao dịch đến
* "D": Giao dịch đi
  {% endhint %}

### Code mẫu

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

```
{
  "referenceNumber": "TXN123456789012",
  "orderId": "ORD98765XYZ",
  "amount": 25000,
  "content": "SampleProductPurchase",
  "transType": "C",
  "status": 1,
  "type": 0,
  "timeCreated": 1623039658,
  "timePaid": 1623039685,
  "terminalCode": "",
  "note": "",
  "refundCount": 0,
  "amountRefunded": 0
}
```

{% endtab %}
{% endtabs %}

***


---

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