Manage payment methods in settings
Use the Payment Method Settings Sheet to let your customers manage their payment methods in your app settings page.
Note
The Payment Method Settings Sheet is intended for use on an app settings page. For checkout and payments, use the In-app Payments, which also has built-in support for saving and displaying payment methods and supports more payment methods than the Payment Method Settings Sheet.
Note
In code, this component is referenced as CustomerSheet
for historical reasons. Throughout the documentation, when you see CustomerSheet
in code examples, this refers to the Payment Method Settings Sheet.
The Payment Method Settings Sheet is a prebuilt UI component that lets your customers manage their saved payment methods. You can use the Payment Method Settings Sheet UI outside of a checkout flow, and the appearance and styling is customizable to match the appearance and aesthetic of your app. Customers can add and remove payment methods, which get saved to the customer object, and set their default payment method stored locally on the device. Use both the In-app Payments and the Payment Method Settings Sheet to provide customers a consistent end-to-end solution for saved payment methods.

First, you need a Stripe account. Register now.
To install the SDK, add stripe-android
to the dependencies
block of your app/build.gradle file:
Note
For details on the latest SDK release and past versions, see the Releases page on GitHub. To receive notifications when a new release is published, watch releases for the repository.
Configure the SDK with your Stripe publishable key so that it can make requests to the Stripe API, such as in your Application
subclass:
View your payment methods settings and enable the payment methods you want to support. You need at least one payment method enabled to create a SetupIntent.
By default, Stripe enables cards and other prevalent payment methods that can help you reach more customers, but we recommend turning on additional payment methods that are relevant for your business and customers. See Payment method support for product and payment method support, and our pricing page for fees.
Note
At this time, Payment Method Settings Sheet only supports cards and US bank accounts.
Create two endpoints on your server: one for fetching a Customer’s ephemeral key, and one to create a SetupIntent for saving a new payment method to the Customer.
- Create an endpoint to return a Customer ID and an associated ephemeral key. You can view the API version used by the SDK here.
- Create an endpoint to return a SetupIntent configured with the Customer ID.
If you only plan to use the payment method for future payments when your customer is present during the checkout flow, set the usage parameter to on_session to improve authorization rates.
A StripeCustomerAdapter
enables a CustomerSheet
to communicate with Stripe. On the client, configure a CustomerAdapter
to make requests to these endpoints on your server.
Next, initialize the Payment Method Settings Sheet using the CustomerSheet
class with your CustomerAdapter
then call configure
with a CustomerSheet.Configuration. Always call configure
before calling present
and retrievePaymentOptionSelection
.
Present the Payment Method Settings Sheet using CustomerSheet
. When the customer dismisses the sheet, the CustomerSheet
calls the completion block with a CustomerSheetResult
.
- If the customer selects a payment method, the result is
CustomerSheetResult.
. The associated value is the selectedSelected PaymentOptionSelection
, or null if the user deleted the previously-selected payment method. The full payment method details are available in thePaymentOptionSelection
’spaymentMethod
value. - If the customer cancels the sheet, the result is
CustomerSheetResult.
. The associated value is the customer’s originalCanceled PaymentOptionSelection
, or null if the customer hasn’t selected a payment method before or has deleted the originally selected payment method. - If an error occurs, the result is
CustomerSheetResult.
.Failed
Set up your integration
To use Google Pay, first enable the Google Pay API by adding the following to the <application>
tag of your AndroidManifest.xml:
For more details, see Google Pay’s Set up Google Pay API for Android.
Add Google Pay
To add Google Pay to your integration, pass true
to googlePayEnabled when initializing CustomerSheet.Configuration with CustomerSheet.Configuration.Builder.
To enable ACH debit payments include Financial Connections as a dependency for your app.
The Stripe Android SDK is open source and fully documented.
To install the SDK, add financial-connections
to the dependencies
block of your app/build.gradle file:
Note
For details on the latest SDK release and past versions, see the Releases page on GitHub. To receive notifications when a new release is published, watch releases for the repository.
To fetch the default payment method without presenting the Payment Method Settings Sheet, call retrievePaymentOptionSelection()
on CustomerSheet
.
Appearance
Customize the colors, fonts, and other appearance attributes to match the look and feel of your app by using the appearance API.
Behavior
To add custom behavior for attaching, detaching, and listing saved payment methods, implement your own adapter that implements CustomerAdapter.
Note
retrievePaymentMethods
can filter out saved payment methods from being shown, but won’t impact the type of payment methods that are addable.
Default billing details
To set default values for billing details collected in the customer sheet, configure the defaultBillingDetails property. The CustomerSheet
pre-populates its fields with the values that you provide.
Billing details collection
Use billingDetailsCollectionConfiguration to specify how you want to collect billing details in the payment sheet.
You can collect your customer’s name, email, phone number, and address.
To attach values that aren’t collected by CustomerSheet
, add them to the defaultBillingDetails property and set billingDetailsCollectionConfiguration.
to true
. Make sure that you complete this step if you don’t plan to collect values required by the payment method.
Note
Consult with your legal team regarding laws that apply to you collecting information. Only collect phone numbers if you need them for the transaction.