#antony5656
1 messages · Page 1 of 1 (latest)
How can I help?
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
You used the 4000002760003184 test card, which requires authentication on ALL transactions, even if it was setup with a Setup Intent previously
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
You need to not set off_session: true then when you create/confirm the PI
why is that?
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
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
and the confirm flag can i set it to true?
Yup
let me check
@hard rose How's it going? Did you get it to work?
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?
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?
yes
So you would only need to use hanldeCardAction if the Payment Intent is in a state of requires_action and is configured for manual confirmation
https://stripe.com/docs/js/payment_intents/handle_card_action
If that is the case, you would need to bring the customer back on-session to complete whatever next action is required
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