createSetupIntent

suspend fun Terminal.createSetupIntent(parameters: SetupIntentParameters, createConfiguration: CreateConfiguration? = null): SetupIntent

Return

The created SetupIntent

Parameters

parameters

The parameters for creating the SetupIntent

createConfiguration

Optional configuration for the creation process

See also

Creates a new SetupIntent with the specified parameters.

Example usage:

try {
val setupIntent = terminal.createSetupIntent(
SetupIntentParameters.Builder()
.setCustomer("cus_123")
.build(),
createConfiguration
)
// Handle successful creation
} catch (e: TerminalException) {
// Handle creation failure
}

Throws

if the creation operation fails