CustomerSheetInitParams class

Parameters to setup a Customer sheet

For more info see https://stripe.com/docs/elements/customer-sheet?platform=react-native

Annotations
  • @freezed

Constructors

CustomerSheetInitParams({@JsonKey(toJson: UserInterfaceStyleKey.toJson) ThemeMode? style, PaymentSheetAppearance? appearance, String? setupIntentClientSecret, required String customerId, required String customerEphemeralKeySecret, String? merchantDisplayName, bool? allowsRemovalOfLastSavedPaymentMethod, String? headerTextForSelectionScreen, BillingDetails? defaultBillingDetails, BillingDetailsCollectionConfiguration? billingDetailsCollectionConfiguration, String? returnURL, String? removeSavedPaymentMethodMessage, @Default(true) bool applePayEnabled, @Default(true) bool googlePayEnabled, @JsonKey(toJson: _cardBrandListToJson) List<CardBrand>? preferredNetworks})
const
factory
CustomerSheetInitParams.fromJson(Map<String, dynamic> json)
factory

Properties

allowsRemovalOfLastSavedPaymentMethod bool?
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.
no setterinherited
appearance PaymentSheetAppearance?
Appearance of the customersheet.
no setterinherited
applePayEnabled bool
Whether to show Apple Pay as an option. Defaults to false.
no setterinherited
billingDetailsCollectionConfiguration 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.
no setterinherited
copyWith → $CustomerSheetInitParamsCopyWith<CustomerSheetInitParams>
no setterinherited
customerEphemeralKeySecret String
A short-lived token that allows the SDK to access a Customer's payment methods.
no setterinherited
customerId String
The identifier of the Stripe Customer object. See https://stripe.com/docs/api/customers/object#customer_object-id
no setterinherited
defaultBillingDetails 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.
no setterinherited
googlePayEnabled bool
Whether to show Google Pay as an option. Defaults to false.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
headerTextForSelectionScreen String?
Optional configuration for setting the header text of the Payment Method selection screen
no setterinherited
merchantDisplayName String?
Your customer-facing business name. The default value is the name of your app.
no setterinherited
preferredNetworks List<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.
no setterinherited
removeSavedPaymentMethodMessage String?
Optional configuration to display a custom message when a saved payment method is removed. iOS only.
no setterinherited
returnURL String?
URL that redirects back to your app that CustomerSheet can use to auto-dismiss web views used for additional authentication, e.g. 3DS2
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
setupIntentClientSecret String?
Optional but recommended for cards, required for other payment methods. The SetupIntent client secret that will be used to confirm a new payment method. If this is missing, you will only be able to add cards without authentication steps.
no setterinherited
style ThemeMode?
Color styling used for the Customersheet UI
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited