Skip to content

flutter_stripe sends empty bank field for iDEAL payment #2185

@RRosalia

Description

@RRosalia

Describe the Bug

As part of the latest updates from Stripe regarding iDEAL payment integration, we are now required to remove the bank parameter and not display a bank selector to users in self-collected flows:

🔗 Stripe Migration Guide

We have updated our Flutter application accordingly and no longer collect or send the bank name. However, we discovered that the flutter_stripe web implementation still attempts to send an empty bank field, even when it's not provided by the developer.

This causes a Stripe API error stating that empty parameters for payment_method_data[ideal][bank] are not allowed.


💥 Error Message from Stripe

"You passed an empty string for 'payment_method_data[ideal][bank]'. We assume empty values are an attempt to unset a parameter; however 'payment_method_data[ideal][bank]' cannot be unset. You should remove 'payment_method_data[ideal][bank]' from your request or supply a non-empty value."

📍 Relevant Code in Plugin

File: web_stripe.dart

ideal: stripe_js.IdealBankData(bank: paymentData.bankName ?? ""),

This line causes the empty bank string to always be included, even when not required.


🧪 To Reproduce

const idealPaymentMethodData = stripe_web.PaymentMethodDataIdeal();

await stripe_web.WebStripe.instance.confirmIdealPayment(
  paymentIntentClientSecret,
  idealPaymentMethodData,
  returnUrl: returnUrl,
);

This triggers a failed request to Stripe when no bank name is provided.


✅ Expected Behavior

If bankName is null or not set, the bank field should be omitted entirely from the ideal payment method data object. This aligns with Stripe’s updated guidance for self-collected flows:

🔗 Stripe JS: confirmIdealPayment


📱 Device & Version Info

  • Device: Macbook Pro
  • OS: Browser
  • Package version: flutter_stripe: ^11.5.0
  • Web version: flutter_stripe_web: ^6.5.1
  • Flutter version: 3.35.0-0.1.pre

📎 Additional Resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions