1️⃣API Get Token
Đối tác cung cấp API cấp quyền truy cập để VietQR có thể kết nối và đồng bộ dữ liệu với API Transaction Sync (đồng bộ biến động số dư). Để cấp quyền, đối tác cần cấu hình và tạo điểm nhận dữ liệu
2.1 POST Get Token
2.1 POST Get Tokenhttps://<your-host>/<your-basepath>/api/token_generateHeaders
Content-Type
application/json
Authorization
Basic Authentication: Base64[username:password]
username và password của API này sẽ do bạn định nghĩa và cung cấp cho VietQR.
Body
access_token
String
Yes
Là Bearer Token do đối tác cung cấp cho VietQR sử dụng để xác thực và callback giao dịch vào API Transaction Sync của đối tác
token_type
String
Yes
Là dạng token dạng “Bearer”.
expires_in
Integer
Yes
Thời gian (giấy/s) hết hạn của token kể từ thời điểm được tạo
Response
{
"access_token": "bearer_token",
"token_type": "Bearer",
"expires_in": 300
}{
"status": "FAILED",
"message": "mã_lỗi"
}2.2 - Code cài đặt
Test với Posmant :
curl --location --request POST 'https://uat8.thuythu.vn/mrtao/wp-json/tt-vietqr/api/token_generate' \ --header 'Authorization: Basic dGFpcGhpbTRrOjYxZTU1ZmU0LTBhNjMtNGU4Zi1hZDgyLTBlNjFiYzk4M\mRlNA=='
2.3 - Các câu hỏi thường gặp chủ đề API Get Token
Last updated