> 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/vi/cac-dich-vu-api-khac/api-host-to-device-mqtts/mqtt-nhan-bien-dong-so-du.md).

# MQTT Nhận Biến Động Số Dư

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

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

**Message**

<table><thead><tr><th width="207">Param</th><th width="131">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>amount</code></td><td>Long</td><td>Số tiền nhận</td></tr><tr><td><code>transType</code></td><td>String</td><td>Loại giao dịch</td></tr><tr><td><code>referenceNumber</code></td><td>String</td><td>Mã tham chiếu</td></tr><tr><td><code>orderId</code></td><td>String</td><td>Mã đơn hàng</td></tr><tr><td><code>content</code></td><td>String</td><td>Nội dung chuyển tiền</td></tr><tr><td><code>status</code></td><td>String</td><td>Trạng thái chuyển tiền</td></tr><tr><td><code>timePaid</code></td><td>String</td><td>Thời gian thanh toán</td></tr></tbody></table>

### Code mẫu

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

```
{
  "bankAccount": "9876543210",
  "amount": 25000.0,
  "timePaid": "01/09/2024 14:30:00",
  "transType": "C",
  "referenceNumber": "TXN876543210123",
  "content": "SampleTransaction Payment",
  "status": 1
}
```

{% 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:

```
GET https://api.vietqr.vn/vi/cac-dich-vu-api-khac/api-host-to-device-mqtts/mqtt-nhan-bien-dong-so-du.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.
