ACH API (US Only)

ACH API provide functionality for initiating payments on your user's behalf.

createACHPullTransfer

Parameters

šŸ“˜

Note

Behavior of the SDK depends on the parameters that will be set.

Parameter

Description

description

A message associated with the transfer.

fromAccount

Account from where the amount must be transferred. If you don't set a from account, SDK will simply display a popup screen for your user to pick the account from our UI.
If you do provide a from object, this screen won't be displayed.

amount

Amount to be transferred. If you don't set an amount SDK will display a screen with a numpad screen for your user to enter the amount in.

Implement DapiTransferCallback to handle a successful or a failed transfer attempt.

Dapi.transferCallback = object : DapiTransferCallback {

    override fun onTransferSuccess(result: DapiTransferResult.Success) {
        
    }

    override fun onTransferFailure(result: DapiTransferResult.Error) {
        
    }
    
    override fun willTransferAmount(result: DapiTransferResult.PreTransfer) {
        
    }

    override fun onUiDismissed() {
        
    }
}

Example - WhenfromAccount Is Not Specified

connection.createACHPullTransfer(
    description = "test",
    amount = 1.0
)

The SDK shows UI for the user to select an account to send money from

Example - Whenamount Is Not Specified

connection.createACHPullTransfer(
    description = "test",
    fromAccount = account
)

The SDK shows UI for the user to enter the amount to send

Example - Whenamount and fromAccount Are Not Specified

connection.createACHPullTransfer(
    description = "test"
)

The SDK shows UI for the user to select an account to send money from then navigate to the amount screen to enter the amount to send