confirmCustomerPaymentWithHttpInfo method

Future<Response> confirmCustomerPaymentWithHttpInfo({
  1. String? stripeSetupIntentId,
})

Completes the payment setup intent

Confirms the payment setup intent initiated when posting to /cloud/payment. ##### Permissions Must have manage_system permission and be licensed for Cloud. Minimum server version: 5.28 Note: This is intended for internal use and is subject to change.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> confirmCustomerPaymentWithHttpInfo({
  String? stripeSetupIntentId,
}) async {
  // ignore: prefer_const_declarations
  final path = r'/cloud/payment/confirm';

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <MmQueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['multipart/form-data'];

  bool hasFields = false;
  final mp = MultipartRequest('POST', Uri.parse(path));
  if (stripeSetupIntentId != null) {
    hasFields = true;
    mp.fields[r'stripe_setup_intent_id'] = parameterToString(stripeSetupIntentId);
  }
  if (hasFields) {
    postBody = mp;
  }

  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}