#Sergio Sánchez

1 messages · Page 1 of 1 (latest)

lilac oliveBOT
pulsar pier
#

Hello Hanzo!

nimble rain
#

Not sure I understand the usecase, you can't accept a payment without creating a PaymentIntent

#

Hello 👋

pulsar pier
#

let me provide you a bit of context

#

in our use case we have the following steps:

#
  1. We ask for the customer about the payment method (client side)
#

2 We validate the payment method and hold the required funds and if everything goes well we create the "booking request" entity we use to follow the process (server side)

#
  1. After a couple of days we capture the funds
nimble rain
#

Wouldn't it be easier to use a SetupIntent to store the payment method and then charge the payment method via server-side off-session PaymentIntents?

pulsar pier
#

and when you confirm the payment itself, I mean, we want to get the payment method but also hold an amount of money and confirm customer has enough money to be capture later, is it possible with a SetupIntent?

nimble rain
pulsar pier
#
  amount: 1099,
  currency: 'eur',
  payment_method_types: ['card'],
  capture_method: 'manual',
});```
#

is this call (including the payment method) going to say "Your customer does not have enough funds" in case that we can not hold the money?

nimble rain
#

Yeah the authorization should fail if they don't have enough funds

pulsar pier
#

ok so create = authorization in that specific case

nimble rain
#

capture_method: 'manual', specifies the hold

pulsar pier
#

and then if something fails we can sync go back to our customer and say "you dont have enouhg funds"

#

last request, could you provide me the right documentation page to understand how to use SetupIntent?

#

I have seen that confirmSetup also have a redirection.... we would like to avoid this because is in the same page where we call to the server in order to create the booking reuquest and confirm the payment intent

nimble rain
#

last request, could you provide me the right documentation page to understand how to use SetupIntent?
https://stripe.com/docs/payments/save-and-reuse this one ?
Correct.

I have seen that confirmSetup also have a redirection.... we would like to avoid this because is in the same page where we call to the server in order to create the booking reuquest and confirm the payment intent
You can set redirect to if_required which prevents it from redirecting (unless the payment method requires it)

pulsar pier
#

ok understood

nimble rain
#

👍

pulsar pier
#

I guess that is all

#

thanks a lot for your support