Skip to main content

Create a dynamic QR and show it on the speaker

This API creates a dynamic QR code and shows it directly on the TINGEEBOX device screen, without calling the show QR API separately.

note

This API only applies to devices other than TingeeBox 3LS.

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

Create a dynamic QR Code and show it on the TINGEEBOX device right away for customers to scan and pay.

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 (the device must be linked to the Merchant).
qrCodeTypestring✓Dynamic QR type:
- dynamic-one-time-payment: QR that can be paid only once.
- dynamic-recurring-payment: QR that can be paid multiple times.
vaAccountNumberstring✓Virtual account number (max 50 characters).
amountnumber✓Bill amount (VND), minimum 1.
purposestring✕Payment description.
bankBinstring✓Bank BIN. See Supported banks.
bankNamestring✕Bank name: OCB, BIDV, MBB, ACB, VPB, PGB, VIB, STB, CTG, VCB, AGRIBANK, SHINHAN, COB, MSB, NEXTPAY, PAYOO, BAOKIM, TPB.
When bankBin is passed, the system derives bankName from bankBin. QR creation is based on bankBin, so always pass bankBin.
namestring✕QR display name. Only applies to the BAOKIM e-wallet; if omitted, the account holder name is used.
expireInMinutenumber~QR validity period (minutes), from 1 to 43200 (30 days). Default 43200.
Required for OCB (970448).
extraInfostring✕Extra information when creating the QR, max 200 characters (e.g. the partner's bill code).
deviceTypestring✕Device type. No need to pass it — the system determines it from uuid.
firstTextstring✕Text shown with the QR (line 1).
secondTextstring✕Text shown with the QR (line 2). Defaults to the qrAccount of the newly created QR.
thirdTextstring✕Text shown with the QR (line 3).
showTimenumber✕How long the QR is shown on the speaker (seconds). Default 90 seconds.
playSoundboolean✕Play a beep when showing the QR.
- true: With a beep.
- false/omitted: No beep.
readAmountAfterPayboolean✕Read the amount aloud after a successful payment.
- true: The speaker reads the amount automatically.
- false/omitted: The partner calls the read amount API to play it on the speaker.

Code samples​

curl --location --request POST 'https://open-api.tingee.vn/v1/device/generate-and-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 '{
"uuid": "DEVICE_UUID",
"qrCodeType": "dynamic-one-time-payment",
"vaAccountNumber": "V1T123456789",
"amount": 150000,
"purpose": "Thanh toan don hang #001",
"bankBin": "970422",
"expireInMinute": 5,
"firstText": "Quan ABC",
"showTime": 30,
"playSound": true,
"readAmountAfterPay": true
}'

Sample Response​

{
"code": "00",
"message": "Success",
"data": {
"qrCode": "00020101021238570010A...",
"qrAccount": "V1T123456789",
"billId": "BILL_20251110_001"
}
}
FieldTypeDescription
codestringResult code (00 = success).
messagestringResponse message.
data.qrCodestringDynamic QR Code string to display / scan.
data.qrAccountstringReceiving account number encoded in the QR.
data.billIdstringBill ID for the QR, used to look up/delete the dynamic QR.

Common error codes​

CodeDescriptionHow to handle
1024Virtual account number does not existCheck that vaAccountNumber and bankBin match an account linked to the Merchant.
1018Dynamic QR is not supported for this account typeUse an account that supports dynamic QR at the corresponding bank.
1028Device not foundCheck that the device uuid is linked to the Merchant. Note: the dynamic QR may already have been created before this error is returned.
1086, 1087, 1088BAOKIM e-wallet is not configured or not syncedComplete the BAOKIM e-wallet configuration before creating a dynamic QR.
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.