#cetincem

1 messages · Page 1 of 1 (latest)

celest dirgeBOT
echo gorge
#

👋 happy to help

#

would you mind sharing the request ID?

tidal shoal
#

Sure

#

evt_1NVC6CLj8vYuVxnTg50Rp65S

echo gorge
#

that's an event ID not a request ID

#

request IDs look like req_xxx

#

or is this error on the mobile side?

tidal shoal
#

yes it is on the mobile side. I am using stripe react native package.

echo gorge
#

ok in that case are you passing the seti_xxxx (the ID of the Setup Intent) or the seti_xxx_secret_yyy?

tidal shoal
#

seti_xxx_secret_yyy

echo gorge
#

would you mind double checking? could you please log the value you're passing?

tidal shoal
#

yes I checked it many times I have been trying to solve this is issue for a week now.

#

I also checked the source code of stripe's react native sdk.
handleNextAction: (paymentIntentClientSecret: string, returnURL?: string | undefined) => Promise<HandleNextActionResult>;
it says paymentIntentClient secret but I am trying to handle next action of the setup intent.

echo gorge
#

oh wait

#

what function are you using?

#

handleNextAction ?

tidal shoal
#

yes

echo gorge
#

are you using PaymentSheet?

tidal shoal
#

No I am using previously added payment method

echo gorge
#

why are you using a previously added PM with a SetupIntent?

#

I'm not sure I understand the use case

tidal shoal
#

It works correctly when I test it with a credit card that doesn't require 3ds.

#

Shouldn't I add PM while creating setup intent?

echo gorge
#

no, you need to use PaymentSheet to collect the PM

tidal shoal
#

But I don't want customers reenter credit card information everytime before creating a booking.

echo gorge
#

in that case you use the PM with a PaymentIntent

#

not a SetupIntent

#

and if they need to reauthenticate with 3DS then you would use handleNextAction

tidal shoal
#

let me explain my use case. Our users can park their cars with our app. When a user starts parking we create a setup intent at beginning. When user decides to leave the park we calculate the cost and charge the user.

#

Our flow works correctly with previously added payment methods but when user uses a credit card that requires 3ds, setup intent creation is not completed and in stripe dashboard it says setup intent requires you to take action in order to complete setup.

echo gorge
#

but how are you passing the payment info to the Setup Intent in the first place?

tidal shoal
#

let me show the code block

#

Okay while confirming the setup intent I can pass the payment method id.

#
const confirmParams: CardParams = {
            paymentMethodType: 'Card',
            paymentMethodData: {
              paymentMethodId: defaultPaymentOption.paymentMethodId,
            },
          };
          const result: ConfirmSetupIntentResult = await confirmSetupIntent(
            response.setupIntent.clientSecret,
            confirmParams
          );
echo gorge
#

if you already have a PaymentMethod you don't need to create a new SetupIntent

#

you can use directly with the PaymentIntent

tidal shoal
#

Oh okay. I didn't know that!

#

So at the end of parking, can I use payment method to create payment intent?

echo gorge
#

yes exactly

tidal shoal
#

Okay thanks a lot. I will try that way.