createWithSourceId

fun createWithSourceId(sourceId: String, clientSecret: String, returnUrl: String, savePaymentMethod: Boolean? = null, shipping: ConfirmPaymentIntentParams.Shipping? = null): ConfirmPaymentIntentParams

Create the parameters necessary for confirming a PaymentIntent with an existing Source.

Parameters

sourceId

the ID of the source that is being attached to the PaymentIntent being confirmed

clientSecret

client secret from the PaymentIntent being confirmed

returnUrl

the URL the customer should be redirected to after the authorization process

savePaymentMethod

Set to 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.

shipping

Optional. See Shipping.