CardPaymentMethodDetails.token constructor

  1. @FreezedUnionValue('card')
const CardPaymentMethodDetails.token({
  1. required CardTokenPaymentMethod card,
  2. @JsonKey(name: "billing_details") BillingDetails? billingDetails,
})

For backwards compatibility, you can convert an existing Token into a PaymentMethod with stripe.confirmCardPayment by passing the Token to payment_methodtoken. The newly created PaymentMethod will be used to confirm the PaymentIntent.

Implementation

@FreezedUnionValue('card')
const factory CardPaymentMethodDetails.token({
  /// Uses the provided card or cardNumber Element for confirmation.
  required CardTokenPaymentMethod card,

  /// The billing_details associated with the card.
  @JsonKey(name: "billing_details") BillingDetails? billingDetails,
}) = _CardPaymentMethodDetailsToken;