# Các bước đồng bộ MQTT

Bước 1: Đồng bộ thiết bị với tài khoản VietQR -> Đăng kí 2 topic : Topic đăng kí : /vqr/handle-box\
Topic nhận phản hồi : /vqr/handle-box/response/11.78.36.89.21

Bước 2: Sau khi message được phản hồi về topic : /vqr/handle-box/response/11.78.36.89.21 - Ta sử dụng giá trị của filed "boxId" để đăng kí nhận phản hồi từ topic mới : vietqr/boxId/{boxId} để nhận các thông tin từ đồng bộ điểm bán

```
    - Ví dụ: "boxId":"VlZCNDA5MDY4VmlldFFSQm94QWNjZXNzS2V5" Thì topic tương ứng là: vietqr/boxId/VlZCNDA5MDY4VmlldFFSQm94QWNjZXNzS2V5.
```

Bước 3: Sử dụng giá trị của "qrCertificate" được phản hồi từ topic /vqr/handle-box/response/11.78.36.89.21 để quét mã QR từ app VietQR với mục đích đồng bộ điểm bán

Bước 4: Sau khi đồng bộ điểm bán từ app VietQR thì sẽ nhận được phản hồi từ topic vietqr/boxId/{boxId} mà ta đã đăng kí từ bước 2


---

# 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/en/vn/other-api-service/api-host-to-device-mqtts/cac-buoc-dong-bo-mqtt.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.
