code: @Nullable
      PaymentIntent confirmPaymentIntent(
              @NonNull PaymentIntentParams paymentIntentParams,
              @NonNull String publishableKey,
              @Nullable String stripeAccount)
              throws AuthenticationException,
              InvalidRequestException,
              APIConnectionException,
              APIException {
          final Map<String, Object> paramMap = paymentIntentParams.toParamMap();
          mNetworkUtils.addUidParamsToPaymentIntent(paramMap);
          final RequestOptions options = RequestOptions.builder(publishableKey, stripeAccount,
                  RequestOptions.TYPE_QUERY)
                  .build();
  
          try {
              final String apiKey = options.getPublishableApiKey();
              if (StripeTextUtils.isBlank(apiKey)) {
                  return null;
              }
  
              logTelemetryData();
              final SourceParams sourceParams = paymentIntentParams.getSourceParams();
              final String sourceType = sourceParams != null ? sourceParams.getType() : null;
              final Map<String, Object> loggingParams = mLoggingUtils
                      .getPaymentIntentConfirmationParams(null, apiKey, sourceType);
              RequestOptions loggingOptions = RequestOptions.builder(publishableKey).build();
              logApiCall(loggingParams, loggingOptions);
              final String paymentIntentId = PaymentIntent.parseIdFromClientSecret(
                      paymentIntentParams.getClientSecret());
              final StripeResponse response = requestData(RequestExecutor.RestMethod.POST,
                      getConfirmPaymentIntentUrl(paymentIntentId), paramMap, options);
              return PaymentIntent.fromString(response.getResponseBody());
          } catch (CardException unexpected) {
              // This particular kind of exception should not be possible from a PaymentI API endpoint
              throw new APIException(unexpected.getMessage(), unexpected.getRequestId(),
                      unexpected.getStatusCode(), null, unexpected);
          }
      }
docs: Confirm a {@link PaymentIntent} using the provided {@link PaymentIntentParams}
  
  @param paymentIntentParams contains the confirmation params
  @param publishableKey an API key
  @param stripeAccount a connected Stripe Account ID
  @return a {@link PaymentIntent} reflecting the updated state after applying the parameter
  provided