#Louis Dauvois-pi-sca

1 messages · Page 1 of 1 (latest)

strong granite
#

Hello. Do you have an example Payment Intent I can look at?

calm siren
#

mmh

#

I can share you my code

#

I just need to understand how to test with a card that require SCA Auth that it will correctly ask for 3D secure ?

strong granite
#

That section shows you how to handle any 3DS/auth challenge flow with Stripe.js

calm siren
#

await stripe.paymentIntents.create( { amount: parseInt(amount), currency: "eur", payment_method_types: ["card"], }, function (err, paymentIntent) { if (err) { res.status(500).json(err.message); } else { res.status(201).json(paymentIntent); } });

strong granite
#

Yep, that's the code to handle Payment Intent creation (step 3 at that URL)

#

But you need to handle confirmation in your front-end application with Stripe.js

calm siren
#

this.stripeService.confirmCardPayment

strong granite
#

Yep

#

Is there a particular issue you're encountering? Which test card are you using?

calm siren
#

No I think thats ok I found 4000 0025 0000 3155

#

this card triggered the 3D secure

#

I think It's Working

strong granite
#

Yep, that card will require 3DS/auth every time

calm siren
#

Perfect

#

thanks

#

I have a problem now btw

#

This is a test payment of €1.50 EUR using 3D Secure.

#

but my amount is 150

#

is there something special about the amount

strong granite
#

Can you share the pi_xxx ID?

calm siren
#

pi_3KnhFYLy2KjVLbao0xRVuEz9_secret_ie9w3Tb6vrVLEQkF9uIyHJpZj

#

amount: 150

automatic_payment_methods: null

canceled_at: null

cancellation_reason: null

capture_method: "automatic"

client_secret: "pi_3KnhFYLy2KjVLbao0xRVuEz9_secret_ie9w3Tb6vrVLEQkF9uIyHJpZj"

confirmation_method: "automatic"

created: 1649760428

currency: "eur"

description: null

id: "pi_3KnhFYLy2KjVLbao0xRVuEz9"

last_payment_error: null

livemode: false

next_action: null

object: "payment_intent"

payment_method: "pm_1KnhFZLy2KjVLbaoZajhjAEZ"

payment_method_types: ["card"] (1)

processing: null

receipt_email: null

setup_future_usage: null

shipping: null

source: null

status: "succeeded"

strong granite
#

The amount value is in the lowest currency unit. So in case of EUR, that's cents

calm siren
#

ok

#

sorry ahah

strong granite
#

So you need to change to amount: 15000, for €150.00

calm siren
#

I try that