stripe / stripe-cli

A command-line tool for Stripe
https://stripe.com/docs/stripe-cli
Apache License 2.0
1.57k stars 362 forks source link

stripe trigger charge.succeeded `--add` will not add metadata #1113

Closed ArbiterOfBuffoonery closed 7 months ago

ArbiterOfBuffoonery commented 10 months ago

Issue

When I execute the command

stripe trigger charge.succeeded --add 'charge:metadata[is_something]=true' --add 'charge:metadata[anotherValue]=the_value'

The resulting webhook does not contain any metadata.

Expected Behavior

When I was testing around the may/june timeframe, the above command would result in 2 metadata keys in the map.

Steps to reproduce

Traceback

Share any debug output that was given by the CLI

Environment

Linux (Ubuntu 22.04.3 LTS)

etsai-stripe commented 7 months ago

i just ran the same command and was able to see the two added keys in the map could you please try again?

ArbiterOfBuffoonery commented 7 months ago

i just ran the same command and was able to see the two added keys in the map could you please try again?

What version of stripe? when I attempt to reproduce, the metadata map is still empty.

stripe --version
stripe version 1.18.0

I also ran this command without setting up the local listener and it didn't show the metadata in the dashboard.

etsai-stripe commented 7 months ago

@ArbiterOfBuffoonery ah! the api has been changed here https://github.com/stripe/stripe-cli/pull/1106/files please change your command to $ stripe trigger charge.succeeded --add 'payment_intent:metadata[is_something]=true' --add 'payment_intent:metadata[anotherValue]=the_value'

i have verified this on v1.18.0

ArbiterOfBuffoonery commented 7 months ago

@ArbiterOfBuffoonery ah! the api has been changed here https://github.com/stripe/stripe-cli/pull/1106/files please change your command to $ stripe trigger charge.succeeded --add 'payment_intent:metadata[is_something]=true' --add 'payment_intent:metadata[anotherValue]=the_value'

i have verified this on v1.18.0

That explains it, thanks for the help!