Type Alias CustomerSheetOptionalInitParams

CustomerSheetOptionalInitParams: {
    style?: "alwaysLight" | "alwaysDark" | "automatic";
    appearance?: PaymentSheet.AppearanceParams;
    merchantDisplayName?: string;
    headerTextForSelectionScreen?: string;
    defaultBillingDetails?: BillingDetails;
    billingDetailsCollectionConfiguration?: PaymentSheet.BillingDetailsCollectionConfiguration;
    returnURL?: string;
    removeSavedPaymentMethodMessage?: string;
    applePayEnabled?: boolean;
    googlePayEnabled?: boolean;
    paymentMethodOrder?: string[];
    preferredNetworks?: CardBrand[];
    allowsRemovalOfLastSavedPaymentMethod?: boolean;
    cardBrandAcceptance?: PaymentSheet.CardBrandAcceptance;
    opensCardScannerAutomatically?: boolean;
}

Type declaration

  • Optionalstyle?: "alwaysLight" | "alwaysDark" | "automatic"

    The color styling to use for PaymentSheet UI. Defaults to 'automatic'. iOS only.

  • Optionalappearance?: PaymentSheet.AppearanceParams

    Configuration for the look and feel of the UI.

  • OptionalmerchantDisplayName?: string

    Your customer-facing business name. The default value is the name of your app.

  • OptionalheaderTextForSelectionScreen?: string

    Optional configuration for setting the header text of the Payment Method selection screen

  • OptionaldefaultBillingDetails?: BillingDetails

    CustomerSheet pre-populates fields with the values provided. If billingDetailsCollectionConfiguration.attachDefaultsToPaymentMethod is true, these values will be attached to the payment method even if they are not collected by the CustomerSheet UI.

  • OptionalbillingDetailsCollectionConfiguration?: PaymentSheet.BillingDetailsCollectionConfiguration

    Describes how billing details should be collected. All values default to AUTOMATIC. If NEVER is used for a required field for the Payment Method, you must provide an appropriate value as part of defaultBillingDetails.

  • OptionalreturnURL?: string

    A URL that redirects back to your app that CustomerSheet can use to auto-dismiss web views used for additional authentication, e.g. 3DS2

  • OptionalremoveSavedPaymentMethodMessage?: string

    Optional configuration to display a custom message when a saved payment method is removed. iOS only.

  • OptionalapplePayEnabled?: boolean

    Whether to show Apple Pay as an option. Defaults to false. iOS only.

  • OptionalgooglePayEnabled?: boolean

    Whether to show Google Pay as an option. Defaults to false. Android only.

  • OptionalpaymentMethodOrder?: string[]

    By default, CustomerSheet will use a dynamic ordering that optimizes payment method display for the customer. You can override the default order in which payment methods are displayed with a list of payment method types. Android only.

    • Example: ["card", "klarna"]
  • OptionalpreferredNetworks?: CardBrand[]

    The list of preferred networks that should be used to process payments made with a co-branded card. This value will only be used if your user hasn't selected a network themselves.

  • OptionalallowsRemovalOfLastSavedPaymentMethod?: boolean

    This is an experimental feature that may be removed at any time. Defaults to true. If true, the customer can delete all saved payment methods. If false, the customer can't delete if they only have one saved payment method remaining.

  • OptionalcardBrandAcceptance?: PaymentSheet.CardBrandAcceptance

    By default, CustomerSheet will accept all supported cards by Stripe. You can specify card brands CustomerSheet should block or allow payment for by providing an array of those card brands. Note: This is only a client-side solution. Note: Card brand filtering is not currently supported in Link.

  • OptionalopensCardScannerAutomatically?: boolean

    By default, CustomerSheet offers a card scan button within the new card entry form. When opensCardScannerAutomatically is set to true, the card entry form will initialize with the card scanner already open. Defaults to false.