#senorkarlos

1 messages ยท Page 1 of 1 (latest)

visual patioBOT
crystal relic
#

using webhooks to listen for charge.refunded fyi

karmic ledge
#

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

crystal relic
#

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
    }
karmic ledge
#

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

crystal relic
#

oh ok

#

like that?

#

edited both

karmic ledge
#

feel free to do some tests

#

In order to understnad it well

crystal relic
#

Well I mean if that's correct, i understand it well ๐Ÿ˜› - I came here to avoid wasting 20 mins on console logging or whatnot ๐Ÿ˜‰

#

๐Ÿ˜„

#

I thank you much ๐Ÿ™‚