Get QR Transactions
POST /openapi/v1/transaction/qr
Lấy danh sách giao dịch thanh toán thành công qua mã QR trong khoảng thời gian chỉ định.
Payload trước khi mã hóa:
{
"from_date": "2026-01-07 00:00:00",
"to_date": "2026-01-07 23:59:59",
"limit": 10,
"page": 1
}
| Field | Type | Required | Description |
|---|---|---|---|
from_date | string | ✅ | Thời gian bắt đầu (YYYY-MM-DD HH:MM:SS) |
to_date | string | ✅ | Thời gian kết thúc (YYYY-MM-DD HH:MM:SS) |
limit | number | ✅ | Số lượng bản ghi mỗi trang |
page | number | ✅ | Số trang (bắt đầu từ 1) |
- cURL
- Python
- Go
- JavaScript
curl --location '<base_url>/openapi/v1/transaction/qr' \
--header 'Partner-Code: YOUR_PARTNER_CODE' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsI…' \
--data '{
"data": ENCRYPTED_PAYLOAD
}'
import requests
url = "<base_url>/openapi/v1/transaction/qr"
payload = {"data": "ENCRYPTED_PAYLOAD"}
headers = {
"Partner-Code": "YOUR_PARTNER_CODE",
"Content-Type": "application/json",
"Authorization": "Bearer eyJhbGciOiJSUzI1NiIsI…",
}
response = requests.post(url, headers=headers, json=payload)
print(response.text)
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
url := "<base_url>/openapi/v1/transaction/qr"
body := strings.NewReader(`{"data":"ENCRYPTED_PAYLOAD"}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Set("Partner-Code", "YOUR_PARTNER_CODE")
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer eyJhbGciOiJSUzI1NiIsI…")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
result, _ := io.ReadAll(resp.Body)
fmt.Println(string(result))
}
const response = await fetch("<base_url>/openapi/v1/transaction/qr", {
method: "POST",
headers: {
"Partner-Code": "YOUR_PARTNER_CODE",
"Content-Type": "application/json",
"Authorization": "Bearer eyJhbGciOiJSUzI1NiIsI…",
},
body: JSON.stringify({ data: "ENCRYPTED_PAYLOAD" }),
});
const result = await response.text();
console.log(result);
Request
Headers
| Name | Required | Description |
|---|---|---|
Partner-Code | ✅ | Mã định danh Merchant (TCONNECT cung cấp) |
Content-Type | ✅ | application/json |
Authorization | ✅ | Bearer <access_token> |
Body
| Field | Type | Required | Description |
|---|---|---|---|
data | string | ✅ | Payload đã mã hóa AES-256-CBC dạng Hexadecimal |
Response
200 — Danh sách giao dịch QR
| Field | Type | Description |
|---|---|---|
data | array | Danh sách giao dịch |
data[].order_id | string | Mã hóa đơn của bạn |
data[].amount | string | Số tiền giao dịch (VNĐ) |
data[].trn_ref_no | string | Mã tham chiếu giao dịch từ ngân hàng |
data[].narrative | string | Nội dung chuyển khoản |
data[].txn_init_dt | string | Ngày giờ giao d ịch (YYYY-MM-DD HH:mm:ss) |
pagination.page | integer | Trang hiện tại |
pagination.limit | integer | Số bản ghi mỗi trang |
pagination.total_items | integer | Tổng số bản ghi |
pagination.total_pages | integer | Tổng số trang |