#Nazar Zvarych - 3DS
1 messages · Page 1 of 1 (latest)
Are you following any specific guide here?
That isn't anything wrong, banks can just always request 3DS for any new payment or authorization, even if they have approved it before
Scratch that guide question. Can you tell me a bit more about this payment? Is it happening while the user is on your site again or is it some automatic charge while they are away?
currently I use stripe test-mode and test cards
here what I do:
when user enter card data I do the post to server and create stripe customer and create Setup Intent
this setup intent has a status - require_action
on UI part I do next:
stripe.confirmCardSetup(clientSecret,{
payment_method: orderData.paymentMethodId
})
and receive callback with status = 'succeeded'
after this I'd like to charge money and for this I create PaymentIntent.
but receive a status - requires_action
Quick question: in production, will the payment always be immediately after the setup, or is that just something for testing?
payment will be in 1-2mins
That is expected for some of our test cards. We have a card ending in 3155 that only requires 3DS auth to setup but does not require 3DS after but we also have one that ends in 3184 that will always require 3DS https://stripe.com/docs/testing#authentication-and-setup
And to be clear, in this setup there will always be a chance of that payment requiring 3DS, even if the user did 3DS auth during setup seconds ago. The bank ultimately decides whether to request 3DS or not, so your integration needs to be able to handle it
Can you send me the ID for this specific payment? (pi_123)
Exactly the test card I mentioned 3184 , if this isn't happening with your other payments then it sounds like those payments aren't using this test card https://dashboard.stripe.com/test/logs/req_1lE3NMFXPhBGBi
could you look at this - pi_3LqI3oFuOU3uop0s1PrYKFEI
I used this card and received the same status 4000002760003184
Right, that 3184 will always require 3DS for every new payment no matter what
If you want to only require 3DS during setup in your tests, use the card ending in 3155
ok, I didn't understand how should I manage such cards?
such this 4000002760003184
I created SutepIntent
then authenticated card via stripe.confirmCardSetup()
then try to charge by creating PaymentIntent
The easiest way is to send your users to a page where you call confirmCardPayment on the client secret of your payment intent that requires acton https://stripe.com/docs/payments/3d-secure#when-to-use-3d-secure
That will display the 3DS modal and allow the user to complete the payment
but now I see this modal And press Confirm/Authenticate button
for SetupIntent
@sand siren could you clarify steps what I should do for successful charge?
If you did it for the payment intent secret, that modal is for authenticating the payment itself. It isn't just for setup intents
listen: my idea just create SetupIntent for grab user card data and charge in 1min later using PaymentIntent (using paymentMethodId)
I authenticate user via 3d secure modal and receive succeeded status for this SetupIntent
if I will create PaymentIntent - it will hold money when user confirm it, correct?
@sand siren ?
It won't hold any money until after the user has completed 3DS I believe
Also why is there a minute delay here? If you know how much you are charging up front and want to place a hold, you can create the payment intent first, set its mode to capture and just do the capture call a minute later
That would get rid of the possibility of the user needing to do two 3DS authorizations for one payment
delay because I collect payment information data on 3-rd step of my checkout process and charge after user complete 4-th step
if I will use PaymentIntent instead of SetupIntent - I will hold money on 3-rd step. It's not good, because user can skip 4step and break checkout process, but money will be hold on his card
What is the 4th step?
confirm all information and press - pay
Are you using the Payment Element or Card Element here to collect details?
Does your payment page use our Element that looks like this: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
Or our one that looks like this? https://stripe.com/docs/payments/accept-card-payments
If you are using createPaymentMethod here I think you actually don't need the SetupIntent, you can just attach the payment method that you get from that createPaymentMethod call to your Customer object, then when you create the payment intent, pass in that payment method ID
That looks like card element actually
ok Pompey
onw more question:
how can I use PaymentIntent without hold money and charging in 1-2mins after creating?
In this case, you wouldn't create the PaymentIntent until step 4. If you are using createPaymentMethod, Step 3 can just be creating and attaching the Payment Method object, Step 4 would be creating a new Payment Intent with that payment method and confirming it
So the payment intent will get created 1-2 minutes after you save the card and will then try to charge it immediately. If 3DS is required it will be performed then
problem that on step 4 I don't have payment form
and don't know how to show 3DS modal
I prefer to confirm 3DS on 3-rd step somehow
but again, can't do this without PaymentIntent
You don't need a form specifically for it, you just need the payment intent's client secret. Calling confirmCardPayment on it will display the 3DS modal, no other form on the page required https://stripe.com/docs/payments/3d-secure#when-to-use-3d-secure
And to be clear, with your current flow, there will always be the possibility that that is necessary anyways. Any time you confirm a payment intent it might need 3DS auth like this. If your integration doesn't want to support that it will have to fail those payments
Also it might be worth considering rearranging the steps. For example a lot of sites have the confirm details page be the same page where a user inputs their card data