#JohnM-successful-paymentIntent

1 messages · Page 1 of 1 (latest)

faint niche
tall geode
#

morning Toby...

faint niche
#

Hi 👋 I can't think of a scenario off the top of my head that would result in the charge failing after the paymentIntent moves to a successful status.

#

That being said, if I were in your position I'd probably build a case to catch it, just in case.

native crater
#

I would recommend listening to the webhook so you can confirm behind the scenes everything was ok before you start shipping products etc

tall geode
#

let me explain why I am asking. For ACH.. I am using the charge.successful web hook to trigger the creation of a transfer of the funds to the connect account. And right after the charge is created, I update the database so when the webhook is called, I know how to process the charge. In the case of a paymentintent, I seem to be receiving the charge.successful almost instantaneously ... before the database is updated. I am wondering if I need the charge.successful in the case of a paymentintent as it is a synchronous event for approval as apposed to async for ACH.

faint niche
#

If you don't set capture_method or confirmation_method to manual when you create the Payment Intent object, then you're right, the entire flow of charging your customer will occur nearly immediately.

tall geode
#

that is what I am doing. This is not a shopping cart. The customer has already stored the credit card. All they are doing is selecting the item to pay.

#

so, one more question. If the paymentintent has failed ... for example exceeded credit limit .. expired .... CVC code hase changed ... will the paymentintent fail ?

faint niche
#

Can you clarify as you mentioned the payment intent failing twice?

tall geode
#

maybe I need to clarify ... if there is something wrong with the paymentintent... for example the credit limit has been exceeded, invalid CVC code, card has expired... will the api fail. or do I have to specifically check the status code returned by the api ?

wise escarp
#

Not sure what you mean exactly @tall geode -- depending on how the payment in confirmed, this payment attempt would fail and return a 4xx error you can inspect for detail

#

but you'll need to re-attempt confirmation/payment with payment details again after that

tall geode
#

how exactly would I do that ?

wise escarp
#

You would confirm it again, using elements etc, for the same payment intent, but collect new card details

#

basically the same as the first time

tall geode
#

ok. thanks

wise escarp
#

NP!