#antony5656

1 messages · Page 1 of 1 (latest)

tame nebulaBOT
arctic creek
#

How can I help?

hard rose
#

Im implementing Paymentintents but when attemp to use the handleCardAction method from js sdk when the authentication is required on a saved card stripe returns an error saying that can't handle that action

error message: IntegrationError: handleCardAction: The PaymentIntent supplied is not in the requires_action state.

payment intent id: pi_3OD98sIJWrJgXVgt1Rwvz7eF

arctic creek
#

You used the 4000002760003184 test card, which requires authentication on ALL transactions, even if it was setup with a Setup Intent previously

hard rose
#

exacly, and im attempting to do the authentication using the handleCardAction but stripe gives that error

#

I create the pi with the payment method of the customer and then use it to create the payment intent, if the payment intent requires auth i send to front to run the function handleCardAction with the pi secret

arctic creek
#

You need to not set off_session: true then when you create/confirm the PI

hard rose
#

why is that?

arctic creek
#

By setting off_session: true you're saying that your customer isn't available to handle any additinoal actions, so if additional actionsa required we fail the PI instead of transitioning it to a requires_action state

hard rose
#

i removed the confirm and stripe gives that error:
IntegrationError: handleCardAction: The PaymentIntent supplied does not require manual server-side confirmation. Please use confirmCardPayment instead to complete the payment.

#

i want to confirm the payment intent on server side not front

#

just want to authenticate the pi on front

arctic creek
#

Then you need to pass in confirmation_method: manual when you create the PI

hard rose
#

and the confirm flag can i set it to true?

arctic creek
#

Yup

hard rose
#

let me check

tame nebulaBOT
arctic creek
#

@hard rose How's it going? Did you get it to work?

hard rose
#

it seems that now the hanldeCardAction is working

#

i have some questions regarding it:

#

in case of a recurring payment the off_session parameter should be set to true? but how then i handle the cardaction? do i create a new pi or i can i use this one?

north sierra
#

Hi 👋

I'm stepping in as @arctic creek needs to go soon

#

So are you talking about creating Payment Intents using saved payment methods at that point?

hard rose
#

yes

north sierra
#

If that is the case, you would need to bring the customer back on-session to complete whatever next action is required

hard rose
#

but from what i spoke with karbi the pi will not be in requres_action state since i need to pass the off_session parameter , since its a recurring payment