Get Card Transactions
POST /openapi/v1/transaction/card
Lấy danh sách giao dịch thanh toán bằng thẻ quẹt (VISA, NAPAS, v.v.) 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/card' \
--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/card"
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/card"
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/card", {
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 thẻ
| Field | Type | Description |
|---|---|---|
data | array | Danh sách giao dịch |
data[].order_id | string | Mã hóa đơn |
data[].card_no | string | Số thẻ (che bảo mật, ví dụ: 1234****5678) |
data[].request_amount | string | Số tiền giao dịch (VNĐ) |
data[].card_type | string | Loại thẻ (ví dụ: VISA, NAPAS) |
data[].payment_type | string | Loại giao dịch |
data[].retrieval_ref_no | string | Mã tham chiếu giao dịch |
data[].original_transaction_date | string | Ngày giờ giao dịch |
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 |