#baneet

1 messages ยท Page 1 of 1 (latest)

last latchBOT
vast latch
#

hello! do you have that specific PaymentIntent id?

rocky moat
#

Hi Alex, no I don't have PaymentIntentId , Can you point me to a link from where I can get that in the stripe dashboard, I do know around what time he tried to make payment, so if there is any way I can see paymentIntents list I can get you that

vast latch
rocky moat
#

Okay let me check this and I will come back to you, give me few minutes please

last latchBOT
rocky moat
#

Hi @vast latch

I checked stripe logs for the customer and looks like it failed before creating paymentIntentId, basically, it failed when I tried to attach the payment method to the customer.

Basically on this call :
POST /v1/payment_methods/pm_id/attach

night anvil
#

Yep, that endpoint will just error in situations where the bank requests 3DS for the authorisation

rocky moat
#

@night anvil May I know why I am not facing the same issue when I am using 3DS-enabled credit cards, As I am following the same flow for making payment in both case and I am receiving 3DS confirmation in that case

night anvil
#

Can you share a specific example?

rocky moat
#

@night anvil Should I share the customer Id with you so you can check the customer's logs, In that you will be able to see when the customer was using a 3DS Debit card we were getting The card returned a decline code of authentication_required. but when same customer tried with 3DS credit card it went through and he was able to subscribe successfully

night anvil
#

Sure

#

I mean 3DS isn't necessarily required on every transaction. It's up to the issuing bank to determine when to request 3DS โ€“ we just facilitate that request

rocky moat
#

Here is the customer id : cus_NufSlls7o1nHnA

night anvil
#

Off the back of that, what's the question?

rocky moat
#

Yes, those are the successful and failing request, my question is I am simply attaching the payment method to the customer, and is yet to trigger payment so why is it that it is failing to attach in the case of Debit cards but works with Credit cards .

My Flow is Using stripe js I am hitting this URL whenever the client add his card details :
POST https://api.stripe.com/v1/payment_methods

and then I get the Payment method id from Stripe, And then I am using that payment method id to attach to the customer using

POST https://api.stripe.com/v1/payment_methods/pm_id/attach

So why this attaching is getting failed in the case of debit cards.

#

@night anvil also, I tested with the following cards on test mode and didn't face any such issues:

4000000000003220
4000002500003155
4000002760003184

night anvil
#

As explained, there's no blanket rule for 3DS. It's assessed on a per transaction basis by the bank/card issuer. So maybe in this instance the debit card bank is requesting 3DS (and therefore a decline) but the credit card issuer is okay with the authorisation

#

The recommendation is to just not use that endpoint and instead use Setup Intents as previously mentioned

rocky moat
#

Okay, So you are saying when user tried to attach the debit card, the debit card issuing bank asked for 3D verification, and since we don't have anything in place to handle 3DS verification when attaching the card to the user, it failed.

We were under the assumption that 3DS verification only happens when we try to make any actual payments, but as you said it can also happen when we try to attach the card to a customer.

Okay as suggested I will have to change the payment flow

#

Thanks for your help

night anvil
#

We were under the assumption that 3DS verification only happens when we try to make any actual payments, but as you said it can also happen when we try to attach the card to a customer.
When you attempt to attach a card like that to the customer it performs a network authorisation, which can trigger 3DS yes. That endpoint can't facilitate that 3DS flow, so it just errors/declines.

#

Setup Intents can handle 3DS when your customer is on-session and are the correct way to save payment details to a customer

rocky moat
#

Okay, got it,

BTW Do we have any test card with which I can produce the same case in test mode where we require 3DS when attaching it to customer?

night anvil
#

4000002760003184 should do it: https://stripe.com/docs/testing#regulatory-cards

Use test cards to validate your Stripe integration without moving real money. Test a variety of international scenarios, including successful and declined payments, card errors, disputes, and bank authentication. You can also test non-card payment methods.

rocky moat
#

Okay, Thankyou for your help. Have a nice day ๐Ÿ™‚

night anvil
#

you too!

last latchBOT
night anvil
#

@rocky moat

#

I tried the suggested card number but It did not asked for 3DS confimration when I tried attaching it to a customer and instead asked for 3DS confirmation, when I tried making payment for susbcription. Basically, I want a card number in the testing mode where I can get the error for 3DS when ever I try to attach it to a customer rather than waiting untill the customer try to make a payment.
Not sure such a card number exists, to be honest

rocky moat
#

Okay ๐Ÿ˜ฆ

It would be great if Stripe can provide such a test card, as If I had this kind of card available, we could have avoided such issue, wich we found out only on production

night anvil
#

What specifically do you need to test that flow?

rocky moat
#

I had to convince my client that this issue is happening when attaching the card to the customer and our actual payment have even not started and I will have to modify our payment flow.

night anvil
#

Yeah, there's a reason that endpoint isn't really referenced anywhere in the documentation (other than the API reference). We even mention it there:

Using the /v1/payment_methods/:id/attach endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for future use, which makes later declines and payment friction more likely.

rocky moat
#

Can you please send me a link to this page from where you have quoted this message.

night anvil
rocky moat
#

Hmm, okay

Question: so let's say I change my flow to setup intent and in case of setup intent we send a parameter **'usage' => 'off_session' **

So now, when I use this payment method for creating a subscription do I still need to send the parameter 'off_session' => true, when creating a subscription?

night anvil
#

If your customer is off-session, yes. We'll use that to request SCA exemptions

rocky moat
#

Okay Got it.

Another totally different question, is there a way we can request stripe API response in a customer-selected language.

Example: If a customer's card balance is insufficient, stripe returns us an error message, but that's in English, but my customer has selected his language as French so I want this message to be returned in French. So is there any way to achieve this.

night anvil
#

Depends. Is this via confirmPayment or another client-side function from Stripe.js?

rocky moat
#

I am using Laravel Cashier to create the subscription whcih uses stripe PHP SDK

night anvil
#

Stripe.js error message can be localised, but the API errors are not. You'd need to handle that yourself

rocky moat
#

okay, can you point me to the resource of Stripe.js localization

rocky moat
#

Okay Thank you so much for helping me out and clearing my doubts , and sorry for taking up so much of your time

night anvil
#

all good!

rocky moat
#

๐Ÿ™‚

wheat dock
#

Hi! I'm taking over from my colleague. Please, let me know if you have any other questions.

rocky moat
#

Hi @wheat dock Not now, If I will have any new questions I will let you know. Thankyou