#sow - Auth & Capture

1 messages · Page 1 of 1 (latest)

patent harness
patent harness
#

Okay. Why are you confirming the payment_intent on the server instead of through the front-end?

steel walrus
#

Hello @rocky imp catching up

#

Hello, I am afraid I don't follow your original ask. The first thing I want to clarify is the same as my colleague: why are you confirming the PaymentIntent on server (passing confirm=true)? It's the manual flow, and we recommend the standard flow over it by confirming on client side

rocky imp
#

Let us know if we can do it synchronousely

steel walrus
#

It's correct to rely on webhook to fulfill your service like above article, and it's part of the standard flow (https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-post-payment) Async is better than sync because on sync your customer can accidentally close the browser tab or lost connection, so your point is valid.
What we were concern is that you mentioned passing confirm=true. It the manual flow aka "Finalize Payments server-side" (https://stripe.com/docs/payments/accept-a-payment-synchronously). In this flow you confirm the PaymentIntent on server synchronously, hence you won't use webhook. But we always advise to use the standard flow instead

Securely accept payments online.

rocky imp
#

In our case we are following this , https://stripe.com/docs/payments/capture-later#authorize-only and as the doc says the card error / 3d secure is happening once we follow this step from the client side "Before continuing to capture, attach a payment method with card details to the PaymentIntent, and authorize the card by confirming the PaymentIntent. You can do this by setting the payment_method and confirm fields on the PaymentIntent."

Separate authorization and capture to create a charge now, but capture funds later.

#

So it is better to do it in webhook way and notify the flutter though the payment intent failure can be available immediate at the client side, right ?

steel walrus
#

ugh the Doc is confusing. Yes this should be possible with normal webhook/client confirmation way

#

Sorry about it

rocky imp
#

ok np thank you. Also are there any kind of delays for the authorization that we can expect? We are planning to build UX accordingly in our client apps

steel walrus
#

It depends on the PaymentMethod. Card is mostly synchronous, but other PaymentMethod could be not (ie Bank Transfer - ACH in the US). That's why relying on Webhook is the best practice and can help you scale better in the future

#

Like, you inform your customer to pay, but they might need sometimes to get the fund actually moved, then in client you have no other choice than wait, and catch the status change on server by wehhook from Stripe

rocky imp
#

Ok thanks 👍