#rip-refund-history
1 messages · Page 1 of 1 (latest)
rip-refund-history
@gloomy zinc I'm not really sure I get the way the questions are framed so I'm answering a bit orthogonally and hopefully that's what you want, but if not, please give me a bit more details about what you mean.
You can use the List Refunds API https://stripe.com/docs/api/refunds/list to find all the Refunds in your account. Each Refund will be tied to a PaymentIntent with more details. If you also use Checkout (our real hosted payment page product) then usually you cache that mapping between a Checkout Session (cs_test_123) and a PaymentIntent pi_123 in your own database and can map things together.
There is no way, looking at the Refund, to know whether it was refunded via the API or the Dashboard or who made the API Request, so if that's what you're after that's not possible.
As for the Events you can use the charge.refunded Event which indicates when a payment is refunded and then look at the list of Refunds associated with that Charge to map them together
Okay great this is what I was looking for. So even though its a Checkout, I would listen for charge.refunded events
What attribute from that event do I need to link it to a checkout:paymentintent mapping? will the charge.refunded include the paymentIntent?
yes to the last question. Easiest is really to just test this in Test mode, it'll take a few seconds and give you all the answers!