#mohit_39749
1 messages ยท Page 1 of 1 (latest)
Can you share the ID (req_xxx) of the failing API request? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
But I guess you'll need to confirm the PI first with a payment method
There has to be. You're making an API call to capture an intent
What's the pi_xxx ID?
I am refering this for integreation of paymentIntent -
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.
I know which endpoint you're referencing yep
pi_3OFEFqKUlkWJEm6X0ML5ohLM
this is the id I have generated now
which I furether pass it on another enpoint which capture the paymentintent
Ok, so why do you think you need to call the /capture endpoint for that payment?
It uses capture_method: 'automatic' โ you'd only need to call /capture if manual: https://stripe.com/docs/payments/place-a-hold-on-a-payment-method
becuase I want to release some of the payment like small percentage 30% and rest I will be hold
What you need to do is collect payment details from your user in Stripe.js and confirm the PI: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-submit-payment
Ok, then you need to follow the guide here:https://stripe.com/docs/payments/place-a-hold-on-a-payment-method
But either way the PI needs to be confirmed before you capture it
but in confirm it will be confirm the whole amount instead I can no tedit the amoount
but then it is showing like it will only caputred the uncaptured payment
Yep, so pass capture_method: 'manual' when you create the PI as per https://stripe.com/docs/payments/place-a-hold-on-a-payment-method
- Create a PI with
capture_method: 'manual' - Collect payment details and confirm the PI. It'll transition to
status: 'requires_capture' - You can then call the
/captureendpoint and capture/release the funds as you require
really thanks for the time
it works
and also one more question
that ther will be no url for like paying the amount or
in test mode
just like when we create the checkout session in stripre , it will return the url also , why it is not provided here to pay or it whether it will provide in live mode
If yiou're using Payment Intents directly (in your example) then no, there's no hosted UI for your users to pay at. The idea is that you'd build a UI for them to provide payment details and confirm the payment
If you want a hosted URL you can send them, then use Checkout
what should I do when I want to release the remaniing amount after some amount captured , or it is possible or not
You'd cancel the PI: https://stripe.com/docs/payments/place-a-hold-on-a-payment-method#cancel-authorization
Get what? Use this endpoint: https://stripe.com/docs/api/payment_intents/cancel
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
what happen when I cancel the PI, it realses the emaining the payment?
Yes, please read the links I'm sharing with you
'You cannot cancel this PaymentIntent because it has a status of succeeded. Only a PaymentIntent with one of the following statuses may be canceled: requires_payment_method, requires_capture, requires_confirmation, requires_action, processing.',
this error is comming now
like after one capture the status there will be succeeded, there fore showing error
๐ taking over for my colleague. Let me catch up.
yes carry on
'You cannot cancel this PaymentIntent because it has a status of succeeded. Only a PaymentIntent with one of the following statuses may be canceled: requires_payment_method, requires_capture, requires_confirmation, requires_action, processing.',
this error is comming now
like after one capture the status there will be succeeded, there fore showing error
Are you there ?
sorry for taking that long, discord is super busy at the moment