SepaDebitPaymentMethodDetails.withIban constructor

  1. @FreezedUnionValue('sepa_debit')
const SepaDebitPaymentMethodDetails.withIban({
  1. @JsonKey(name: "sepa_debit") required SepaDebitIbanData sepaDebit,
  2. @JsonKey(name: "billing_details") SepaBillingDetails? billingDetails,
})

If you already know the customer’s bank or want to collect it yourself, then you do not need to use the idealBank Element. You can pass in the customer’s bank code directly to create a new PaymentMethod and confirm the PaymentIntent.

Implementation

@FreezedUnionValue('sepa_debit')
const factory SepaDebitPaymentMethodDetails.withIban({
  /// Uses the provided card or cardNumber Element for confirmation.
  @JsonKey(name: "sepa_debit") required SepaDebitIbanData sepaDebit,

  /// The customer's billing_details. name and email are required.
  @JsonKey(name: "billing_details") SepaBillingDetails? billingDetails,
}) = _SepaDebitPaymentMethodDetailsWithIban;