confirmSetupIntent
Return
The confirmed SetupIntent
Parameters
intent
The SetupIntent to confirm
See also
Confirms a SetupIntent after collecting the payment method.
This suspend function wraps Terminal.confirmSetupIntent and integrates with Kotlin's structured concurrency. If the coroutine calling this function is cancelled, the underlying confirm operation will automatically be cancelled as well.
Example usage:
val job = coroutineScope.launch {
try {
val confirmedIntent = terminal.confirmSetupIntent(setupIntent)
// Handle successful confirmation
} catch (e: TerminalException) {
// Handle confirmation failure
}
}
// Cancelling the job will cancel the confirm operation
job.cancel()Content copied to clipboard
Throws
if the confirmation operation fails