PaymentSheet

class PaymentSheet

A drop-in class that presents a bottom sheet to collect and process a customer's payment.

Constructors

Link copied to clipboard
fun PaymentSheet(activity: ComponentActivity, callback: PaymentSheetResultCallback)

Constructor to be used when launching the payment sheet from an Activity.

Link copied to clipboard
fun PaymentSheet(fragment: Fragment, callback: PaymentSheetResultCallback)

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

Types

Link copied to clipboard
data class Address(city: String?, country: String?, line1: String?, line2: String?, postalCode: String?, state: String?) : Parcelable
Link copied to clipboard
data class BillingDetails(address: PaymentSheet.Address?, email: String?, name: String?, phone: String?) : Parcelable
Link copied to clipboard
data class Configuration @JvmOverloads constructor(merchantDisplayName: String, customer: PaymentSheet.CustomerConfiguration?, googlePay: PaymentSheet.GooglePayConfiguration?, primaryButtonColor: ColorStateList?, defaultBillingDetails: PaymentSheet.BillingDetails?, allowsDelayedPaymentMethods: Boolean) : Parcelable

Configuration for PaymentSheet

Link copied to clipboard
data class CustomerConfiguration(id: String, ephemeralKeySecret: String) : Parcelable
Link copied to clipboard
interface FlowController

A class that presents the individual steps of a payment sheet flow.

Link copied to clipboard
data class GooglePayConfiguration(environment: PaymentSheet.GooglePayConfiguration.Environment, countryCode: String, currencyCode: String?) : Parcelable

Functions

Link copied to clipboard
fun presentWithPaymentIntent(paymentIntentClientSecret: String, configuration: PaymentSheet.Configuration? = null)

Present the payment sheet to process a PaymentIntent. If the PaymentIntent is already confirmed, PaymentSheetResultCallback will be invoked with PaymentSheetResult.Completed.

Link copied to clipboard
fun presentWithSetupIntent(setupIntentClientSecret: String, configuration: PaymentSheet.Configuration? = null)

Present the payment sheet to process a SetupIntent. If the SetupIntent is already confirmed, PaymentSheetResultCallback will be invoked with PaymentSheetResult.Completed.