Skip to main content

Show a QR code on the device

This API makes a TingeeBox device show a payment QR code on its screen. Choose the QR type to show:

POST
URLhttps://open-api.tingee.vn/v1/device/show-dynamic-qr-code

Send a dynamic QR code to the TINGEEBOX device to show to customers.

Note

Some banks let customers edit the amount themselves when scanning a dynamic QR. See how to verify transactions in Important notes — Dynamic QR transactions.

Header Request​

HeaderRequiredDescription
Content-Type✓application/json
x-client-id✓Partner identifier issued by TINGEE.
x-signature✓HMAC SHA512 authentication signature. See How to generate the signature.
x-request-timestamp✓Time the request is sent (format: yyyyMMddHHmmssSSS, UTC+7)

Body Parameter​

FieldTypeRequiredDescription
merchantIdnumber~Merchant ID
(Required if you connect with a Master Merchant account).
uuidstring~Device code.
Pass uuid, or the trio bankBin (or bankName) + vaAccountNumber + deviceType so the system finds the devices attached to the account (via the account or the shop that contains it).
When uuid is passed, vaAccountNumber, bankBin, bankName and deviceType are ignored.
Currently only TingeeBox 6XS and TingeeBox 3LS devices can show QR codes.
vaAccountNumberstring~VA account number or identification account.
Required when uuid is not passed.
amountnumber✓Amount to pay (VND).
qrCodestring✓Dynamic QR Code string (Dynamic QR).
bankBinstring~Bank BIN. See Supported banks.
When uuid is not passed, you must pass bankBin or bankName.
bankNamestring~Bank name (per BankNameEnum): OCB, BIDV, MBB, ACB, VPB, PGB, VIB, STB, CTG, VCB, AGRIBANK, SHINHAN, COB, MSB, NEXTPAY, PAYOO, BAOKIM, TPB.
When uuid is not passed, you must pass bankBin or bankName; if bankBin is passed, bankName is derived from bankBin.
deviceTypestring~Type of device to show the QR on: tingee-box-6xs or tingee-box-3ls.
Required when uuid is not passed.
firstTextstring✕Text shown with the QR (line 1).
secondTextstring✕Text shown with the QR (line 2).
thirdTextstring✕Text shown with the QR (line 3).
showTimenumber✕How long the QR is shown on the screen (seconds). Default 90. Applies to TingeeBox 6XS (TingeeBox 3LS always shows it for 30 seconds).
isStaticQrboolean✕true: show it as a static QR (equivalent to the static QR API). Default false (dynamic QR).
playSoundboolean✕true to play a beep when showing the QR.

Code samples​

curl --location --request POST 'https://open-api.tingee.vn/v1/device/show-dynamic-qr-code' \
--header 'accept: application/json' \
--header 'x-client-id: YOUR_CLIENT_ID' \
--header 'x-request-timestamp: 20240509154004003' \
--header 'x-signature: YOUR_SIGNATURE' \
--header 'Content-Type: application/json' \
--data '{
"vaAccountNumber": "V1T123456789",
"amount": 150000,
"qrCode": "00020101021138580010A000000727...",
"bankBin": "970422",
"deviceType": "tingee-box-3ls"
}'

Sample Response​

{
"code": "00",
"message": "Success",
"data": null
}
FieldTypeDescription
codestringResult code (00 = success).
messagestringResponse message.

Common error codes​

CodeDescriptionHow to handle
1028Device not foundCheck that the device uuid is linked to the Merchant.
1053Device type not foundWhen uuid is not passed, you must pass a valid deviceType.
1047Virtual account number not foundCheck that vaAccountNumber and bankBin belong to the Merchant.
1031Shop not foundThe account has not been assigned to a shop with a device; check the device-to-shop link.
1095, 1096Master Merchant merchantId errorPass the merchantId of a sub-Merchant that belongs to the calling Master Merchant.
90, 91, 92, 97Request authentication error (timestamp, client-id, signature)See System error codes.
OthersOther errorsSee Error codes.