@NonNull
    public static PaymentIntentParams createConfirmPaymentIntentWithSourceIdParams(
            @Nullable String sourceId,
            @NonNull String clientSecret,
            @NonNull String returnUrl,
            boolean savePaymentMethod) {
        return new PaymentIntentParams()
                .setSourceId(sourceId)
                .setClientSecret(clientSecret)
                .setReturnUrl(returnUrl)
                .setSavePaymentMethod(savePaymentMethod);
    }
@ NonNull public static PaymentIntentParams createConfirmPaymentIntentWithSourceIdParams ( @ Nullable String sourceId , @ NonNull String clientSecret , @ NonNull String returnUrl , boolean savePaymentMethod ) { return new PaymentIntentParams ( ) . setSourceId ( sourceId ) . setClientSecret ( clientSecret ) . setReturnUrl ( returnUrl ) . setSavePaymentMethod ( savePaymentMethod ) ; }
Create the parameters necessary for confirming a PaymentIntent while attaching a source that
already exits.

@param sourceId the ID of the source that is being attached to the PaymentIntent being
confirmed
@param clientSecret client secret from the PaymentIntent being confirmed
@param returnUrl the URL the customer should be redirected to after the authorization
process
@param savePaymentMethod Set to {@code true} to save this PaymentIntent’s source to the
associated Customer, if the source is not already attached.
This parameter only applies to the source passed in the same request
or the current source attached to the PaymentIntent and must be
specified again if a new source is added.
@return params that can be use to confirm a PaymentIntent