#Alchemist-refund-pi

1 messages · Page 1 of 1 (latest)

violet vault
#

Hey! Yep, you need to pass the underlying Payment Intent ID from the Invoice (pi_xxx). You can't pass the Invoice ID

opaque sluice
#

Hey, thanks for the quick reply. How can I get the Payment intent based on the Invoice ID?

#

I can easily partially refund an invoice from the web app so I believe it must be possible using API as well.

violet vault
#

You'd retrieve the Invoice (https://stripe.com/docs/api/invoices/retrieve) and the payment_intent field will have the ID you need: https://stripe.com/docs/api/invoices/object#invoice_object-payment_intent

violet vault
#

Plus, the required pi_xxx ID is probably just available in the context of that Dashboard UI

opaque sluice
#

Ah, that wasn't too hard. Thanks a lot for your help. Really appreciate it.

#

I wish all the Apps with APIs had such a great community

violet vault
#

np!