#Louis Dauvois-pi-sca
1 messages · Page 1 of 1 (latest)
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 ?
Have you followed the guide here: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
It's all outlined there (specifically: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-submit-payment)
That section shows you how to handle any 3DS/auth challenge flow with Stripe.js
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); } });
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
this.stripeService.confirmCardPayment
Yep
Is there a particular issue you're encountering? Which test card are you using?
No I think thats ok I found 4000 0025 0000 3155
this card triggered the 3D secure
I think It's Working
Yep, that card will require 3DS/auth every time
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
Can you share the pi_xxx ID?
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"
The amount value is in the lowest currency unit. So in case of EUR, that's cents
All API requests expect amounts to be provided in a currency’s smallest unit. For example, to charge 10 USD, provide an amount value of 1000 (that is, 1000 cents).
https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts
So you need to change to amount: 15000, for €150.00
I try that