#zero_api

1 messages ยท Page 1 of 1 (latest)

spring scrollBOT
#

๐Ÿ‘‹ 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.

atomic jolt
#

๐Ÿ‘‹ happy to help

summer mountain
#

Hello

#

I cant find any documentation about this specific topic

summer mountain
#

Does Merchant Initiated Transaction equate to Off session payment?

atomic jolt
#

yes

summer mountain
#

I see

atomic jolt
#

if your business results in you collecting payments from your customers off-session

summer mountain
#

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

atomic jolt
#

if you want general analytics

#

about 3DS usage

summer mountain
#

I am more interested in the specific payment

#

so i can request KYC from customers which dont support 3ds

atomic jolt
#

oh ok I see what you mean

summer mountain
#

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

atomic jolt
summer mountain
#

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

atomic jolt
#

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

#

you look at the payment_method_details.card.three_d_secure

summer mountain
#

so basically

if setupIntent.latest_attempt -> find setupAttempt -> setupAttempt.payment_method_details.card.three_d_secure === null ->require kyc

atomic jolt
#

means that the SetupAttempt didn't require SCA

summer mountain
#
 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?

atomic jolt
summer mountain
#

No i dont mean an error like decline

#

i mean this

#

Where stripe still accepts it but its not 3ds verified

atomic jolt
#

if Stripe attempted 3DS and it failed then it will generate an error

summer mountain
#

Okay thanks, is there any good way to get the setupIntent or setupAttempt using the paymentMethod object only?

atomic jolt
#
terse irisBOT
summer mountain
#
    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?

carmine coral
#

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.

summer mountain
#

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

carmine coral
#

you can just pass expand=["latest_attempt"] when retrieving the SetupIntent object.

summer mountain
#

oh