#yogesh_api
1 messages ¡ Page 1 of 1 (latest)
đ 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/1334095564564070412
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- yogesh_docs, 5 days ago, 19 messages
Hi, let me help you with this.
Could you please share the request with requires_action?
Sure, here you go req_jqlT20ySucvYPU
It seems to be a test mode quirk. I suggest you use this test card instead: 4000000000003220
https://docs.stripe.com/testing?testing-method=card-numbers#three-ds-cards
https://docs.stripe.com/payments/link/save-and-reuse#card-authentication-and-3d-secure
okay, let me try this
hi! I'm taking over this thread. let me know if you have other questions!
Hey, tried with suggested payment method. Still got the same error
req_ERcQqmORwdbh4i
in your request you set off_session: true. this means that the customer is not currently present.
but you used a test card that reuquires 3DS (4000000000003220). since the customer is not there to do the 3DS flow, the payment fails.
if you want to get a requires_action status, then you need to set off_session: false (or not set it at all, since off is the default value)
Make sense, let me change and try again
OMG, it actually worked. But why did it worked for 3DS card attached without stripe link.
it should not work for this request also req_jqlT20ySucvYPU
which test card did you use in that request?
4000002760003184
hum... not sure. but I wouldn't worry to much about this. these are just test cards.
sure, I'll keep an eye in live mode for this.
I think we can conclude that off_session: false is the solution for now.
What is unexpected about that failure?
You used the 3814 card to attempt invoice payment and that card always requires auth
Yes, when we use 3814 card we always get requires_action status.
But when the same card 3814 is used with stripe link https://docs.stripe.com/payments/link it returns requires_payment_method
Sorry you'd need to provide some examples of what you're describing. In any case the /pay endpoint cannot gracefully handle 3DS/auth requests so will always be a fail regardless of on/off session
Not like PI confirmation which will succeed, but transition the intent to requires_action
Okay let's describe this very simply
When creating an Invoice and calling /pay endpoint with a 3814 card. How that card is attached to the customer changes the response of payment_intent status
pm_1QmXpqHz4yo2lH7mJ12I71e3 - requires_action standalone card
pm_1QmBWWHz4yo2lH7mCII6fE5f - requires_payment_method card attached with Stripe link
pi_3QmWf3Hz4yo2lH7m13URJ7kf - failed with requires_payment_method
pi_3QmXqZHz4yo2lH7m13x2cMkg - failed with requires_action
both the payment_intent is using the same 3184 card
As I said, the /pay endpoint shouldn't be used in 3DS/auth scenarios really
Okay, then what should be used?
You'd confirm the PI generated by the invoice
Hmm, according to doc I've to send pi to client and confirm it everytime.
But we would like to avoid this as we already save the payment method for future off session mode.
So we directly charge users without loading client side SDK. And only initiate stripe if action is required.
I'll check this out.
Well then use the server-side confirm endpoint if your user is off-session
Ohh So I need to call payment_intent /confirm instead of Invoice /pay
Yes
Don't use /pay as a rule of thumb. Maybe only if you're paying an invoice out-of-band or something. It has quirky behaviour with 3DS/auth (as you can see) so it's best to just avoid it
Understood, okay so once payment_intent is succeeded after confirmation. Will the invoice status change to paid automatically?
Yep!
Excellent! I'll make those changes then.