SetupPaymentSheetParameters constructor

  1. @JsonSerializable(explicitToJson: true)
const SetupPaymentSheetParameters({
  1. @Default(false) bool customFlow,
  2. String? customerId,
  3. String? customerEphemeralKeySecret,
  4. String? paymentIntentClientSecret,
  5. String? setupIntentClientSecret,
  6. String? merchantDisplayName,
  7. PaymentSheetApplePay? applePay,
  8. @JsonKey(toJson: UserInterfaceStyleKey.toJson) ThemeMode? style,
  9. PaymentSheetGooglePay? googlePay,
  10. @Default(false) bool allowsDelayedPaymentMethods,
  11. PaymentSheetAppearance? appearance,
  12. @JsonKey(name: 'defaultBillingDetails') BillingDetails? billingDetails,
  13. String? returnURL,
})

Implementation

@JsonSerializable(explicitToJson: true)
const factory SetupPaymentSheetParameters({
  /// Whether or not to use a custom flow.
  ///
  /// If this value is true, the payment sheet will allow to select a payment method
  /// and a later confirmation will be needed by calling [confirmPaymentSheetPayment]
  /// By default, false.
  @Default(false) bool customFlow,

  /// The identifier of the Stripe Customer object.
  /// See https://stripe.com/docs/api/customers/object#customer_object-id
  String? customerId,

  ///A temp key can be used for API operations that require a secret key.
  String? customerEphemeralKeySecret,

  /// Secret used for client-side retrieval using a publishable key.
  ///
  /// If this value is null make sure to add a [setupIntentClientSecret]
  String? paymentIntentClientSecret,

  /// The client secret of this SetupIntent
  ///
  /// If this value is null make sure to add a [paymentIntentClientSecret]

  String? setupIntentClientSecret,

  /// Display name of the merchant
  String? merchantDisplayName,

  /// Configuration related to Apple Pay
  /// If set, PaymentSheet displays Apple Pay as a payment option
  PaymentSheetApplePay? applePay,

  /// Style options for colors in PaymentSheet
  ///
  /// Parts can be overridden by [appearance].
  @JsonKey(toJson: UserInterfaceStyleKey.toJson) ThemeMode? style,

  /// Configuration related to Google Pay
  /// If set, PaymentSheet displays Google Pay as a payment option
  PaymentSheetGooglePay? googlePay,

  /// Flag that allows payment methods that do not move money at the send of the checkout.
  ///
  /// Defaul value is false.
  @Default(false) bool allowsDelayedPaymentMethods,

  /// Appearance of the paymentsheet.
  ///
  /// When no appearance defined it will fallback to [style] or Stripe default.
  PaymentSheetAppearance? appearance,

  /// Default billing information of the customer.
  ///
  /// Use this field to already prefill the customers billingDetails in the payment sheet.
  /// For example when you supply a country the country will be set on the payment sheet +
  /// alternative localization options. This does not set the billingDetails on the
  /// paymentIntent since the customer can change those.
  @JsonKey(name: 'defaultBillingDetails') BillingDetails? billingDetails,

  /// Return URL is required for IDEAL and few other payment methods
  String? returnURL,
}) = _SetupParameters;