Chuyển tới nội dung chính
Phiên bản: 1.4.0

Push Payment to Devices

POST /openapi/v1/devices/payments/push

Đẩy thông tin thanh toán (số tiền + mã QR) trực tiếp xuống thiết bị vật lý tại quầy thu ngân.

Payload POS (Smart POS):

{
"serial_no": "00059012710",
"order_id": "0129210912",
"amount": 150000,
"type": "pos"
}

Payload Soundbox:

{
"serial_no": "SB-001234",
"amount": 150000,
"qr_string": "00020101021138550010A000000727...",
"type": "soundbox"
}
TrườngBắt buộcMô tả
serial_noSố serial của thiết bị
order_id✅ nếu type == "pos"Mã hóa đơn
amountSố tiền (VNĐ)
qr_string✅ nếu type == "soundbox"Chuỗi QR từ API Create QR
type"pos" hoặc "soundbox"
curl --location '<base_url>/openapi/v1/devices/payments/push' \
--header 'Partner-Code: YOUR_PARTNER_CODE' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsI…' \
--data '{
"data": ENCRYPTED_PAYLOAD
}'

Request

Headers

NameRequiredDescription
Partner-CodeMã định danh Merchant (TCONNECT cung cấp)
Content-Typeapplication/json
AuthorizationBearer <access_token>

Body

FieldTypeRequiredDescription
datastringPayload đã mã hóa AES-256-CBC dạng Hexadecimal

Response

200 — Gửi lệnh xuống thiết bị thành công

FieldTypeDescription
messagestringXác nhận trạng thái gửi lệnh (ví dụ: "Successfully pushed new payment to Soundbox")