6.2.2. API xác thực OTP
Hàm API dùng để xác thực mã OTP khi khách hàng thực hiện liên kết tài khoản ngân hàng (VA).
API Xác thực OTP
POST https://open-api.tingee.vn/v1/confirm-va – Môi trường live
POST https://uat-open-api.tingee.vn/v1/confirm-va – Môi trường test
Gửi lệnh xác thực OTP cho giao dịch liên kết ngân hàng đã được tạo trước đó.
Headers
| Name | Type | Description |
|---|---|---|
| x-client-id | string | Định danh ứng dụng (Lấy trong https://app.tingee.vn/m/developers ) |
| x-request-timestamp | string | Dấu thời gian (yyyyMMddHHmmssSSS) |
| x-signature | string | Quy 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
| Name | Type | Description |
|---|---|---|
| bankName* | enum | Ngân hàng |
| confirmId* | string | Mã tham chiếu của ngân hàng |
| otpNumber* | string | Mã OTP |
Response
200: OK
{
"code": "00",
"message": "Success",
"data": {
"accountType": "personal-account",
"bankName": "OCB",//OCB MBB BIDV ACB hoặc VPB
"accountNumber": "string",
"vaAccountNumber": "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 -X 'POST' \
'https://uat-open-api.tingee.vn/v1/confirm-va' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-request-timestamp: 20240509154004003' \
--header 'x-client-id: 0fe48681158f17495ce4a5879188b81a' \
--header 'x-signature: 5a122a9cfce156b48a78d60138cc534f9b00c6abace7a05058b0158ebb9e6aa3485b65ddedeaa266db0c78d2b0cdf716c31f02c373331006745d814ae79dc8d7' \
-d '{
"bankName": "OCB",
"confirmId": "string",
"otpNumber": "string"
}'Cập nhật ngày