Trusted Entities
Introduction
A Trusted Entity refers to a pre-approved and recognized element within a system that,
when present, allows certain security requirements (such as 2FA / SCA) to be bypassed in specific scenarios.
Trusted entities are used to streamline user experience while maintaining compliance with regulatory frameworks.
The Trusted entities service manages trusted entities.
Types of trusted entities
- Trusted Device: A device that has been previously verified and registered by the user, allowing future logins from this device to be treated as lower-risk.
- Trusted Customer: A recipient (such as a payee) that has been marked as trusted by the user, enabling faster and smoother transfer flows to that recipient without triggering additional authentication steps.
- Trusted Merchant: A merchant designated as trusted, either by the user or by business rules, reducing the need for repetitive security challenges during transactions with this merchant.
- Trusted Bank Account: A financial institution that is recognized as trusted within the system, allowing certain operations - such as fund transfers involving this bank - to bypass additional security checks.
- Trusted Mobile Recipient - A mobile recipient (such as phone contact) that has been marked as trusted by the user, enabling faster and smoother transfer flows to that recipient without triggering additional authentication steps.
- Trusted Native Mobile App - A mobile application that has been previously verified and registered by the user, allowing future operations from this device to be treated as lower-risk.
Key Features:
- Multiple trusted entities can be associated with a wallet user account.
- Retrieve a list of trusted entities.
- Create a trusted entity.
- Delete a trusted entity.
Prerequisites
Before integrating the Entities Service, ensure you have:
- A valid Paysafe account with appropriate permissions.
- Set up instructions for Paysafe SDK Android or iOS.
To get started, initialize the TrustedEntitiesService
instance in your app as shown below:
- Kotlin
- Swift
import com.paysafe.wallet.android.core.wallet.Wallet
val entitiesService = Wallet.getInstance().getTrustedEntitiesService()
import PaysafeWallet
let entitiesService = Wallet.instance.trustedEntitiesService
Features
Get trusted entities
- Kotlin
- Swift
Use getTrustedEntityCredentials
method to retrieve a list of all trusted entity credentials.
Configure the filtering by providing an AuthTrustedEntityCredentialType
object.
The result is an AuthTrustedEntityCredentials
object containing a list of AuthTrustedEntityCredential
.
This operation might require Strong Customer Authentication (SCA). Please read Strong Customer Authentication for more information on the process.
try {
val entitiesList = entitiesService.getTrustedEntityCredentials()
} catch (e: ScaRequiredException) {
// Solve Strong Customer Authentication challenge using authenticationEvent
// Call getTrustedEntityCredentials again, providing the scaDetails parameter
} catch (e: WalletException) {
// Handle other exceptions
}
Use getTrustedEntityCredentials
method to retrieve a list of all user authorizations.
Configure the filtering by providing an AuthTrustedEntityCredentialType
object.
The result is an AuthTrustedEntityCredentials
object containing a list of AuthTrustedEntityCredential
.
This operation might require Strong Customer Authentication (SCA). Please read Strong Customer Authentication for more information on the process.
do {
let entitiesList = try await entitiesService.getTrustedEntityCredentials()
} catch Wallet.WalletError.scaRequired(let authenticationEvent, _) {
// Solve Strong Customer Authentication challenge using authenticationEvent
// Call getTrustedEntityCredentials again, providing the scaDetails parameter
} catch {
// Handle other errors
}
Create a trusted entity
- Kotlin
- Swift
Use createTrustedEntityCredential
method to create a new trusted entity.
The result is an AuthTrustedEntityCredential
object.
This operation might require Strong Customer Authentication (SCA). Please read Strong Customer Authentication for more information on the process.
val creationRequest = AuthTrustedEntityCredentialCreationRequest(
entityType = AuthTrustedEntityCredentialType.DEVICE,
entityKey = "aca95ef6f10a49108b789b42121f29a2",
entityDescription = "android webview 18.0"
)
try {
let entity = entitiesService.createTrustedEntityCredential(creationRequest)
} catch (e: ScaRequiredException) {
// Solve Strong Customer Authentication challenge using authenticationEvent
// Call createTrustedEntityCredential again, providing the scaDetails parameter
} catch (e: WalletException) {
// Handle other exceptions
}
Use createTrustedEntityCredential
method to create a new trusted entity.
The result is an AuthTrustedEntityCredential
object.
This operation might require Strong Customer Authentication (SCA). Please read Strong Customer Authentication for more information on the process.
let creationRequest = Wallet.AuthTrustedEntityCredentialCreationRequest(
entityType: .device,
entityKey: "aca95ef6f10a49108b789b42121f29a2",
entityDescription: "ios webview 18.0"
)
do {
let entity = try await entitiesService.createTrustedEntityCredential(request: creationRequest)
} catch Wallet.WalletError.scaRequired(let authenticationEvent, _) {
// Solve Strong Customer Authentication challenge using authenticationEvent
// Call createTrustedEntityCredential again, providing the scaDetails parameter
} catch {
// Handle other errors
}
Delete a trusted entity
- Kotlin
- Swift
Use deleteTrustedEntityCredential
method to create a new trusted entity.
This operation might require Strong Customer Authentication (SCA). Please read Strong Customer Authentication for more information on the process.
val deletionRequest = AuthTrustedEntityCredentialDeletionRequest(
id = "824abe75-7f04-4562-be30-8533f5b9f7db"
)
try {
let entity = entitiesService.deleteTrustedEntityCredential(deletionRequest)
} catch (e: ScaRequiredException) {
// Solve Strong Customer Authentication challenge using authenticationEvent
// Call deleteTrustedEntityCredential again, providing the scaDetails parameter
} catch (e: WalletException) {
// Handle other exceptions
}
Use deleteTrustedEntityCredential
method to create a new trusted entity.
This operation might require Strong Customer Authentication (SCA). Please read Strong Customer Authentication for more information on the process.
let deletionRequest = Wallet.AuthTrustedEntityCredentialDeletionRequest(
id: "824abe75-7f04-4562-be30-8533f5b9f7db"
)
do {
let entity = try await entitiesService.deleteTrustedEntityCredential(request: deletionRequest)
} catch Wallet.WalletError.scaRequired(let authenticationEvent, _) {
// Solve Strong Customer Authentication challenge using authenticationEvent
// Call createTrustedEntityCredential again, providing the scaDetails parameter
} catch {
// Handle other errors
}