Skip to main content

Create a Tingee dynamic QR code (Dynamic QR)

Use this API to create a dynamic QR code for a specific transaction, supporting one-time or recurring payment depending on the configuration.

POST
URLhttps://open-api.tingee.vn/v1/generate-dynamic-qr

Create a dynamic QR code for each transaction. The result includes the QR code string and the bill information in the system.

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).
vaAccountNumberstring✓The Merchant's linked virtual account (VA) number, up to 50 characters.
qrCodeTypestring✓QR type:
- dynamic-one-time-payment: one-time payment QR.
- dynamic-recurring-payment: recurring payment QR.
bankBinstring✓Bank BIN of the vaAccountNumber. Supported: OCB (970448), MB (970422), BIDV (970418), VietinBank (970415), Vietcombank (970436), VPBank (970432), Bảo Kim (BAOKIM). See Supported banks.
amountnumber✓Amount to pay (VND, minimum 1).
namestring✕Display name of the dynamic QR. Applies to Bảo Kim only; if left empty, the system uses the account holder name.
purposestring✕Payment description.
expireInMinutenumber~Dynamic QR expiry time (minutes), from 1 to 43200 (30 days). Default 43200.
Required for OCB (970448).
extraInfostring✕Additional partner-defined information, up to 200 characters. Returned in the Get dynamic QR status API.

Code samples​

curl --location --request POST 'https://open-api.tingee.vn/v1/generate-dynamic-qr' \
--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": "V1T199988811",
"qrCodeType": "dynamic-one-time-payment",
"bankBin": "970418",
"amount": 500000,
"purpose": "Thanh toan cho hoa don HD2918732312"
}'

Sample Response​

{
"code": "00",
"message": "Success",
"data": {
"qrCode": "00020101021238570010A000000727012700069704180113V1TQRD7F3A9C1B2E40208QRIBFTTA53037045406500000...",
"qrAccount": "V1TQRD7F3A9C1B2E4",
"billId": "V1TQRD7F3A9C1B2E4"
}
}
FieldTypeDescription
codestringResult code (00 = Success).
messagestringResponse message.
data.qrCodestringQR code content string in the VietQR standard (use a library to render it as a QR image).
data.qrAccountstringReceiving account number encoded in the QR (QR account). Use it together with billId when calling the get-status / delete dynamic QR APIs.
data.billIdstringDynamic QR (bill) identifier in the TINGEE system. The format depends on the bank, e.g.:
- BIDV, VietinBank: {VA prefix}QRD{random code} (same as qrAccount).
- MB, Vietcombank, VPBank: starts with QRD.
- OCB: code returned by the bank.
- Bảo Kim: same as qrAccount.

Common error codes​

CodeDescriptionHow to handle
1024Virtual account number does not existCheck that vaAccountNumber and bankBin match the Merchant's linked account.
1018This account type does not support dynamic QR yetOCB: personal or business accounts; BIDV, VietinBank, VPBank: business accounts only; Vietcombank: personal accounts not supported. Use a suitable account or a static QR.
1013, 1014Business account is not configured for dynamic QRContact TINGEE to set up the configuration for the business account (OCB, Vietcombank, VPBank).
1082Invalid display name (name)For Bảo Kim, name must start with the registered account name; or leave name empty.
1086, 1087, 1088Bảo Kim wallet is not configured or not synchronizedComplete the Bảo Kim wallet configuration before creating a dynamic QR.
1095, 1096Master Merchant merchantId errorPass the merchantId of a sub-Merchant that belongs to the Master Merchant calling the API.
90, 91, 92, 97Request authentication error (timestamp, client-id, signature)See System error codes.
OthersOther errorsSee Error codes.