Skip to main content
Version: Next

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ả
uuidstringUUID 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ả
uuidstringUUID thiết bị
transactionIdstringMã giao dịch
amountnumberSố tiền
bankBinstringMã BIN ngân hàng. Dùng BankBinEnum
firstDisplayTextstringDòng hiển thị thứ 1
secondDisplayTextstringDòng hiển thị thứ 2
thirdDisplayTextstringDòng hiển thị thứ 3
playSoundbooleanBậ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ả
uuidstringUUID thiết bị
amountnumberSố tiền hiển thị
qrCodestringChuỗi mã QR
vaAccountNumberstringSố tài khoản ảo
bankBinstringMã BIN ngân hàng. Dùng BankBinEnum
bankNamestringTên ngân hàng. Dùng BankNameEnum
deviceTypestringLoại thiết bị
firstTextstringDòng hiển thị thứ 1
secondTextstringDòng hiển thị thứ 2
thirdTextstringDòng hiển thị thứ 3
showTimenumberThời gian hiển thị (giây)
isStaticQrbooleanQR tĩnh hay không
playSoundbooleanBật/tắt âm thanh
merchantIdnumberID 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ả
uuidstringUUID thiết bị
vaAccountNumberstringSố tài khoản ảo
qrCodeTypestringdynamic-one-time-payment hoặc dynamic-recurring-payment
amountnumberSố tiền
bankBinstringMã BIN ngân hàng. Dùng BankBinEnum
purposestringNội dung thanh toán
expireInMinutenumberHết hạn sau N phút
extraInfostringThông tin bổ sung
deviceTypestringLoại thiết bị
firstTextstringDòng hiển thị thứ 1
secondTextstringDòng hiển thị thứ 2
thirdTextstringDòng hiển thị thứ 3
showTimenumberThời gian hiển thị (giây)
playSoundbooleanBật/tắt âm thanh
readAmountAfterPaybooleanĐọc số tiền sau thanh toán
merchantIdnumberID 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ả
uuidstringUUID thiết bị
securityCodestringMã bảo mật thiết bị
appTypestringLoạ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
merchantIdnumberID Merchant
masterMerchantIdnumberID 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ả
skipCountnumberSố bản ghi bỏ qua
maxResultCountnumberSố bản ghi tối đa
merchantIdnumberID Merchant
filterstringLọc theo từ khóa
sortingstringSắp xếp
typestringLọ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ả
merchantIdnumberID Merchant
shopIdnumberID cửa hàng
vaAccountNumberstringSố 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