CustomerAdapter
A bridge to your backend to fetch customer-related information. Typically, you will not need to implement this interface yourself. You should instead use CustomerAdapter.create, which manages retrieving and updating a Stripe customer for you.
The methods in this interface should act on a Stripe Customer
object.
Implement this interface if you would prefer retrieving and updating your Stripe customer object via your own backend instead of using the default implementation.
Use CustomerAdapter.create to create an instance of a CustomerAdapter.
Types
Properties
Whether this backend adapter is able to create setup intents. A SetupIntent is recommended when attaching a new card to a Customer, and required for non-card payments methods. If you are implementing your own CustomerAdapter, return true if setupIntentClientSecretForCustomerAttach is implemented, Otherwise, return false.
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.
Functions
Attaches a payment method to a customer
Detaches the given payment method from a customer
Retrieves a list of payment methods attached to a customer
Retrieve the saved payment method option from a data store. If null, the customer does not have a default saved payment method.
Saves the payment option to a data store.
Returns a SetupIntent client secret to attach a new payment method to a customer. This will call your backend to retrieve a client secret if you have provided a setupIntentClientSecretProvider in the CustomerAdapter.create call.
Updates a payment method with the provided PaymentMethodUpdateParams.