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.

PropertyRequiredTypeDescription
defaultCountryNoCountryIso3CodeThe default country ISO 3166-1 alpha-3 code to set as default to start a transfer. This is defined by an enum.
idleTimeoutIntervalNoIntTimeout 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.
environmentNoReadyRemitEnvironmentThe server environment that the SDK will connect to. This is defined by an enum.
fixedRemittanceServiceProviderNoRemittanceServiceProviderThe Remittance Service Provider that will be used to execute transfers. Defined by an enum.
fixedTransferMethodNoTransferTypeThe only transfer method type that wil be available when running the SDK.
localizationNoLocalizationThe localization to use in the SDK. This will handle the language and country to format the currencies, dates and texts.
supportedAppearanceNoSupportedAppearanceControls whether the SDK uses light, dark, or device appearance.
sourceAccountsNo[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]YesSuspend FunctionSuspend 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]YesSuspend FunctionSuspend function to be called from the SDK to submit the transfer. It expects a TransferSubmissionResult object type as result.
sdkEventListenerNo[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 ->

    }
)