PlatformPayWebPaymentRequestCreateOptions constructor
- @JsonSerializable(explicitToJson: true)
const
PlatformPayWebPaymentRequestCreateOptions(
{ - required String country,
- required String currency,
- required PlatformPayWebPaymentItem total,
- @Default([]) List<PlatformPayWebPaymentItem> displayItems,
- @Default(false) bool requestPayerName,
- @Default(false) bool requestPayerEmail,
- @Default(false) bool requestPayerPhone,
- @Default(false) bool requestShipping,
- @Default([]) List<PlatformPayWebShippingOption> shippingOptions,
- @Default([]) List<PlatformPayWebWalletType> disableWallets,
})
Implementation
@JsonSerializable(explicitToJson: true)
const factory PlatformPayWebPaymentRequestCreateOptions({
/// The two-letter country code of your Stripe account (e.g., US).
required String country,
/// Three character currency code (e.g., usd).
required String currency,
/// A PaymentItem object. This PaymentItem is shown to the customer in the browser’s payment interface.
required PlatformPayWebPaymentItem total,
/// An array of PaymentItem objects. These objects are shown as line items in the browser’s payment interface.
/// Note that the sum of the line item amounts does not need to add up to the total amount above.
@Default([]) List<PlatformPayWebPaymentItem> displayItems,
/// By default, the browser‘s payment interface only asks the customer for actual payment information. A customer
/// name can be collected by setting this option to true. This collected name will appears in the PaymentResponse object.
///
/// We highly recommend you collect name as this also results in collection of billing address for Apple Pay.
/// The billing address can be used to perform address verification and block fraudulent payments.
/// For all other payment methods, the billing address is automatically collected when available.
@Default(false) bool requestPayerName,
/// See the requestPayerName option.
@Default(false) bool requestPayerEmail,
/// See the requestPayerName option.
@Default(false) bool requestPayerPhone,
/// Collect shipping address by setting this option to true. The address appears in the PaymentResponse.
///
/// You must also supply a valid [ShippingOptions] to the shippingOptions property. This can be up front at the
/// time stripe.paymentRequest is called, or in response to a shippingaddresschange event using the updateWith callback.
@Default(false) bool requestShipping,
/// An array of ShippingOption objects. The first shipping option listed appears in the browser payment interface as the default option.
@Default([]) List<PlatformPayWebShippingOption> shippingOptions,
/// An array of wallet strings. Can be one or more of applePay, googlePay, link, and browserCard. Use this option
/// to disable Apple Pay, Google Pay, Link, and/or browser-saved cards.
@Default([]) List<PlatformPayWebWalletType> disableWallets,
}) = _PaymentRequestCreateOptions;