#CAMOU

1 messages · Page 1 of 1 (latest)

fierce vineBOT
tepid barn
#

Specifically which event?

sand bloom
#

looking to get the metadata from it can be either a dispute for a subscription or a one-time payment

tepid barn
#

Which object is the metadata set on?

sand bloom
#

it's set on either the subscription or the one-time payment

#

oh okay gotcha

#

but I can't add a charge ID or something to the stripe trigger command so I can test it properly with meta data right?

safe radish
#

not really, you could write a small script to call the API (create a Charge with metadata using the test card for declines) instead of using stripe trigger, or write your own fixture' for the Stripe CLi

tepid barn
#

This may work: stripe trigger charge.dispute.created --override dispute:charge=ch_xxx
ch_xxx being an actual Charge object on your account

safe radish
#

actually stripe trigger charge.dispute.created --override charge:metadata.foo=bar might work

sand bloom
#

oh awesome thanks guys!

sand bloom
#

stripe trigger charge.dispute.created --override charge:metadata.foo=bar charge:metadata.bar=foo like this?

safe radish
#

AFAIK yes, did it work when you tried ?

sand bloom
#

so the charge itself doesnt show up

#

but I cant do an api call either because with the trigger tehre is no actual charge or is it?

#

i think im just gonna use the right test card for it didnt know there is one for disputes

safe radish
#

all the trigger does is it calls the API and creates a charge, which then creates a dispute

sand bloom
#

ah gotcha

#

so now the only problem i see is, from the dispute I get through the webhook how can I receive the Stripe Account ID? Because i use stripe connect so to continue with an api reqeust for the Paymetn Intent for example I would need the stripe account id that was the dispute belong sto

safe radish
#

there is an account field in the event if it's a Connect webhook