stripe: Payment flow never cancel
Platform
- Web
- iOS
- Android
Describe the bug
When you call Stripe.presentPaymentFlow() it opens a closable modal sheet. Unfortunately, the return of this function is inconsistent as it’s not able to distinguish between the modal sheet being closed or a credit card being selected.
Actually if you close it with the cross, you get the cardNumber of the default selected credit card and the PaymentFlowEventsEnum.Completed event is triggered instead of PaymentFlowEventsEnum.Canceled. This is not what’s expected.
To Reproduce Steps to reproduce the behavior:
- Call
Stripe.presentPaymentFlow() - Press the cross to close the modal
- See the
PaymentFlowEventsEnum.Completedbeing triggered and the function return the default selected card.
Expected behavior
The PaymentFlowEventsEnum.Canceled being triggered on cancel.
Edit I tested with the iOS Simulator and that doesn’t work either. The default selected payment method is returned.
Here is a screenshot taken right after presentPaymentFlow(). Pressing the cross is equivalent to pressing on Google Pay or on the credit card already registered, depending on the default selected payment method.

About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 22 (13 by maintainers)
OK I though it was used to preset the country when entering credit card detail. My bad.
Thanks.
I released v3.9.1-0. Please try in PaymentSheet method. Thanks.
@cyrilfr
Ok, I understand completely. But looking at the Android logs, there doesn’t seem to be a difference between submit and close. Please give me some time to discuss this with the stripe team.
Oh, I see. I misunderstood to your issue. Please give me some time. This is my first time, so I will investigate from 0.
Thanks.