#lucho-pi-action

1 messages · Page 1 of 1 (latest)

maiden hull
#

it all depends on how you are integrated

#

are you just doing one time payments? Subscription recurring payments? something else?

and are you using Stripe's "recommedned" integration? or something more custom that you built

vivid belfry
#

Hi there! I'm doing just payments, nothing else. Yes, I'm using Stripe's recommended integration

#

What should I tell to the user how to solved this in order to complete the payment successfully?

maiden hull
#

well if your webpage is already using confirmPayment() then you don't need to handle this at all

#

confirmPayment() takes care of this

#

are you familiar with how PaymentIntents state machine works?

vivid belfry
#

Yes, I'm using paymentIntents.create with "confirm" attribute = true

#

Could you share something about PaymentIntents state machine please?

maiden hull
#

haha that isn't the recommended integration though

#

which you said you were using

vivid belfry
#

hahaha sorry!!

maiden hull
#

it is an integration, just not the recommended one

#

if you want my honest opinoin

vivid belfry
#

Ohh I see

#

Yes, please

maiden hull
#

just implement this end to end

and you then don't need to handle that event

#

here is the link:

vivid belfry
#

Sorry, what do you mean with end to end?

maiden hull
#

why did you not go with Checkout?

vivid belfry
#

I have a react front end where a user is going to enter the amount and charge to their customers

#

No checkout need it

maiden hull
#

Checkout can work with that too, just saying

#

like Checkout or PaymentElement are just places to collect card details from a customer

#

they both work with your usecase

#

one is just easier

vivid belfry
#

Exactly! Thanks for clarifying , really appreciate!

#

So, I'll use paymentIntent without "confirm" = true

#

According to the documentation, I should listen to payment_intent.succeeded, payment_intent.processing and payment_intent.failed

#

Right?

#

Sorry to bother

#

I saw that for create a paymentIntent in my node server, I should code this:

const paymentIntent = await stripe.paymentIntents.create({
amount: 1099,
currency: 'eur',
automatic_payment_methods: {enabled: true},
});

What about payment_method? Should I add it here?

maiden hull
#

the PaymentMethod is collected in the next step

#

read through the whole guide

#

and you'll see the "client-side" parts of the itnegration

#

Paymentelement is what you use on your webpage to collect PaymentMethod details