#mohit_39749

1 messages ยท Page 1 of 1 (latest)

elfin stratusBOT
sly grotto
#

But I guess you'll need to confirm the PI first with a payment method

cold fox
#

there is no stripre api request

#

for this

sly grotto
#

There has to be. You're making an API call to capture an intent

#

What's the pi_xxx ID?

cold fox
sly grotto
#

I know which endpoint you're referencing yep

cold fox
#

pi_3OFEFqKUlkWJEm6X0ML5ohLM

#

this is the id I have generated now

#

which I furether pass it on another enpoint which capture the paymentintent

sly grotto
#

Ok, so why do you think you need to call the /capture endpoint for that payment?

cold fox
#

becuase I want to release some of the payment like small percentage 30% and rest I will be hold

sly grotto
sly grotto
#

But either way the PI needs to be confirmed before you capture it

cold fox
#

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

sly grotto
#
  1. Create a PI with capture_method: 'manual'
  2. Collect payment details and confirm the PI. It'll transition to status: 'requires_capture'
  3. You can then call the /capture endpoint and capture/release the funds as you require
cold fox
#

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

sly grotto
#

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

cold fox
#

what should I do when I want to release the remaniing amount after some amount captured , or it is possible or not

sly grotto
cold fox
#

not able to get it

#

can you ellaborate it

sly grotto
elfin stratusBOT
cold fox
#

what happen when I cancel the PI, it realses the emaining the payment?

sly grotto
#

Yes, please read the links I'm sharing with you

cold fox
#

'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

next linden
#

๐Ÿ‘‹ taking over for my colleague. Let me catch up.

cold fox
#

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 ?

next linden
#

sorry for taking that long, discord is super busy at the moment