#senorkarlos
1 messages ยท Page 1 of 1 (latest)
using webhooks to listen for charge.refunded fyi
Hi
object with the same id and "amount_refunded" indicating the current transaction, and if there are subsequent refunds, same thing but with a "refunds": {...} ? listing previous transactions?
Can you share exactly to what field are you referring to from the API reference? Here you can find all the related refunds of a given charge:
https://stripe.com/docs/api/charges/object#charge_object-refunds
lmao that's the page I'm on. I'm just peicing together my understanding from the references here
{
"id": "ch_3MmlLrLkdIwHu7ix0snN0B15",
"object": "charge",
"amount": 878,
"amount_captured": 878,
"amount_refunded": 0, <-----
that feild. So say I gave someone a 50% refund, I would get this?
{
"id": "ch_3MmlLrLkdIwHu7ix0snN0B15",
"object": "charge",
"amount": 878,
"amount_captured": 878,
"amount_refunded": 439, <-----
...
"refunds" {
this transaction crap
}
and then say the rest was refunded later,
"id": "ch_3MmlLrLkdIwHu7ix0snN0B15",
"object": "charge",
"amount": 878,
"amount_captured": 878,
"amount_refunded": 439, <-----
...
"refunds" {
this transaction crap
last transaction crap
}
in refunds you'll have all the refunds: the first one and the second ones
you have all the related refunds to the charge not just the last one
feel free to do some tests
In order to understnad it well
Try using these cards:
https://stripe.com/docs/testing#refunds