#beninate-stripe-mock

1 messages ยท Page 1 of 1 (latest)

mellow pelican
#

oh fascinating

#

well that'll do it :/

rustic kraken
#

yup... ๐Ÿ˜ฆ

mellow pelican
#

yup, that's the right event

rustic kraken
#

๐Ÿ‘Œ 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 ๐Ÿค”

mellow pelican
#

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?

rustic kraken
#

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

mellow pelican
#

that should work, since the refunds list is reverse chronological

rustic kraken
#

ok

#

i think this gives me what i need. thanks for the help