confirmSetupIntent method

Future<SetupIntent> confirmSetupIntent({
  1. required String paymentIntentClientSecret,
  2. required PaymentMethodParams params,
  3. PaymentMethodOptions? options,
})

Confirm the SetupIntent using the paymentIntentClientSecret and params.

Use this method when the customer submits the form for SetupIntent.

Throws a StripeException when confirming the setupintent fails.

Implementation

Future<SetupIntent> confirmSetupIntent({
  required String paymentIntentClientSecret,
  required PaymentMethodParams params,
  PaymentMethodOptions? options,
}) async {
  await _awaitForSettings();
  try {
    final setupIntent = await _platform.confirmSetupIntent(
        paymentIntentClientSecret, params, options);
    return setupIntent;
  } on StripeException {
    rethrow;
  }
}