#RGRTHAT - Confirm Payment
1 messages · Page 1 of 1 (latest)
howdy
Im doing stripe.create.paymentIntent and i pass payment method to it
i get the paymentIntent id from the creation
i want to capture the payment straight away
Do you specify that you want it to be confirmed with confirm: true?
https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm
And if you do it server side you'll want to specify that off_session is also true.
https://stripe.com/docs/api/payment_intents/create#create_payment_intent-off_session
yeh
but say if i want to not capture it straight away
do use .capture method?
or .confirm
I tried .confirm straight after creation of paymentIntent but then it said "no such paymentIntent", even though its brand new
You can do it all in 1 API call if you set the right parameters
You only need the use the Capture method if you are using an Authorize & Hold approach.
Can you share the API request ID that has the error about no such payment intent?
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
@leaden island It worked to use the "confirm" parameter
thats great if i want to capture the paymentintent straight away
Im on the fence if I should capture it straight away, or wait say a few days
If I run another api call and fetch the paymentintent later, do I use ```js
stripe.paymentIntents.capture or stripe.paymentIntents.confirm
A whole lot
If you want to hold an authorized payment for days you should read this doc: https://stripe.com/docs/payments/place-a-hold-on-a-payment-method
@leaden island I already have the payment method from setupIntent
Please read the docs thoroughly as we include information about how to place holds and capture payments after a waiting period