#Sergio Sánchez

1 messages · Page 1 of 1 (latest)

proper krakenBOT
drowsy thicket
#

Hello! Can you clarify? What specific questions do you have?

remote zodiac
#

sure 😉

#

but I am missing some steps that maybe you can help to clarify, let me share further details

#

our use case is:

#
  1. The customer access to our checkout funnel to provide a payment method
#
  1. We need to validate the payment method and "block" the amount of money we require for the payment
#
  1. After some extra process which could take 2 days, we want to charge the payment
#

What I understand following the documentation is:

#
  1. I create a payment intent with capture=manual
#
  1. We present to our user the PaymentElement providing the client_secret as option
#
  1. We handle the submit making a elements.submit() to validate the payment method
#
  1. After 2 days we execute stripe.paymentIntents.capture to charge the amount we need
#

I am not pretty sure of this process and if this work as I say, could you give me some highlevel steps in order to cover our use case properly?

drowsy thicket
#

You'll just change the PaymentIntent creation code to set capture_method: manual

#

and then you'll need to implement your own thing to do the capturing of the paymentIntent after the two days

remote zodiac
#

ok so a couple of extra questions

#

following this process, should I skip the stripe.confirmPayment call in the submit? Will it capture the payment?

#

or confirmPayment is what is used in order to validate and block the payment intent defined?

drowsy thicket
#

You should still be calling confirmPayment (you need that to be successful to capture the payment in the future)

remote zodiac
#

ok understood, so only stripe.paymentIntents.capture is actually use for the charge

#

the rest of call defined in the documention are basically to define the payment, authorize and block, right?

drowsy thicket
#

Yup

remote zodiac
#

ok so now more clear for me 😉 last question

#

if I want to avoid "guess" customer, waht I need to do is create the customer before the payment intent and then pass to the payment intent the customer id. Or is there any option to create the customer at the same time you are collecting the payment method using the payment elements?

drowsy thicket
#

You'd have to create the Customer ahead of time

remote zodiac
#

ok and then pass it to the payment intent

#

perfect

#

everythign clear

#

thanks a lot for your support 😉