#akii-payment-confirmation

1 messages ยท Page 1 of 1 (latest)

kind gulch
#

๐Ÿ‘‹ Happy to help

#

What type of integration are you using now?

dry dome
#

Im making a Payment intent, and trying to charge user an amount , that should also pay using its default source. I also wanted to do that using frontend, so that if the card requires authentication then Striep can handle that.

#

Can u help?

kind gulch
#

Yup, I'm looking for the relevant docs

dry dome
#

Okay thanks.

#

Im also looking for one more thing...

#

Is there any paramter in Payment Intent that i can set, so it saves the card that i enter??

#

Like payment_settings-save_default_payment_method

kind gulch
dry dome
#

Okay

kind gulch
dry dome
#

Okay

dry dome
kind gulch
#

Do you have a sample payment intent generated by invoice that requires 3DS?

dry dome
#

okay wait checking..

dry dome
#

Im not able to find this method on ui stripe.handleNextAction(client_secret)

kind gulch
#

Ah, it looks like stripe.handleNextAction(..) is in beta

#

I'll hand over this thread to my colleague @edgy garden to check if there's any better way to:

  1. use default payment method for an invoice
  2. handle extra action if required
edgy garden
#

Hello, jumping in for river ๐Ÿ‘‹

#

@dry dome If I understand correctly, you created an Invoice server-side and got the PaymentIntent inside it, correct?

#

And I suppose you have the PaymentMethod Id already attached to it?

#

Anw it would be easier if you can share a sample Payment Intent Id (pi_xxx) and I can take a closer look

dry dome
#

okay

#

pi_3LKya7GLOO5b7AOM1w7npgxm

#

??

edgy garden
#

I am checking on it

#

So I see you created an Invoice from a Customer that already has a PaymentMethod attached, so it's delegated to this PaymentIntent

dry dome
#

yes

edgy garden
#

pm_1LKxb8GLOO5b7AOMNHJ1kPyl

dry dome
#

yes

edgy garden
dry dome
#

okay

edgy garden
#

That way handleCardAction will take care of 3DS

dry dome
#

okay thanks

#

looks like this will work

#

I had one more doubt.

#

Im using stripe in a REACT Js application.

#

I am having trouble with having to load <Elements> tag with clientSecret.

#

I want to use useStripe hook everywhere in my app, without having to deal with clientSecret.

dry dome
#

Yes, but i have done this and its working, now when the stripe is redirecting me to return_url, i again want to use a stripe call, which means i again need to have <Elements> tag loaded???

edgy garden
#

Can you elaborate a bit more? What do you mean by again want to use a stripe call

dry dome
#

See, lets say I have a component where i want to call stripe.handleCardAction(). Now here i will be passing the clientSecret tht i got from backend API . It gives me an error that you need to wrap this inside an <Elements > container.

#

But now again even if i wrap it in a <elements> container, then i will need clientSecret as well.

#

Where will i provide this cs from?

edgy garden
#

Sorry if I am missing something but how about just initialize stripe.js to call handleCardAction?

var stripe = Stripe('pk_test_xxx');
stripe.handleCardAction('pi_secret')
dry dome
#

Do u mean using loadStripe?

#

let stripePromise = loadStripe('pk_test_xxx');

edgy garden
#

Ah I see what you mean

#

Let me looking around

dry dome
#

TypeError: (0 , stripe_stripe_js__WEBPACK_IMPORTED_MODULE_16_.Stripe) is not a function

#

This is error its giving, when using Stripe('pk_test_xxx');

edgy garden
#

Now when you have this stripe.js instance, you can try calling handleCardAction

dry dome
#

okay trying this,please dont close the thread