Skip to main content
Version: Next

Android Business User APIs

Business user APIs for login/logout, authentication state, and fetching the current business user profile. Access these APIs through Vipaso.user.business.

Login

Authenticate a business user using your credentials. The SDK securely stores the session.

// Request: Login with identifier and password
val loginRequest = LoginRequest(
userIdentifer = "merchant@example.com",
password = "secure_password"
)

Vipaso.user.business.login(loginRequest)

// Once this call returns successfully, User can now access Vipaso business features
// If there is an error you can catch it and handle it

Logout

Invalidate the current session and log out.

Vipaso.user.business.logout()

Authentication State

Observe whether the business user is currently authenticated.

Vipaso.user.business.isAuthenticated()
.collect { authenticated ->
if (authenticated) {
// Show main app content
} else {
// User is not logged in, show login screen
}
}

Fetch User

Retrieve the current business user (merchant) profile.

val businessUser: BusinessUser = Vipaso.user.business.fetchUser()