#Felix How

1 messages ยท Page 1 of 1 (latest)

maiden haloBOT
chilly drum
karmic sparrow
#

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

quaint granite
#

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?

karmic sparrow
#

Klarna and iDEAL are showing up on Android, but they're not showing up on iOS

quaint granite
#

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

karmic sparrow
#

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

quaint granite
#

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

karmic sparrow
#

Is the payment intent ID the same as paymentIntentClientSecret?

quaint granite
#

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

karmic sparrow
#

pi_3NGNWjK7ttMTMN5f0GQ8jlJs

quaint granite
#

Thank you!

karmic sparrow
#

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?

quaint granite
#

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?

karmic sparrow
#

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

quaint granite
#

Gotcha. Unfortunatley I'm still having trouble looking in to this but will pull in a colleague that can help.

karmic sparrow
#

Ok, no worries

#

Thanks

amber remnant
#

Hey there ๐Ÿ‘‹ taking a look, please bear with me a moment while I catch up on context and start digging.

karmic sparrow
#

Thank you!

amber remnant
#

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.

karmic sparrow
#

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.

amber remnant
#

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?

karmic sparrow
#

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?

amber remnant
#

Yes please, and can you also share the code you're using to present the payemnt sheet?

karmic sparrow
#

iOS pi_3NGOV3K7ttMTMN5f0Odu1LOd

maiden haloBOT
karmic sparrow
#

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.

amber remnant
#

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?

karmic sparrow
#

Sure, I'll try with a larger amount. Give me a minute.

amber remnant
#

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.

karmic sparrow
#

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

amber remnant
#

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?

karmic sparrow
#

It's set up in app.json

amber remnant
#

Can you share that?

karmic sparrow
#

What do you want to see, specifically? I'm reluctant to share the entire config on an open forum, for security reasons.

amber remnant
#

Totally fair, can you just share the scheme line from the file?

#

Undersatnd if not

karmic sparrow
#

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.

amber remnant
#

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.

karmic sparrow
#

Makes sense. I'll try around to see if I've done something wrong there.

alpine yew
#

๐Ÿ‘‹ stepping in

karmic sparrow
#

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.

alpine yew
#

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

karmic sparrow
#

I'll try hard-coding a returnURL then, to start with

alpine yew
#

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)

karmic sparrow
#

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.

alpine yew
#

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

karmic sparrow
#

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.