#numair_api

1 messages ยท Page 1 of 1 (latest)

rotund slateBOT
#

๐Ÿ‘‹ 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/1335916600263446591

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

coral tendon
#

๐Ÿ‘‹ happy to help

fathom elm
#

Thank you @coral tendon , let me know if you need more details.

coral tendon
#

are you creating an off-session PaymentIntent?

fathom elm
#

yes @coral tendon here is how we are creating the payment intent

paymentintent = stripe.PaymentIntent.create( amount=int(amountCents), currency="usd", payment_method=token.strip(), customer=customerStripeId, off_session=True, confirm=True, capture_method='automatic', payment_method_options={"card": {"request_three_d_secure": "automatic"}}, )

#

Just to add we are on python 2.7 and the stripe version we are using is 5.5.

coral tendon
#

you shouldn't pass

payment_method_options={"card": {"request_three_d_secure": "automatic"}},
      )``` for an MIT charge
#

you're basically flagging for Stripe that you want 3DS to be requested when possible

fathom elm
#

@coral tendon tried without that, but no success, here is the error i get on payment intent

Your card was declined. This transaction requires authentication.

#

I am testing with the test card (4000 0000 0000 3220) in the development environment.

coral tendon
#

this card always requires 3DS

fathom elm
#

Can this happen in real-world scenarios with actual cards? If yes, what would be the solution?

coral tendon
#

you need to use the 4000000000003055 instead

coral tendon
fathom elm
#

Does this scenario require us to pre-authorize the amount with 3D Secure, or is there any other possible solution?

coral tendon
#

it's not a pre-auth

#

basically you would create an MIT charge (off-session: true) with a PI and if the status is requires_action then you can ask your customer to come back on session to authenticate the payment

fathom elm
#

hmm ok makes sense, thank you

coral tendon
rotund slateBOT