#kevin_code

1 messages ยท Page 1 of 1 (latest)

still trenchBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1270661647714881608

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

covert cragBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

quasi goblet
#

Hi, could you summarise the context for me please?

unborn imp
#

Yes of course !

I'm working on my app in React Native, the feature is working fine on Android but not iOS because of the deeplinks

  • I enabled deeplink on my app
  • So I provided a URL scheme on my StripeProvider
  • Now the back-end initiate a setup intent and gives me back the client secret

PayPal behaviour โœ…

        const { error, setupIntent } = await confirmSetupIntent('SECRET', {
          paymentMethodType: 'PayPal',
          paymentMethodData: {
            mandateData: {
              customerAcceptance: {
                online: {
                  ipAddress: 'IP',
                  userAgent: 'userAgent',
                },
              },
            },
          },
        });

Credit card behaviour (2nd video) โŒ

            const { error, setupIntent } = await confirmSetupIntent(stripeClientSecret, {
              paymentMethodType: 'Card',
            });

The URL in both cases are https://www.example.com/safepay , in both case I use confirmSetupIntent, on PayPal the deeplink is working, on the credit card that need an authorization the deeplink is not working and so the promise of confirmSetupIntent is not triggered

#

Here are the setup intents (one for PayPal and two for credit cards):

  • PayPal : seti_1Pl5GqBBURfSZNfg8ca6DT5Z -> This deeplink works
  • Credit card: seti_1Pl5HtBBURfSZNfgw7PFZ6S4 / seti_1Pkp06BBURfSZNfg6knfQ86d -> These deeplinks did not work and the setup intent was not confirmed because of this
#

My version of Stripe RN :
"@stripe/stripe-react-native": "~0.37.0",

quasi goblet
#

Are you confirming the SetupIntents on the backend?

still trenchBOT
unborn imp
#

Nope on the front-end side with confirmSetupIntent from useStripe hook

#

But as I said it's not working on the credit card because the deeplink is not triggered unlike PayPal IDK why

quasi goblet
#

But the redirect happens after that, no?

unborn imp
#

On PayPal I also have a redirection but the deeplink works so it closes the window as you see in the video
On the credit card I have the redirection but the deeplink is not working and so the setup intent is not confirmed

quasi goblet
#

There's something else at play, because as soon as you click Confirm, the SI moves to succeeded. The redirect happens after that. I see that one of the card SIs that you shared is actually in the succeeded state: seti_1Pl5HtBBURfSZNfgw7PFZ6S4
The other one, wasn't even attempted: seti_1Pkp06BBURfSZNfg6knfQ86d.

unborn imp
#

Yes that's because I manually clicked on "Close" to close the browser but I shouldn't need to do that, the deeplink should be working and have the same behaviour as PayPal, which is :

  • Close the browser
  • Redirect me to the cart page

So my question is : "Why the deeplink is working for PayPal but not for credit card?", can you help me to have the same behaviour in both use case?

quasi goblet
#

Yes, I just wanted to clarify that you are able to confirm the SetupIntent successfully. The problem is what happens afterwards - the redirect_url is not working correctly.

dusty surge
#

๐Ÿ‘‹ taking over for my colleague. Let me catch up.

dusty surge
#

would you mind sharing your code please?

unborn imp
#

Of course, which part do you need to see?

dusty surge
#

before that, let me ask you another question

unborn imp
#

Yes of course

dusty surge
#

you're not using the PaymentSheet right?

unborn imp
#

Not yet for now, we plan to migrate to PaymentSheet later when PayPal will be fully implemented

#

So which part of the code would you like to see ?

dusty surge
#

how are you passing the return_url?

#

I don't see it in the code you shared earlier

unborn imp
#

On React-Native the SDK does not allow us to pass it on confirmSetupIntent but only here in the StripeProvider

<StripeProvider urlScheme='https://www.example.com'>...</StripeProvider>
dusty surge
#

one of the so many reasons why you should use PaymentSheets await initPaymentSheet({ ... returnURL: 'your-app://stripe-redirect', ... });

unborn imp
#

I agree with you but the product team wants first to do it without Payment Element and to migrate later so I can't do that now

#

So do you know why the return URL is triggering the deeplink in one use case but not the other one ?

dusty surge
#

I'm not sure to be honest, it's been a while since I used the Payment Method confirm without the PaymentSheet

#

I'm trying to read again the docs about it but I can't seem to find anything relevant

#

I really want to help you, but the best thing to do here is to send us an email through https://support.stripe.com/contact/email?topic=api_integration

#

and mention that you were redirected by tarzan from discord

#

I will ask someone from my team to look into it and reply

#

the best way to help you here if you can create a small repo with the code to replicate this behavior

unborn imp
#

Okay thank you I'll do that !

dusty surge
#

without the logic of your app

#

just the payment part

#

with the same SDK versions as well

#

and add it to the email

unborn imp
#

Oh but the repo won't work because I need back-end to create the setup intent before confirming it

dusty surge
#

you can create a small backend just to create the SI

#

and go from there

unborn imp
#

Mmmm okay thank you !

dusty surge
#

let me know when you do

unborn imp
#

Okay ๐Ÿ˜„

#

Okay I sent the message ๐Ÿ™‚

still trenchBOT
dusty surge
#

thanks ๐Ÿ™‚ we'll get back to you as soon as possible

unborn imp
#

Thank you ๐Ÿ˜„

dusty surge
#

i will close this thread for now ๐Ÿ™‚

#

have a good day