Skip to main content

Create a static QR code (VietQR)

Use this API to create a static QR code (VietQR) for a fixed bank account. This type of QR suits fixed payment points or models that do not need automatic payment-status tracking for each order.

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

Create a static QR code in the VietQR standard. Customers can scan it to transfer money manually to your account.

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
bankBinstring✓Bank BIN. See Supported banks.
accountNumberstring✓Receiving account number (original account number or virtual account number).
For bankBin = BAOKIM, it must be a Bảo Kim virtual account number linked on TINGEE.
amountnumber✕Default amount (VND, shown when scanned). Leave empty to let the payer enter the amount.
contentstring✕Default transfer description.

Code samples​

curl --location --request POST 'https://open-api.tingee.vn/v1/generate-viet-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 '{
"bankBin": "970418",
"accountNumber": "21510002865945",
"amount": 100000,
"content": "Thanh toan don hang"
}'

Sample Response​

{
"code": "00",
"message": "Success",
"data": {
"qrCode": "00020101021238540010A0000007270124000697041801102151000286...",
"qrCodeImage": "data:image/png;base64,iVBORw0KGgoAAAANSU..."
}
}
FieldTypeDescription
codestringResult code (00 = Success).
messagestringResponse message.
data.qrCodestringQR code content string in the VietQR (EMVCo) standard.
data.qrCodeImagestringPNG QR image as a Base64 Data URL (data:image/png;base64,...); you can assign it directly to the src attribute of an <img> tag.

Common error codes​

CodeDescriptionHow to handle
1010Bảo Kim account number not foundOnly applies when bankBin is Bảo Kim: check that accountNumber is a Bảo Kim account linked on TINGEE.
90, 91, 92, 97Request authentication error (timestamp, client-id, signature)See System error codes.
OthersOther errorsSee Error codes.