#beninate-stripe-mock
1 messages ยท Page 1 of 1 (latest)
yup... ๐ฆ
One more q then. If I a refund is processed on a PaymentIntent, this would still be the Event that would be triggered? https://stripe.com/docs/api/events/types#event_types-charge.refunded
yup, that's the right event
๐ thx
gosh im sorry, ONE more question. I would like to distinguish between refunds that are triggered on our platform vs refunds that may be triggered from within Stripe. Would the best way to handle that be by using the metadata field?
no, nvm that wouldn't work because the response object for a refund event is the charge object ๐ค
gah sorry, I missed this
wdym may be triggered from within stripe?
this case shouldn't happen
d'you mean triggered from the dashboard / triggered by one of your connected accounts vs being triggered by your code?
correct
triggered in the Stripe dash vs triggered via our platform
is this a reliable way to parse out the applicable Refund we'd be receiving a charge.refunded webhook for?
Stripe::Event.retrieve(params[:id]).data.object.refunds.first
it's giving me what i would need right now testing it out, from there I could look at the metadata and determine if it was triggered by our platform or not. Im just not sure if that is a reliable way of getting it or not
that should work, since the refunds list is reverse chronological