#uh oh

1 messages · Page 1 of 1 (latest)

flint summitBOT
brave swallow
#

Hi there

#

You would need to re-auth the saved PaymentMethod in this case.

paper nexus
#

Is there any documentation on that?

#

The flow that I am currently trying to fix:

  1. Today, the user buys a product that will be sent out in the future (+7 days, let's say 10 days from today).
  2. There is a payment intent created for that today.
  3. Unfortunately, by the time the product is sent out (10 days from now), the payment intent is expired.
brave swallow
#

Are you creating a Customer and using setup_future_usage on your PaymentIntent?

#

But you also add capture_method: manual

paper nexus
brave swallow
#

That's fine

#

Mostly you need to ensure the PaymentMethod is attached to the Customer

#

So that you can charge it again if the Auth expires

paper nexus
brave swallow
paper nexus
#

I'm looking at the types of webhooks and it does not seem to have payment_intent.<auth_expired> or something like that

#

is there a webhook for a payment intent where the auth expired?

brave swallow
#

The PaymentIntent status moves to canceled in this case so the payment_intent.canceled event will fire

paper nexus
#

Is there a way to know if that payment_intent.canceled is thrown because of paymentIntent.cancel or bc of authorization expiration?

#

Like a specific parameter that it returns?

brave swallow
#

Well there shouldn't really be another reason a PaymentIntent would move to canceled unless you are using Subscriptions or you are canceling them manually yourself