#kbrady - Payment Intents
1 messages · Page 1 of 1 (latest)
There are a couple different scenarios but one would be: 402 Payment Required if the payment method had insufficient funds or an expired card
Then the PI should still be in a requires_payment_method state. You can still use it to collect card information using the client_secret
On the payment intent object itself we see a status: requires_payment_method
So I would just be able to call capture on that payment intent again?
Yup
Well, you'd need to make the confirm call first to get new payment method data
Sorry, when you say "capture", there is a specific funds flow that involves placing holds on cards and later capturing the funds so I might be confused by that word
I'm just referencing the capture endpoint of the payment intents API: https://stripe.com/docs/api/payment_intents/capture
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yeah this endpiont is specifcally for capturing funds that have been authorized but not collected
It's used in this payment flow: https://stripe.com/docs/payments/place-a-hold-on-a-payment-method
So if I am not using the capture flow, I would just reuse that confirm endpoint to re-attempt a charge? Right now we are not using the confirm endpoint directly because we pass confirm: true when creating the payment intent.
The confirm endpoint is used by Stipe.js when collecting payment method information