confirmChargeIntent

suspend fun confirmChargeIntent(intentId: String, clientSecret: String): Pair<ChargeIntent?, NetworkingError?>

Confirms a server-minted charge intent in-app, moving it to an authorized state.

The intent must already exist — your server creates it (POST /v1/charge_intents with sk_) and hands the resulting client_secret to your app. Confirmation authenticates with that client_secret, never the secret key. Mirrors frame-js's confirmCardPayment(clientSecret).

Return

A Pair containing the updated ChargeIntent on success, or a NetworkingError on failure.

Parameters

intentId

The ID of the charge intent to confirm.

clientSecret

The charge intent's server-minted client_secret (ci_<id>_secret_…).


fun confirmChargeIntent(intentId: String, clientSecret: String, completionHandler: (ChargeIntent?, NetworkingError?) -> Unit)

Confirms a server-minted charge intent in-app, moving it to an authorized state.

The intent must already exist — your server creates it (POST /v1/charge_intents with sk_) and hands the resulting client_secret to your app. Confirmation authenticates with that client_secret, never the secret key.

Parameters

intentId

The ID of the charge intent to confirm.

clientSecret

The charge intent's server-minted client_secret (ci_<id>_secret_…).

completionHandler

Called with the updated ChargeIntent on success, or a NetworkingError on failure.