rememberPaymentSheetFlowController

Creates a PaymentSheet.FlowController that is remembered across compositions.

This must be called unconditionally, as part of the initialization path.

Parameters

paymentOptionCallback

Called when the customer's desired payment method changes.

paymentResultCallback

Called when a PaymentSheetResult is available.


Creates a PaymentSheet.FlowController that is remembered across compositions. Use this method when you intend to create the com.stripe.android.model.PaymentIntent or com.stripe.android.model.SetupIntent on your server.

This must be called unconditionally, as part of the initialization path.

Parameters

createIntentCallback

Called when the customer confirms the payment or setup.

paymentOptionCallback

Called when the customer's desired payment method changes.

paymentResultCallback

Called when a PaymentSheetResult is available.


fun rememberPaymentSheetFlowController(createIntentCallback: CreateIntentCallback? = null, externalPaymentMethodConfirmHandler: ExternalPaymentMethodConfirmHandler, paymentOptionCallback: PaymentOptionCallback, paymentResultCallback: PaymentSheetResultCallback): PaymentSheet.FlowController

Creates a PaymentSheet.FlowController that is remembered across compositions. Use this method if you implement any external payment methods, as specified in your PaymentSheet.Configuration.

This must be called unconditionally, as part of the initialization path.

If you intend to create the com.stripe.android.model.PaymentIntent or com.stripe.android.model.SetupIntent on your server, include a createIntentCallback.

Parameters

createIntentCallback

If specified, called when the customer confirms the payment or setup.

externalPaymentMethodConfirmHandler

Called when a user confirms payment for an external payment method.

paymentOptionCallback

Called when the customer's desired payment method changes.

paymentResultCallback

Called when a PaymentSheetResult is available.