Skip to content

fix: Remove empty bank parameter from iDEAL payments #2186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RRosalia
Copy link

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
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
1 participant