#Redrigz - setup intent

1 messages ยท Page 1 of 1 (latest)

lilac templeBOT
lone turret
#

what i understand is when i get the event 'payment_intent.requires_action' i should use 'confirmCardPayment' function on UI part, and for the event 'setup_intent.requires_action' which function i should use ? i tried handleCardAction but i get an error

#

thanks in advance

tawdry jasper
#

Still looking, I thought these functions would work for either

#

Are you following any particular guide here?

lone turret
#

no ๐Ÿ˜” i don't find it

tawdry jasper
#

Sounds good, will see what I can find and will get back to you

#

Are you using the Card Element or Payment Element here?

lone turret
#

card element

#

i'll tell u the details:
1- create a subscription with trial period with 3d secure card
2- i get two events : 1- subscrition created / 2 - setup_intent.requires_action

#

i'm stuck what i should do in this event! the user should receive a popup i think to authorize and confirm the setup

#

so what i want to know which function i should use in my website?

tawdry jasper
#

Can you send me an example SetupIntent that you have been testing with here?

#

It might help me to see what calls you are making already

lone turret
#

i already tried it,
Error: Uncaught (in promise): IntegrationError: Invalid value for stripe.confirmCardPayment intent secret: value should be a PaymentIntent client secret. You specified: a SetupIntent client secret.
IntegrationError: Invalid value for stripe.confirmCardPayment intent secret: value should be a PaymentIntent client secret. You specified: a SetupIntent client secret.

tawdry jasper
#

For confirmCardSetup? Can you try that again, go to your account's API logs, and send me the request ID (req_123) for a time that you saw that happen?

lone turret
#

okey i'll see

lone turret
#

I have tested it now, and I will tell you what happened,
I tried this confirmCardSetup function, it works fine the customer received a notification in his banking application and he authorized and the payment succeeded, but the problem is that Stripe doesn't show the user that he has to validate by displaying a popup

tawdry jasper
#

That is surprising, that call should display the 3DS modal as well. Looking in to what else you might need to use here

#

Yeah confirmCardSetup definitely should do this.

#

Do you have a public test page that I could see this behavior on?

lone turret
#

We are in prod that's why

#

in test it works fine

#

the customers are using the app now

tawdry jasper
#

Can you send me the ID of the payment that a user saw this on? (pi_123)

lone turret
long karma
#

Hi ๐Ÿ‘‹ I'm stepping as @tawdry jasper needs to go.

#

The object you shared with us is a Setup Intent, not a Payment Intent

#

So the error message is correct.

lone turret
#

Hi, okey that's what I did, I'm using now confirmcardSetup and the client received a notification in his bank account but it doesn't display 3ds model to inform the user that he should authorize the payment

long karma
#

Well for the setup intent you supplied I can see a 3DS authentication event that succeeded

lone turret
#

Yes because he accepted the payment from his bank account
But the problem is that confirmcardSetup doesn't display 3ds model in the UI

long karma
#

Do you have a test front-end where I can test your flow?

lone turret
#

In mode test it works fine

#

But using test cards

#

But with real card like BNP doesn't work properly

long karma
#

In those cases you are saying a 3DS modal is never shown? There's no overlay at all?

lone turret
#

no overlay at all

#

this is the code in the website
when i receive client_secret from webhook i send it to UI and then i use it for the function 'confimrcardSetup'

long karma
#

That is the wrong JS function

#

In that snippet you are calling confirmCardPayment

#

You need to call the function confirmCardSetup instead

lone turret
#

๐Ÿคจ sorry ๐Ÿซฃ

#

i'll try it now

long karma
#

NP. They are very similar

lone turret
#

yes ๐Ÿฅฒ

long karma
#

Redrigz - setup intent

eternal crest
lone turret
#

this is the result

long karma
#

What is the call to authenticate?

eternal crest
lone turret
#

this is our fault, now it works fine, i really thank u

eternal crest
#

๐Ÿ™

long karma
#

I'm glad you were able to figure it out!

#

Sometimes it just takes talking back and forth

lone turret
#

yes u are right especially when u had a stressfull day

#

i wish u the best and thank u again