Skip to main content

Android SDK - Reference


Package

The Android SDK contains everything necessary to kick off the linking and payment flow and debug issues resulting from failed linking/payment attempts.

Members

  • LinkAccountDialog

    Encapsulates the account linking/payment flow

  • SessionResult

    Stores the outcome of a completed linking/payment session

  • SessionResultViewModel

    ViewModel implementation to share the result

  • LinkError

    Encapsulates errors returned from account linking

  • LinkEnvironment

    Link environment

  • LinkIntegrationService

    Provider of additional UI controls to support the integration

LinkAccountDialog

This class is the entry point to linking bank accounts. To begin initiating bank account linking, you create a LinkAccountDialog instance and then call the display function.

  • sessionKey

    string

    Your session key

  • environment

    LinkEnvironment

    Link environment

  • redirectUrl

    string

    The URL to be called when the linking/payment session completes

Methods

  • create

    (sessionKey: String, environment: LinkEnvironment, redirectUrl: String): LinkAccountDialog

    Creates a new Link Account Dialog instance

  • display

    (context: Context, sessionComplete: (SessionResult) -> Unit, onClose: () -> Unit)

    Kicks off the linking flow. Calls the session completion handler when linking is complete. Calls the optional onClose event handler if the user clicked the X button to close the Chrome view.

LinkError

  • statusCode

    Int?

    Error code

  • message

    String

    Error message

LinkEnvironment

  • production

    enum

    Enum type pointing to production

  • sandbox

    enum

    Enum type pointing to sandbox

SessionResult

  • onSuccess

    String

    String value representing the customer ID

  • onFailure

    LinkError

    Encapsulates errors returned from account linking

SessionResultViewModal

  • sessionResult

    LiveData<SessionResult>

    Live data object that can be observed for results

Methods

  • setSessionResult

    (sessionResult: SessionResult)

    Populates view model object with the Session Result

LinkIntegrationService

Service that provides additional UI controls to support integrations.

Methods

  • createButton

    (sessionKey: String, environment: LinkEnvironment, context: Context, redirectURL: String, sessionComplete: (SessionResult) -> Unit)

    Creates a Link-styled button that when clicked initiates a link session