#zero_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1255449972044988498
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
๐ happy to help
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Does Merchant Initiated Transaction equate to Off session payment?
yes
I see
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
if your business results in you collecting payments from your customers off-session
I see
Okay
Is it possible to see the card has completed the 3DS flow in the dashboard?
In the payment_method.attached event i can only see
"three_d_secure_usage": {
"supported": true
},
but no real info about if the 3ds flow actually succeeded
if you want general analytics
about 3DS usage
I am more interested in the specific payment
so i can request KYC from customers which dont support 3ds
oh ok I see what you mean
From my previous experience there are cards that have 3ds support but bad actors can cause the flow to fail (as if its a bank error) which then causes it to go through even with 3ds requested
so i want to request kyc for all added cards that are not successfully 3ds verified
if you expand the latest_charge on the PaymentIntent you can look at the 3DS under the payment_method_details.card https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card-three_d_secure
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
But i want to do this before any charge
Is that possible?
I mean just any way to check if 3ds was successfull for the setupIntent
oh yes for SetupIntents it's different
it's kind of the same but with different objects
so instead of latest_charge you would look at the latest_attempt
and then it's similiar https://docs.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card-three_d_secure
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
you look at the payment_method_details.card.three_d_secure
so basically
if setupIntent.latest_attempt -> find setupAttempt -> setupAttempt.payment_method_details.card.three_d_secure === null ->require kyc
means that the SetupAttempt didn't require SCA
const intent = await stripe.setupIntents.create({
customer: stripe_customer_id,
payment_method_types: ['card'],
usage: 'off_session',
payment_method_options: {
card: {
request_three_d_secure: "any"
}
},
});
when requesting it like this tho it would mean that the card doesnt support 3ds or the 3ds flow failed because of a bank issue right?
if there was an error you can see it under https://docs.stripe.com/api/setup_attempts/object#setup_attempt_object-setup_error
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
No i dont mean an error like decline
i mean this
Where stripe still accepts it but its not 3ds verified
if Stripe attempted 3DS and it failed then it will generate an error
if Stripe didn't attempt 3DS than this https://docs.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card-three_d_secure would be empty
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Okay thanks, is there any good way to get the setupIntent or setupAttempt using the paymentMethod object only?
but in all cases even if 3DS fails you can always look at the result https://docs.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card-three_d_secure-result and the result_reason https://docs.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card-three_d_secure-result_reason
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
const setupAttempts = await stripe.setupAttempts.list({
limit: 1,
setup_intent: setupIntentId,
});
Is this sorted DESC?
I mean will this always return the latest SetupAttempt or the oldest?
all lists in the API are sorted by most-recently-created-first
but also no reason to do a list call like that, latest_attempt exists on the SetupIntent object.
I see
yeah but the latest_attempt is just the id, and there is no method to get them by ID
Or at least I cant find it in the docs
you can just pass expand=["latest_attempt"] when retrieving the SetupIntent object.
oh