#cnguyen85

1 messages · Page 1 of 1 (latest)

cloud jacinthBOT
#

Hello cnguyen85, we'll be with you shortly! Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
https://discord.com/channels/841573134531821608/1164196532980027393, 1 days ago, 6 messages
https://discord.com/channels/841573134531821608/1163889854212485170, 2 days ago, 10 messages

fringe talon
#

Hi there!

azure grove
#

Hi

fringe talon
#

It means this parameter can only be set when you confirm the PaymentIntent

azure grove
#

If I create the PI from the back, I can't confirm the payment because it means tht it's like a payment off-session. No ?

#

For now, I create a SI fro mthe back. And I do a confirmCardSetup from the front to validate it

fringe talon
#

You can try confirming the PI on the backend. But if the bank requires 3DS, then you'll have to confirm it on the frontend.
Note that I'm assuming you already collected a PaymentMethod.

azure grove
#

No. I don't have the PaymentMethod yet

fringe talon
#

Then first create the PI on the backend, then use the client_secret on the frontend to collect the paymentmethod and confirm the PI.

azure grove
#

1 - Back => Create the SetupIntent
2 - Front => We have CardElement and use the confirmCardSetup with the SI token and the CardElement to do the confirm

fringe talon
azure grove
#

OK but it's ok to create the PI on the backend with the network and the confirm true in the first step ?

fringe talon
azure grove
#

Sure

#

For now, I do :
let params = {
automatic_payment_methods: { enabled: true },
usage: 'off_session',
customer: stripeCustomer.id,
metadata: additionalMeta,
payment_method_options: {
card: {
request_three_d_secure: 'any',
}
},
};

    const response = await stripe.setupIntents.create(params);
#

Then, I send the clientSecret : response.client_secret

#

And in the front, I do

#

const responseCardSetup = await stripe?.confirmCardSetup(
clientSecret,
{
payment_method: {
card: cardNumber,
billing_details: {
name: ${customer.firstname} ${customer.lastname},
},
},
}
)

fringe talon
#

That seems correct to me. Does it work?

azure grove
#

Sure. The problem is that I want to specifiy the network

#

So I have to update the SI creation by adding the params.payment_method_options.card.network = network;

#

But it's only possible if I add the confirm: true params too

#

But for me, if I add the confirm true here, it doesn't work anymore

fringe talon
#

But for me, if I add the confirm true here, it doesn't work anymore
Using confirm: true only makes sense if you already have a Payment Method.

#

But you could set that property when confirming the SetupIntent on the frontend maybe?

azure grove
#

The network option doesn't exist on confirmCardSetup. I already tried

fringe talon
#

Give me a few minutes to look into this.

azure grove
#

thank you

cloud jacinthBOT
fringe talon
#

But yes it's not available for SetupIntent for some reasons.

azure grove
#

Yes

#

But the confirmCardPayment is for PI only

fringe talon
#

Yes. I'll file a feedback internally about this, not sure why.

azure grove
#

So I have to switch my SI creation by a PI creation maybe ? And do a confirmCardPayment ? It will be the same no ?

#

The only thing is that I have to have an amount for the PI

iron mason
#

You'd only want to use a payment intent if you're trying to collect payment, this is a core switch in your flow

#

Are you intending to take a payment now?