#asharpc

1 messages · Page 1 of 1 (latest)

rancid grottoBOT
modern gull
#

hi! well that code is processing a on-session payment so it's normal that a bank might require 3D Secure on it.

austere acorn
#

but it was working before without 3d secure

modern gull
#

then that was a fluke I would say and you got lucky

#

auto payment is failing from saved cards
by that you mean, this code runs on your backend without the customer being involved , like a recurring job?

austere acorn
#

yes, customer only involved for first payment with 3d secure , after that same order repeat based on customer requirement, but second time we take amount from previous "payment_method", so it was working fine before

modern gull
#

well then you're not integated correctly, you need to use off_session when confirming this PaymentIntent

austere acorn
#

we alredy used offsession for first payemnt "payment_intent = stripe.PaymentIntent.create(
amount=amount,
currency='gbp',
customer=user.stripe_cusromer_id,
capture_method='automatic',
description=str(order.id),
setup_future_usage='off_session',
)"

modern gull
#

cool

#

that's only one half of it though

#

when you do the second PaymentIntent, you need to pass off_session=true , as explained in the docs linked above