#Felix How
1 messages ยท Page 1 of 1 (latest)
Hello ๐
Are you correctly setting up the return URL as shown here?
https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=payment-sheet#react-native-set-up-return-url
Some payment methods won't show if that's misconfigured
Hi hanzo, thanks for your reply. Yes, the return URL should be set up correctly.
The payment methods are showing up on Android, but not on iOS.
The code on our end is the same for both platforms
Hello, can you send me the ID of a payment intent that you presented a payment sheet for on Android where Klarna and iDEAL were not showing up?
Klarna and iDEAL are showing up on Android, but they're not showing up on iOS
Right, just want to check some things on our end for one of these payment intents
What version of stripe-react-native are you on? I will see if this was something that support was added for later
I'm using Expo SDK 48, and thus bound to use stripe-react-native version 0.23.3
But I've set up a new project without Expo using the latest stripe-react-native version 0.27.2
Facing the same issue in both cases
Gotcha, thank you. Checking in to this
And again for reference can you send me a payment intent ID? (pi_123)
Even if the same one is treated differently based on client, it can be helpful to have the info on hand
Is the payment intent ID the same as paymentIntentClientSecret?
Slightly different but the client secret works too
The ID is the thing you use to retrieve and update the intent in the API. It will be of the form pi_123, the secret is specifically for confirming the intent on your client. It will be of the form pi_123_secret_456. For example:
pi_3NEG9XJmquaq3Lbp0fjefSD6
pi_3NEG9XJmquaq3Lbp0fjefSD6_secret_ZkM64Z28VOphCKaj8aHMBrQae
pi_3NGNWjK7ttMTMN5f0GQ8jlJs
Thank you!
That's from our sandbox test env, let me know if you need a production one (app's not public yet so we're using both a staging and production backend still for testing this, with stripe for each of course).
Can the returnURL be dynamic, or must it be static? And using Expo, is it correct to pass a urlScheme to StripeProvider as well passing a returnURL to initPaymentSheet?
Good questions, not sure on those either. Checking in to that and will get back to you as well
When you say dynamic, do you mean that you are changing them after creation? Or just that you build the URL that you are passing to us initially?
I mean that the returnURL is in the form of .../some-page/:orderId where orderId naturally will differ for each individual checkout occasion
Rather than it being in the form of e.g. .../stripe-return or whatever, i.e. always the same
Gotcha. Unfortunatley I'm still having trouble looking in to this but will pull in a colleague that can help.
Hey there ๐ taking a look, please bear with me a moment while I catch up on context and start digging.
Thank you!
Still looking, nothing is jumping out at me so far
Looking at the Payment Intent that you referenced, it looks like klarna and ideal are included in the returned payment_method_types, and as far as I can tell the version of our React Native SDK that you're using is pulling in versions of iOS and Android SDKs that support those type of payment methods.
This is leading me to believe we're looking for a misconfiguration specific to iOS in your project, but I don't have experience with Expo so I'm not sure where that could be.
We've tried in a bare React Native setup without Expo as well, but the result's been the same.
Klarna and iDEAL show up on Android, but don't show up on iOS.
Do you happen to have the ID of the two Payment Intents that were used there, so I can take a closer look and compare them?
Not for these exact screenshots, no. But I can give you new IDs - one using an Android device and one using an iOS device - if that helps?
Yes please, and can you also share the code you're using to present the payemnt sheet?
Android pi_3NGOWPK7ttMTMN5f1iFNKLtE_secret
Klarna and iDEAL wasn't available on Android for that order. It was available when I tried it about 20 minutes ago. Need to check if any of my colleagues have turned them off from our Stripe Dashboard.
Klarna and iDEAL are still active in our dashboard. Then I really don't know why they didn't show up now. Perhaps our backend developer has made some changes just now, I need to ask him. Gosh.
Looking at the requests to create those Payment Intents, they're still including klarna and ideal in the list of available payment_method_types on the Payment Intent.
https://dashboard.stripe.com/test/logs/req_F8rFrg15jRFtFi
https://dashboard.stripe.com/test/logs/req_FNGPWgJy3V2xtu
Can you try again with a larger amount? I think that Klarna and iDEAL may have minimum payment amounts that need to be exceeded. Could you try with an amount of 40000?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sure, I'll try with a larger amount. Give me a minute.
Thank you!
I'm finding that iDEAL likely doesn't have minimum limits the way Klarna does, so I think that rules out that theory.
I'd be curious to understand what changed between when you saw Klarna/iDEAL offered on Android versus when those options were not displayed. Maybe that will give us some insight into why you aren't seeing those options in iOS.
My bad - Klarna and iDEAL are still available on Android. They just weren't showing if a credit card had been added (had to remove the saved card to get them to show).
But even with an order amount of 200+ EUR, iOS still doesn't have Klarna or iDEAL
Where are you defining the urlScheme for your app, is that only being defined in the StripeProvider, or are you setting it up in your app.json file?
It's set up in app.json
Can you share that?
What do you want to see, specifically? I'm reluctant to share the entire config on an open forum, for security reasons.
It's just a string, lowercased, a-z only. Same name as our company's name (can you see that from e.g. the ids I provided earlier)?
The only deviation I should perhaps point out is that we're using an app.config.js with the following content, to allow us to use a typed app.config.ts rather than an app.json for Expo
If there were any errors due to e.g. urlScheme or returnURL being incorrect somehow, I'd be surprised as to why payment methods still show up on Android but not on iOS. Differences in the platform specific code could be the cause for that though, sure.
Setting up a return URL is unique to the iOS environment, it's not a requirement for Android applications, which is why I keep thinking it's the part that is relevant here.
Makes sense. I'll try around to see if I've done something wrong there.
๐ stepping in
In the meantime, is there any chance we could get a payment intent from Stripe to test with? Just to rule out any wrong-doing on our end in terms of backend or stripe configuration.
I'd recommend hard-coding a simple return URL to start with
Your PaymentIntents are fine
This is solely a frontend issue
We can see that both Klarna and iDEAL are supported PaymentMethod types for the PaymentIntents you are using
So the frontend filter is what is causing certain ones to show
The difference as my colleague noted for Android vs. iOS is around the returnURL
So it does most likely have to do with that
I'll try hard-coding a returnURL then, to start with
Yep that's a good idea. The other thing I'd recommend is testing on your non-Expo app and setting your urlScheme via StripeProvider as opposed to using your app.config.ts file (if you aren't already doing that)
We tried that, in the non-Expo app, but we'll try again. I'll also try different approaches for returnURL there too.
Okay โ
Setting the returnURL to https://app.<our-domain>.io worked. Payment options are now showing up on iOS
Not sure how that'll actually work in the app later on when that return URL is used, but at least the payment options show up now.
Nice
Glad we at least pinpointed it was an issue with the returnURL
So yeah, you are going to want to examine how you are dynamically setting that URL previously as it looks like that is the issue
I've set it <our-scheme>://order-confirmation/${id} now and it still works
So the URL is now also correct in terms of how the app will treat it
For some reason, Expo's Linking.createUrl was the cause of all evil.
Thank you so much for your help. I really, really appreciate it.