#dev-paymentintent-refund

1 messages · Page 1 of 1 (latest)

steep fulcrumBOT
heavy wind
#

dev-paymentintent-refund

#

@hollow abyss there would be no Refund in that case if you canceled a Charge that wasn't captured, there's nothing to "refund" since you never captured the funds

hollow abyss
#

But on the Stripe dashboard there is a refund object created for that charge

heavy wind
#

Can you give me an example PaymentIntent id? I'm confused now

#

I thought you said refunds was null

#

Ah I think I get what you meant and I misunderstood

hollow abyss
#

Where would I do the expansion? On the paymentIntent?

#

I remember trying to expand it but it said refunds was not expandable

heavy wind
#

Step 1: read the Expand feature doc to understand it
Step 2: map that to what you're trying to do

#

So if you look at the Charge, you can expand refunds. If you look at the PaymentIntent, you need to get to the Charge, which is latest_charge so you expand latest_charge.refunds

hollow abyss
#

So the .addExpand should be "refunds" and that should be added as so: Charge.retrieve(paymentIntent.getLatestCharge(), expandPararms, requestOptions) ?

heavy wind
#

I think so yes

hollow abyss
#

Okay, I will it give it a try. If it doesnt work then I think I might just use the List Refunds API. Thank you for your help ^^

heavy wind
#

if it doesn't work let me know and I can look

hollow abyss
#

Okay, thanks. Appreciate it

heavy wind
#

of course!

hollow abyss
#

It looks like the refunds expandable worked for charge. Thanks for the help

steep fulcrumBOT
heavy wind
#

amazing! Sorry this isn't super intuitive at first

hollow abyss
#

No problem, I appreciate the help.

heavy wind
#

Have a great day! 🙂