flutter_stripe
flutter_stripe copied to clipboard
P24 not showing up on IOS
Hi, I am creating payment intent with card and P24 as payment methods. On Android everything works fine and I can see P24 method, however on IOS it is not showing up, I will be grateful for any help!




To Reproduce Steps to reproduce the behavior:
- Add P24 to payment methods creating payment intent in API
- Present payment sheet on client side
Expected behavior Payment sheet should show P24 payment method
- Device: Iphone SE Simulator
- OS: IOS 15.5
- Package version: 3.1.0
- Flutter version 3.0.2
Thank you for the excellent problem description. I can reproduce the behavior and I see a crash on iOS related to this. I will create a ticket on the stripe sdk repo.
Hi, I have exact same issue using https://github.com/capacitor-community/stripe I've changed stripe pod version to 21.13.0. It should be compatible with p24 but it didn't help.
Only using p24
So I got it working when you specify a return url in the initPaymentSheet
parameters. This is a required for the P24 method but it should not crash so thats why I keep it open.
Example:
await Stripe.instance.initPaymentSheet(
paymentSheetParameters: SetupPaymentSheetParameters(
// Main params
paymentIntentClientSecret: data['paymentIntent'],
merchantDisplayName: 'Flutter Stripe Store Demo',
// Customer params
customerId: data['customer'],
returnURL: 'flutterstripe://safepay',
}
Thank you, it works perfectly. By the way, what this parameter is responsible for? The documentation does not explain much about it
The return url is: to redirect your customer back to after they authenticate or cancel their payment on the payment method’s app or site. For example on P24 and also iDeal you will enter an external web page where the customer handles the payment. When completed you ideally want to close the webview and make the user return to your app.
Thanks for explanation, however now I am facing another issue with return url provided. I used deep link to return back to my app after the successful payment, but when I am trying to authorize payment on P24 test page, I am not redirected back to the application but payment is being fulfilled in the background, I will be grateful for any help in this case.
Did you also add the deeplink in flutter like: https://docs.flutter.dev/development/ui/navigation/deep-linking ?
Yes, I did it, but the problem is not with the app itself, when payment is successful I can just see infinite loader on P24 page
last versions (try 5.0.0) incorporated some fixes for deeplinking if the issue still persists ping me and I will further investigate it.