Skip to main content

Thiết bị TingeeBox

Quản lý thiết bị TingeeBox: đọc mã bảo mật, hiển thị QR, quản lý liên kết thiết bị-cửa hàng.


Đọc mã bảo mật​

API: POST /v1/device/read-security-code

const result = await client.device.readSecurityCode({ uuid: 'DEVICE_UUID' });

Tham số đầu vào​

TrườngKiểuBắt buộcMô tả
uuidstring✓UUID thiết bị

Response​

Trả về response chuẩn { code, message }, không có data.


Đọc số tiền​

API: POST /v1/device/read-amount

const result = await client.device.readAmount({
uuid: 'DEVICE_UUID',
transactionId: 'TXN_001',
amount: 500000,
bankBin: '970418',
});

Tham số đầu vào​

TrườngKiểuBắt buộcMô tả
uuidstring✓UUID thiết bị
transactionIdstring✓Mã giao dịch
amountnumber✓Số tiền
bankBinstring✓Mã BIN ngân hàng. Dùng BankBinEnum
firstDisplayTextstring✕Dòng hiển thị thứ 1
secondDisplayTextstring✕Dòng hiển thị thứ 2
thirdDisplayTextstring✕Dòng hiển thị thứ 3
playSoundboolean✕Bật/tắt âm thanh

Response​

Trả về response chuẩn { code, message }, không có data.


Hiển thị mã QR​

API: POST /v1/device/show-qr-code

const result = await client.device.showQrCode({
uuid: 'DEVICE_UUID',
vaAccountNumber: 'V1T199988811',
amount: 500000,
qrCode: 'QR_STRING...',
bankBin: '970418',
});

Tham số đầu vào​

TrườngKiểuBắt buộcMô tả
uuidstring✓UUID thiết bị
amountnumber✓Số tiền hiển thị
qrCodestring✓Chuỗi mã QR
vaAccountNumberstring✕Số tài khoản ảo
bankBinstring✕Mã BIN ngân hàng. Dùng BankBinEnum
bankNamestring✕Tên ngân hàng. Dùng BankNameEnum
deviceTypestring✕Loại thiết bị
firstTextstring✕Dòng hiển thị thứ 1
secondTextstring✕Dòng hiển thị thứ 2
thirdTextstring✕Dòng hiển thị thứ 3
showTimenumber✕Thời gian hiển thị (giây)
isStaticQrboolean✕QR tĩnh hay không
playSoundboolean✕Bật/tắt âm thanh
merchantIdnumber✕ID Merchant

Response​

Trả về response chuẩn { code, message }, không có data.


Tạo và hiển thị QR động​

API: POST /v1/device/generate-and-show-dynamic-qr-code

const result = await client.device.generateAndShowDynamicQrCode({
uuid: 'DEVICE_UUID',
vaAccountNumber: 'V1T199988811',
qrCodeType: 'dynamic-one-time-payment',
amount: 500000,
expireInMinute: 30,
});

Tham số đầu vào​

TrườngKiểuBắt buộcMô tả
uuidstring✓UUID thiết bị
vaAccountNumberstring✓Số tài khoản ảo
qrCodeTypestring✓dynamic-one-time-payment hoặc dynamic-recurring-payment
amountnumber✕Số tiền
bankBinstring✕Mã BIN ngân hàng. Dùng BankBinEnum
purposestring✕Nội dung thanh toán
expireInMinutenumber✕Hết hạn sau N phút
extraInfostring✕Thông tin bổ sung
deviceTypestring✕Loại thiết bị
firstTextstring✕Dòng hiển thị thứ 1
secondTextstring✕Dòng hiển thị thứ 2
thirdTextstring✕Dòng hiển thị thứ 3
showTimenumber✕Thời gian hiển thị (giây)
playSoundboolean✕Bật/tắt âm thanh
readAmountAfterPayboolean✕Đọc số tiền sau thanh toán
merchantIdnumber✕ID Merchant

Thêm thiết bị vào cửa hàng​

API: POST /v1/device/add-device-to-shop

const result = await client.device.addDeviceToShop({
uuid: 'DEVICE_UUID',
securityCode: '123456',
appType: 'tingee-web',
shopIds: [1001],
});

Tham số đầu vào​

TrườngKiểuBắt buộcMô tả
uuidstring✓UUID thiết bị
securityCodestring✓Mã bảo mật thiết bị
appTypestring✓Loại ứng dụng (ví dụ: tingee-web)
shopIdsnumber[]✕Danh sách ID cửa hàng
vaAccountNumbersstring[]✕Danh sách số VA liên kết
merchantIdnumber✕ID Merchant
masterMerchantIdnumber✕ID Master Merchant

Response​

{
"code": "00",
"message": "Success",
"data": [
{ "type": "tingee-box-3pro", "uuid": "DEVICE_UUID" }
]
}
TrườngKiểuMô tả
data[].typestringLoại thiết bị
data[].uuidstringUUID thiết bị

Danh sách thiết bị​

API: POST /v1/device/get-paging

const result = await client.device.getPaging({
skipCount: 0,
maxResultCount: 10,
merchantId: 12345,
});

Tham số đầu vào​

TrườngKiểuBắt buộcMô tả
skipCountnumber✓Số bản ghi bỏ qua
maxResultCountnumber✓Số bản ghi tối đa
merchantIdnumber✓ID Merchant
filterstring✕Lọc theo từ khóa
sortingstring✕Sắp xếp
typestring✕Lọc theo loại thiết bị

Response​

Trả về PagedResultDto<DeviceDto> với totalCount và mảng items.


Thiết bị liên kết Shop/VA​

API: POST /v1/device/get-devices-link-to-shop-or-va

const result = await client.device.getDevicesLinkToShopOrVa({
merchantId: 12345,
shopId: 1001,
vaAccountNumber: 'V1T199988811',
});

Tham số đầu vào​

TrườngKiểuBắt buộcMô tả
merchantIdnumber✓ID Merchant
shopIdnumber✓ID cửa hàng
vaAccountNumberstring✓Số tài khoản ảo

Response​

{
"code": "00",
"message": "Success",
"data": [
{ "type": "tingee-box-3pro", "uuid": "DEVICE_UUID" }
]
}

Các method khác​

MethodMô tả
showDynamicQrCode(body)Hiển thị QR động trên thiết bị (tham số giống showQrCode)
showStaticQrCode(body)Hiển thị QR tĩnh trên thiết bị (tham số giống showQrCode)
readPartnerSecurityCode(body)Đọc mã bảo mật đối tác (uuid, securityCode, merchantId?)
readAmountLinkToMerchant(body)Đọc số tiền liên kết Merchant (tham số giống readAmount + merchantId)
updateShopDeviceLinkStatus(body)Cập nhật trạng thái liên kết thiết bị-cửa hàng
reset(query)Reset thiết bị (uuid) — API docs