#Sven

1 messages · Page 1 of 1 (latest)

minor nebulaBOT
minor fulcrum
#

there is also a refund ID you can record

mossy sparrow
#

I see. But it's not transmitted via webhook? When I hit "refund" in the stripe dashboard, I only receive the charge.refunded webhook, no refund.created or similar

minor fulcrum
#

Can you share that event ID?

#

any example one will do

mossy sparrow
#

I issued now a refund via test mode on the dashboard and only a charge.refunded event was arrived via webhook: evt_3N8Ol7KykkNsEbHP2kwyU0p2

#

I'd expect a refund.created event as well, such as payment_intent.created. But maybe it'll be created only when created via API, not via Stripe Dashboard? But I'd consider this inconsistency then.

minor fulcrum
#

Ah right, ok

#

So if you need the refund objects/IDs, you will need to retrieve that charge and expand refunds to get those:
https://stripe.com/docs/api/charges/object#charge_object-refunds
https://stripe.com/docs/api/expanding_objects
https://stripe.com/docs/expand

Learn how to reduce the number of requests you make to the Stripe API by expanding objects in responses.

mossy sparrow
#

okay, will do that. So it's normal behavior to just receive a charge.refunded webhook event.

#

Basically we only have to listen to two major webhook events: charge.succeeded, charge.refunded. And + dispute handling

#

to proper save transactions in our database

minor fulcrum
#

Yes, because your account was created after 2022-11-15 thats the default API version

#

Previously, that refunds object would have been populated for inspection, but this was changed in the latest api version

#

Charge no longer auto-expands refunds by default. You can expand the list but for performance reasons we recommended against doing so unless needed.

minor nebulaBOT
mossy sparrow
#

Okay. thank you for your great support!