create

Create a FlowController that you configure with a client secret by calling configureWithPaymentIntent or configureWithSetupIntent.

Parameters

activity

The Activity that is presenting PaymentSheet.

paymentOptionCallback

Called when the customer's selected payment method changes.

paymentResultCallback

Called with the result of the payment after PaymentSheet is dismissed.


fun create(activity: ComponentActivity, externalPaymentMethodConfirmHandler: ExternalPaymentMethodConfirmHandler, paymentOptionCallback: PaymentOptionCallback, paymentResultCallback: PaymentSheetResultCallback): PaymentSheet.FlowController

Create a FlowController that you configure with a client secret by calling configureWithPaymentIntent or configureWithSetupIntent.

Use this creator if external payment methods are specified in your Configuration.

Parameters

activity

The Activity that is presenting PaymentSheet.

externalPaymentMethodConfirmHandler

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

paymentOptionCallback

Called when the customer's selected payment method changes.

paymentResultCallback

Called with the result of the payment after PaymentSheet is dismissed.


fun create(activity: ComponentActivity, paymentOptionCallback: PaymentOptionCallback, createIntentCallback: CreateIntentCallback, paymentResultCallback: PaymentSheetResultCallback): PaymentSheet.FlowController

Create a FlowController that you configure with an IntentConfiguration by calling configureWithIntentConfiguration.

Parameters

activity

The Activity that is presenting PaymentSheet.

paymentOptionCallback

Called when the customer's selected payment method changes.

createIntentCallback

Called when the customer confirms the payment or setup.

paymentResultCallback

Called with the result of the payment after PaymentSheet is dismissed.


fun create(activity: ComponentActivity, paymentOptionCallback: PaymentOptionCallback, externalPaymentMethodConfirmHandler: ExternalPaymentMethodConfirmHandler, createIntentCallback: CreateIntentCallback, paymentResultCallback: PaymentSheetResultCallback): PaymentSheet.FlowController

Create a FlowController that you configure with an IntentConfiguration by calling configureWithIntentConfiguration.

Use this creator if external payment methods are specified in your Configuration.

Parameters

activity

The Activity that is presenting PaymentSheet.

paymentOptionCallback

Called when the customer's selected payment method changes.

externalPaymentMethodConfirmHandler

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

createIntentCallback

Called when the customer confirms the payment or setup.

paymentResultCallback

Called with the result of the payment after PaymentSheet is dismissed.


fun create(fragment: Fragment, paymentOptionCallback: PaymentOptionCallback, paymentResultCallback: PaymentSheetResultCallback): PaymentSheet.FlowController

Create a FlowController that you configure with a client secret by calling configureWithPaymentIntent or configureWithSetupIntent.

Parameters

fragment

The Fragment that is presenting PaymentSheet.

paymentOptionCallback

called when the customer's PaymentOption selection changes.

paymentResultCallback

called when a PaymentSheetResult is available.


fun create(fragment: Fragment, externalPaymentMethodConfirmHandler: ExternalPaymentMethodConfirmHandler, paymentOptionCallback: PaymentOptionCallback, paymentResultCallback: PaymentSheetResultCallback): PaymentSheet.FlowController

Create a FlowController that you configure with a client secret by calling configureWithPaymentIntent or configureWithSetupIntent.

Use this creator if external payment methods are specified in your Configuration.

Parameters

fragment

The Fragment that is presenting PaymentSheet.

externalPaymentMethodConfirmHandler

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

paymentOptionCallback

called when the customer's PaymentOption selection changes.

paymentResultCallback

called when a PaymentSheetResult is available.


fun create(fragment: Fragment, paymentOptionCallback: PaymentOptionCallback, createIntentCallback: CreateIntentCallback, paymentResultCallback: PaymentSheetResultCallback): PaymentSheet.FlowController

Create a FlowController that you configure with an IntentConfiguration by calling configureWithIntentConfiguration.

Parameters

fragment

The Fragment that is presenting PaymentSheet.

paymentOptionCallback

Called when the customer's selected payment method changes.

createIntentCallback

Called when the customer confirms the payment or setup.

paymentResultCallback

Called with the result of the payment after PaymentSheet is dismissed.


fun create(fragment: Fragment, paymentOptionCallback: PaymentOptionCallback, createIntentCallback: CreateIntentCallback, externalPaymentMethodConfirmHandler: ExternalPaymentMethodConfirmHandler, paymentResultCallback: PaymentSheetResultCallback): PaymentSheet.FlowController

Create a FlowController that you configure with an IntentConfiguration by calling configureWithIntentConfiguration.

Use this creator if external payment methods are specified in your Configuration.

Parameters

fragment

The Fragment that is presenting PaymentSheet.

paymentOptionCallback

Called when the customer's selected payment method changes.

externalPaymentMethodConfirmHandler

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

createIntentCallback

Called when the customer confirms the payment or setup.

paymentResultCallback

Called with the result of the payment after PaymentSheet is dismissed.