Skip to Content
🎉 Cập nhật mới ngày 11/11/2025 - Xem chi tiết →
VI. Tích hợp phần mềm6.3. API Tạo mã QR Code

6.3. API Tạo mã QR Code

Api Gen QR Code

API Tạo mã QR Code

POST https://open-api.tingee.vn/v1/generate-viet-qr  - Môi trường live

POST https://uat-open-api.tingee.vn/v1/generate-viet-qr  - Môi trường test

Gửi lệnh tạo mã QR Code tùy chỉnh

Headers

NameTypeDescription
x-client-idstringĐịnh danh ứng dụng (Lấy trong https://app.tingee.vn/m/developers )
x-request-timestampstringDấu thời gian (yyyyMMddHHmmssSSS)
x-signaturestringQuy tắc kiểm tra tính toàn vẹn dữ liệu: Chuỗi giá trị cần hash = {x-request-timestamp}:{request body convert về string}
Sau đó thực hiện mã hóa chuỗi bên trên với giải thuật: HMAC SHA512 với Key là Secret token lấy tại mục Developers trên Tingee

Request Body

NameTypeDescription
bankName*enumNgân hàng (OCB, MBB, BIDV, ACB, CTG, PGB, STB)
accountNumber*stringSố tài khoản
amountnumberSố tiền
contentstringNội dung giao dịch

200: OK

{ "code": "00", "message": "Success", "data": { "qrCode": "string", "qrCodeImage": "string", "qrAccount": "string", "referenceLabelCode": "string" } }

401: Unauthorized

{ "message": "Unauthorized.", "error": "Unauthorized", "statusCode": 401 }

400: Bad Request

{ "message": "Not have access.", "error": "Bad Request", "statusCode": 400 }

403: Forbidden

{ "message": "Forbidden.", "error": "Forbidden", "statusCode": 403 }

404: Not Found

{ "message": "Not Found.", "error": "Not Found", "statusCode": 404 }

500: Internal Server Error

{ "message": "Internal Server Error.", "error": "Internal Server Error", "statusCode": 500 }

501: Not Implemented

{ "message": "Not Implemented.", "error": "Not Implemented", "statusCode": 501 }

Ví dụ CURL

curl --location 'https://open-api.tingee.vn/v1/generate-viet-qr' \ --header 'accept: application/json' \ --header 'Content-Type: application/json' \ --header 'x-request-timestamp: 20240524155831608' \ --header 'x-client-id: f4ba500b1f5798399907cd7ba41d368c' \ --header 'x-signature: e8547f7a75659319487894454e2eef005f20d7bcb391713f46ca6a574c5585d6a663e01afd6feb7a56291e5a95b93cadbc5f89413729110f7868c58788c4a219' \ --data '{ "bankName": "BIDV", "accountNumber": "V1T40524094111", "amount": 5000, "content": "string" }'
Cập nhật ngày