#deaa-3ds-off_session
1 messages ยท Page 1 of 1 (latest)
well that is expected, for 2 reasons:
you're not creating an off_session PaymentIntent.
1/ That PaymentIntent was not off_session: true
You just specified setup_future_usage: off_session
which says "I want to set this PaymentMethod up for future off session payments"
2/ you used pm_card_threeDSecure2Required test card, this card always requires 3DS authentication regardless of being set up previously or not
so the right way to do this is:
1/ perform a PaymentIntent with setup_future_usage: off_session
with the pm_card_authenticationRequiredOnSetup card and confirm and authenticate it
2/ then create a second PaymentIntent with off_session: true, and pass the PaymentMethod ID from part 1 above. That will no longer require authentication
yes i used this "2/ you used pm_card_threeDSecure2Required test card, this card always requires 3DS authentication regardless of being set up previously or not"
yep I know that is what I was flagging, that you're using the wrong card
so the problem from "pm_card_threeDSecure2Required"
if i used "pm_card_authenticationRequiredOnSetup " it will work?
im using setup_future_usage: offsession
when i used pm_card_authenticationRequiredOnSetup or pm_card_threeDSecure2Required not working
im using exactly what you said
can you share examples of 2 PaymentIntents IDs?
1/ the first one where you used pm_card_authenticationRequiredOnSetup ??
2/ the second PaymentIntent where you used the pm_123 from step 1
and lets ignore pm_card_threeDSecure2Required completely, as that isn't the right card to test this behavior at all
what about the second PaymentIntent ID?
there are 2 involved here.
The first PaymentIntent will require authentication
The second one will not
two is same
sorry
second one i created it using paymentMethod with stripe csutomer id
can you share the PaymentIntent ID for that?
like there are supposed to be 2 PaymentIntent IDs
but you shared one
sorry I think there is a misunderstanding here
let me clarify
your original question:
Hi, why off-line future payment not working in case 3dsecure , im using payment intent method?
to do this, you need 2 PaymentIntents
The first one to "set up" the pm_card_authenticationRequiredOnSetup card
The second one to skip the authenticaiton
your code is making an incorrect request to /v1/sources so that is what the error is there, you don't need to make any /v1/sources requests here at all
but id don't know if the user will use 3ds card or not
so let's take a step back
what is the main question here
maybe I have misunderstood
so I can clarify
first i create payment intent with futue setup
i will return client payment intent to frontend to use it to pay
the customer will pay using this secret_payment_intent_id ,he maybe use 3ds card or not
in case he used normal card and i want to recharge again i will not face any issue
but if he used 3ds i will get this error No such source: 'pm_1JZIFnHUFZQ2qqlkN3mg4ha1'
but if he used 3ds i will get this error No such source: 'pm_1JZIFnHUFZQ2qqlkN3mg4ha1'
that is because your code is making a wrong request
the /v1/sources request in the screenshot above is wrong and doesn't even need to be made
so how to recharge in case 3ds
first of all, don't make the /v1/sources request, that is not needed at all
second ...
- make a new PaymentIntent creation request. Pass the
pm_123PM ID from the PaymentMethod that was created in the first PaymentIntent. Also passoff_session: true. Andconfirm: true
and that is it
can you share the PaymentIntent ID for that^ request?
pi_3JZIFmHUFZQ2qqlk0mkAcp1h
thanks, looking
that code is not the same as this request: https://dashboard.stripe.com/test/logs/req_kUfcJApge04vr1
amount: "1543",
currency: "USD",
customer: "cus_GwCfMw4wMS4PVR",
setup_future_usage: "off_session",
statement_descriptor: "onestopparking.com"
}```
that is what you passed in this request, which is not the same as the code you linked earlier
that is what I meant earlier that you have not provided me with a request or PaymentIntents that passes off_session: true
its the same pi i provided to you
sorry for late, i was out for urgent thing
so what the wrong thing i missed?
๐ @spark adder had to step out so I'm taking over.
We've taken a look at that Payment Intent ID, but we're a bit confused since it's not matching what's in your code. For example, your code has off_session: true, but pi_3JZIFmHUFZQ2qqlk0mkAcp1h doesn't set that at all.
this how i create the first paymentintent
should be like this?
i cant use off_session with setup_future_usage
ุ
That is correct - setup_future_usage implies that extra steps (like authentication) will be needed so it can't happen off session
Just to clarify - are you just trying to test out not needing to provide authentication for a payment method that has already been set up?
yes
i need to recharge exists Payment Intent with session off
this how i try to recharge it
Yup, that should work as long as you're using the correct test card.
Do you have the request ID that had that error?
req_rqU7BHqFlt96a7
Are you sure that request is calling the code you just sent me? That request is creating a Source, not a Payment Intent
The code you sent over was creating a PaymentIntent though, so that request must be coming from somewhere else?
no, its is
Do you have code that's creating a source in your code base at all?
pm_card_threeDSecureRequired
It may be that specific requests was calling the wrong part of your code? I do see more recent requests to create a PaymentIntent that are working - do you have it all sorted out now?
you need paymentintent ids?
Let me start over:
- The code that you've sent over looks correct, where first you create a PaymentIntent with
setup_future_usage: off_sessionand then you use the Payment Method from there to create a NEW payment Intent withoff_session: true. - You should be using
pm_card_authenticationRequiredOnSetupto test this flow. This test card is meant to be used when the card is properly set up for future usage, and then is charge off session at a later time. - The request you sent over (req_rqU7BHqFlt96a7) does not match either of the code screenshot you've already sent over. Request req_rqU7BHqFlt96a7 is creating a Source (not a PaymentIntent like in your code screenshots). If you have code that is currently creating Sources then you should remove it, since it's not necessary if you're working with card Payment Methods
yes, thanks
this from 3ds code from my code
thanks alot
i will find why it not working, you put me on the right way
๐ Let us know if you run into more issues!
after fixing my code
if i use - pm_card_authenticationRequiredOnSetup , it will work
if i used pm_card_threeDSecureRequired , it will not work, and i get "Your card was declined."
That's expected - pm_card_threeDSecureRequired needs 3ds for EVERY payment, and so when you create the follow-up PaymentIntent with off_session: true we're unable to request 3DS and it fails
Do you have an example of it working before? I would have expected this to never work with off_session: true