ChargeIntentAPI

Provides coroutine-based and callback-based methods for managing charge intents via the Frame API.

Each operation is available in two flavors: a suspend function for use with coroutines and an overload that accepts a completion handler for callback-based callers.

Functions

Link copied to clipboard
fun cancelChargeIntent(intentId: String, completionHandler: (ChargeIntent?, NetworkingError?) -> Unit)

Cancels a charge intent, preventing it from being confirmed or captured.

Link copied to clipboard

Captures a previously authorized charge intent for the specified amount.

Link copied to clipboard
fun confirmChargeIntent(intentId: String, completionHandler: (ChargeIntent?, NetworkingError?) -> Unit)

Confirms a charge intent, triggering payment processing.

Link copied to clipboard

Creates a new charge intent, attaching the current Sonar session ID and live fraud signals before sending.

Link copied to clipboard

Retrieves a paginated list of all charge intents for the merchant.

Link copied to clipboard
fun getChargeIntent(intentId: String, completionHandler: (ChargeIntent?, NetworkingError?) -> Unit)

Retrieves a single charge intent by its ID.

Link copied to clipboard

Updates mutable fields on an existing charge intent.

Link copied to clipboard
fun voidRemainingChargeIntent(intentId: String, completionHandler: (ChargeIntent?, NetworkingError?) -> Unit)

Voids the uncaptured remainder of a partially captured charge intent.