create
fun create(context: Context, customerEphemeralKeyProvider: CustomerEphemeralKeyProvider, setupIntentClientSecretProvider: SetupIntentClientSecretProvider?, paymentMethodTypes: List<String>? = null): CustomerAdapter
Creates a default implementation of CustomerAdapter which uses Android SharedPreferences as the data store to manage the customer's default saved payment methods locally.
Parameters
context
, the Application context
customerEphemeralKeyProvider
, a callback to retrieve the customer id and ephemeral key. The customer ID is used in this adapter to manage the customer's saved payment methods.
setupIntentClientSecretProvider
, a callback to retrieve the SetupIntent client secret. The client secret is used in this adapter to attach a payment method with a SetupIntent.
paymentMethodTypes
, A list of payment method types to display to the customer. Valid values include: "card", "us_bank_account" If null or empty, the SDK will dynamically determine the payment methods using your Stripe Dashboard settings.