Skip to content

fix: Remove empty bank parameter from iDEAL payments#2186

Merged
remonh87 merged 1 commit into
flutter-stripe:mainfrom
RRosalia:fix/ideal-empty-bank-parameter
Aug 2, 2025
Merged

fix: Remove empty bank parameter from iDEAL payments#2186
remonh87 merged 1 commit into
flutter-stripe:mainfrom
RRosalia:fix/ideal-empty-bank-parameter

Conversation

@RRosalia

Copy link
Copy Markdown
Contributor

Summary

  • Fixes iDEAL payment integration to comply with Stripe's updated API requirements
  • Removes empty bank parameter that was causing API errors
  • Aligns with Stripe's guidance for self-collected iDEAL flows

Changes Made

  • Modified confirmIdealPayment in web_stripe.dart to create IdealBankData() without bank parameter
  • Added comprehensive tests to verify bank parameter handling
  • Updated existing tests to cover the new behavior

Problem Solved

Previously, the plugin was always sending an empty bank parameter even when not provided by developers, causing this Stripe API error:

"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."

References

Test Plan

  • Unit tests pass for all bank parameter scenarios
  • Backwards compatibility maintained (existing code won't break)
  • Bank parameter is properly omitted from API calls
  • No impact on other payment methods

Fixes #2185

…tripe API changes

- Remove bank parameter from IdealBankData when not provided
- Prevents Stripe API error about empty payment_method_data[ideal][bank] parameter
- Aligns with Stripe's updated guidance for self-collected iDEAL flows
- Add tests to verify bank parameter is properly omitted

Fixes issue where empty bank string was always sent even when not required,
causing API rejection according to Stripe's migration requirements.

Fixes flutter-stripe#2185

@remonh87 remonh87 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!!

@remonh87 remonh87 merged commit 753de34 into flutter-stripe:main Aug 2, 2025
2 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flutter_stripe sends empty bank field for iDEAL payment

2 participants