PaymentSheet

constructor(activity: ComponentActivity, callback: PaymentSheetResultCallback)

Constructor to be used when launching PaymentSheet from a ComponentActivity.

Parameters

activity

The Activity that is presenting PaymentSheet.

callback

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


constructor(activity: ComponentActivity, createIntentCallback: CreateIntentCallback, paymentResultCallback: PaymentSheetResultCallback)

Constructor to be used when launching PaymentSheet from a ComponentActivity and intending to create and optionally confirm the PaymentIntent or SetupIntent on your server.

Parameters

activity

The Activity that is presenting PaymentSheet.

createIntentCallback

Called when the customer confirms the payment or setup.

paymentResultCallback

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


constructor(fragment: Fragment, callback: PaymentSheetResultCallback)

Constructor to be used when launching the payment sheet from a Fragment.

Parameters

fragment

the Fragment that is presenting the payment sheet.

callback

called with the result of the payment after the payment sheet is dismissed.


constructor(fragment: Fragment, createIntentCallback: CreateIntentCallback, paymentResultCallback: PaymentSheetResultCallback)

Constructor to be used when launching PaymentSheet from a Fragment and intending to create and optionally confirm the PaymentIntent or SetupIntent on your server.

Parameters

fragment

The Fragment that is presenting PaymentSheet.

createIntentCallback

Called when the customer confirms the payment or setup.

paymentResultCallback

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