Chuyển đến nội dung chính

getPublicProfile

LƯU Ý
Vui lòng liên hệ Đội ngũ Zalopay để được cấp quyền sử dụng tính năng này.

Mô tả​

Truy cập thông tin của người dùng. Vui lòng liên hệ Đội ngũ Zalopay để được hướng dẫn tích hợp

Parameters​

Tên ParamKiểu dữ liệuBắt buộcMô tả
appIdnumberCóId để thanh toán

Return Value​

Tên ParamKiểu dữ liệuMô tả
userIdstringmerchant user id (unique)
userNamestringuser name
userAvatarstrinuser avatar

Mã lỗi​

Mã lỗiMô tả
030702getPublicProfile: Đối số truyền vào không hợp lệ
030703getPublicProfile: Lỗi hệ thống
030704getPublicProfile: Thông tin không xác thực. Vui lòng kiểm tra access token

Code và Dữ liệu trả về mẫu​

Yêu cầu gửi đi mẫu:

window.zlpSdk.User.getPublicProfile({
appId: 999,
})
.then((response) => console.log(response))
.catch((error) => console.error(error.errorCode));

Dữ liệu trả về mẫu:

{
"data": {
"userId": "YSgQtcUuBUyRhEPdE8slAIZfpaAM90oeKdcT_0o6QZQ",
"userName": "display name",
"userAvatar": "avatar"
},
"status": "success"
}