Sign up a new user
Sign-up
POST
https://api.vndc.io/merchant/register_account
A merchant can create a new account for a new user that they referred.
Headers
Request Body
{
"code": "success",
"message": "Đăng ký thành công. Vui lòng kiểm tra email để kích hoạt.",
"data": {
"user": {
"id": "6277729709289981854",
"display": "Test User 2",
"shortDisplay": "4936354455"
},
"generatedPasswords": [],
"rootUrl": "https://wallet.vndc.io/email",
"principals": [
{
"value": "4936354455",
"type": {
"id": "6277729709576826782",
"name": "Login name",
"internalName": "username",
"kind": "username"
}
},
{
"value": "it_011@trustpay.vn",
"type": {
"id": "6277729709576828830",
"name": "E-mail",
"internalName": "email",
"kind": "email"
}
}
],
"status": "emailValidation"
}
}
{
"code": "missingAuthorization",
"message": "Unauthorized access. Missing or invalid access client token"
}
Possible values are:
. unauthorized_access: Unauthorized access. Missing or invalid crendentials supplied for such operation
. invalidAccount: Thông tin tài khoản không hợp lệ
. missingAuthorization: Unauthorized access. Missing or invalid access client token
{
"code": "permission_denied",
"message": "Permission denied for such operation"
}
Possible values are:
. permission_denied: Permission denied for such operation
. sendVerificationCodeFailure: Gửi mã xác thực thất bại
{
"code": "emptyInputValue",
"message": "Thông tin đăng ký không đầy đủ"
}
Possible values are:
. emptyInputValue: Thông tin đăng ký không đầy đủ
. not_found_data: An expected data was not found
{
"code": "validationInput",
"message": "Input error. Either a validation error or the maximum allowed items was exceeded"
}
Possible message values are:
. Input error. Either a validation error or the maximum allowed items was exceeded
. Địa chỉ Email đăng ký đã tồn tại trong hệ thống
. Địa chỉ Email đăng ký không hợp lệ
. Số điện thoại đăng ký đã tồn tại trong hệ thống
. Số điện thoại đăng ký không hợp lệ
. Mật khẩu tối thiểu 6 ký tự
. Mật khẩu xác nhận không hợp lệ
{
"code": "unexpected_error",
"message": "Unexpected error"
Resend phone verification code
POST
https://api.vndc.io/merchant/resend_verification_code
Send OTP to verify the user again.
Request Body
{
"code": "success",
"message": "Gửi mã xác thực thành công"
}
{
"code": "invalidAccount",
"message": "Thông tin tài khoản không hợp lệ"
}
Possible values are:
. invalidAccount: Thông tin tài khoản không hợp lệ
. missingAuthorization: Unauthorized access. Missing or invalid access client token
{
"code": "sendVerificationCodeFailure",
"message": "Gửi mã xác thực thất bại"
}
{
"code": "emptyAccount",
"message": "Tài khoản được yêu cầu"
}
Possible values are:
. emptyAccount: Tài khoản được yêu cầu
. emptyPassword: Mật khẩu được yêu cầu
Verify the phone
POST
https://api.vndc.io/merchant/verify_phone
Request Body
{
"code": "success",
"message": "Kích hoạt SMS thành công"
}
{
"code": "unauthorized_access",
"message": "Unauthorized access. Missing or invalid crendentials supplied for such operation"
}
Possible values are:
. unauthorized_access: Unauthorized access. Missing or invalid crendentials supplied for such operation
. invalidAccount: Thông tin tài khoản không hợp lệ
. missingAuthorization: Unauthorized access. Missing or invalid access client token
{
"code": "unauthorized_access",
"message": "Permission denied for such operation"
}
Possible values are:
. permission_denied: Permission denied for such operation
. codeNotSent: Mã xác thực chưa được gửi. Vui lòng gửi lại mã xác thực
. expired: Mã xác thực hết hạn
. failed: Mã xác thực không hợp lệ
. maxAttemptsReached: Bạn nhập sai mã xác thực quá nhiều lần. Vui lòng gửi lại mã xác thực.
{
"code": "unauthorized_access",
"message": "Unauthorized access. Missing or invalid crendentials supplied for such operation"
}
Possible values are:
. unauthorized_access: Unauthorized access. Missing or invalid crendentials supplied for such operation
. invalidAccount: Thông tin tài khoản không hợp lệ
. missingAuthorization: Unauthorized access. Missing or invalid access client token
{
"code": "unexpected_error",
"message": "Unexpected error"
}
Last updated