ReadyRemitConfiguration
The options available for customizing a branded experience
The Ready Remit Configuration object
To start the Ready Remit SDK, you first need to create a ReadyRemitConfiguration object, which will set the configuration details to run SDK. This include localization (English US or Spanish Mexico), environment, callbacks for transfer submission or authentication, etc.
The following properties are available to be set on ReadyRemitConfiguration.
| Property | Required | Type | Description |
|---|---|---|---|
| defaultCountry | No | CountryIso3Code | The default country ISO 3166-1 alpha-3 code to set as default to start a transfer. This is defined by an enum. |
| idleTimeoutInterval | No | Int | Timeout value measured in seconds that will automatically close the SDK. It will first trigger the user inactivity popup 60 seconds before the timeout. The minimum value must be 61. Default value is 120. |
| environment | No | ReadyRemitEnvironment | The server environment that the SDK will connect to. This is defined by an enum. |
| fixedRemittanceServiceProvider | No | RemittanceServiceProvider | The Remittance Service Provider that will be used to execute transfers. Defined by an enum. |
| fixedTransferMethod | No | TransferType | The only transfer method type that wil be available when running the SDK. |
| localization | No | Localization | The localization to use in the SDK. This will handle the language and country to format the currencies, dates and texts. |
| supportedAppearance | No | SupportedAppearance | Controls whether the SDK uses light, dark, or device appearance. |
| sourceAccounts | No | [SourceAccount] | The list of Source Accounts available to execute transfers. Each source account represents a virtual account from which the user can fund the transfer. |
| [authenticateIntoTheSdk] | Yes | Suspend Function | Suspend function to be called as soon the SDK is started. This let the your app to execute the authentication process. It expects an AuthenticationResult object type as result. |
| [submitTransfer] | Yes | Suspend Function | Suspend function to be called from the SDK to submit the transfer. It expects a TransferSubmissionResult object type as result. |
| sdkEventListener | No | [ReadyRemitEventListener] | Callback invoked by the SDK that notifies a ReadyRemitEvent. |
Usage
You can create the ReadyRemitConfiguration object with default values and passing the required attributes:
val sdkConfiguration = ReadyRemitConfiguration(
authenticateIntoTheSdk = {
// call auth api and pass back the AuthenticationResult
AuthenticationResult.Success(
AccessTokenDetails(
accessToken = "access token value",
expiresIn = 86400,
scope = "scope...",
tokenType = "Bearer"
)
)
},
submitTransfer = { _ ->
TransferSubmissionResult.Success("transfer-id")
}
)Or, you can specify all the values you want:
val sdkConfiguration = ReadyRemitConfiguration(
defaultCountry = CountryIso3Code.PER,
idleTimeoutInterval = 360,
environment = ReadyRemitEnvironment.SANDBOX,
fixedRemittanceServiceProvider = RemittanceServiceProvider.VISA,
fixedTransferMethod = TransferType.BANK_ACCOUNT,
localization = Localization.esMx,
supportedAppearance = SupportedAppearance.DEVICE,
sourceAccounts = listOf(),
authenticateIntoTheSdk = {
// call auth api and pass back the AuthenticationResult
AuthenticationResult.Success(
AccessTokenDetails(
accessToken = "access token value",
expiresIn = 86400,
scope = "scope...",
tokenType = "Bearer"
)
)
},
submitTransfer = { _ ->
TransferSubmissionResult.Success("transfer-id")
},
sdkEventListener = { event ->
}
)Updated 8 days ago
