#Giriraj
1 messages · Page 1 of 1 (latest)
@lunar comet no need to do this right?
https://stripe.com/docs/payments/place-a-hold-on-a-payment-method#capture-funds
It depends on the status of your Payment Intent.
- If the payment intent is not captured yet, i.e.
statusinrequires_capture, you'd need to cancel the payment intent: https://stripe.com/docs/api/payment_intents/cancel - If the payment intent is successfully captured, i.e.
statusinsucceeded, then refund should be used: https://stripe.com/docs/api/refunds/create
Refund can only be used when the Payment Intent is captured. If Payment Intent isn't captured yet, you should cancel the Payment Intent instead.
ok, correct. but if i have capture payment and if i need to partial refund then what to do?
The partial amount can be set in the refund request, so that only the amount in the request will be refunded
suppose i have capture amont 800$ then i need to do below
await stripe.refunds.create({
payment_intent: paymentIntent,
amount: 400$,
})
this is correct? @lunar comet
i know amount is cent i just provide you example.
Yup correct, but without $ in the amount (just number alone)
yes, thank you. let me try