stripe-react-native icon indicating copy to clipboard operation
stripe-react-native copied to clipboard

Support for universal links as returnUrls in confirmPayment and confirmSetupIntent

Open jamesblasco opened this issue 2 years ago • 0 comments
trafficstars

Is your feature request related to a problem? Please describe. Right now when using payments like Ideal, stripe needs to take the user to an external app and then get back when confirmed. This is done by a returnUrl param set in PaymentIntentParams

https://github.com/stripe/stripe-react-native/blob/6b834cea5dec3f206d274181057239ae1756f390/ios/StripeSdk.swift#L891-L893

Or in SetupIntentParams https://github.com/stripe/stripe-react-native/blob/6b834cea5dec3f206d274181057239ae1756f390/ios/StripeSdk.swift#L272-L274

The React Native plugin forces to use the global url scheme to be used for the returnUrl. This limits any other solutions like Universal Links on iOS

Describe the solution you'd like

Allow developers to define a returnUrl that is not a url scheme. Maybe with a global returnUrl param in the stripe config.

So instead of just app://safepayit would be possible to define something like https://myapp.com/callback

Additional context This feature was requested for the Flutter Stripe package that shares the native codebase with this package flutter_stripe/1075

jamesblasco avatar Jun 03 '23 10:06 jamesblasco