confirmPaymentIntent method

Future<Map<String, dynamic>> confirmPaymentIntent(
  1. String clientSecret, {
  2. Map<String, dynamic>? data,
})

Implementation

Future<Map<String, dynamic>> confirmPaymentIntent(String clientSecret, {Map<String, dynamic>? data}) async {
  data ??= {};
  final intent = _parseIdFromClientSecret(clientSecret);
  data['client_secret'] = clientSecret;
  final path = '/payment_intents/$intent/confirm';
  return _apiHandler.request(RequestMethod.post, path, publishableKey, apiVersion, params: data);
}