#MrCSJ

1 messages · Page 1 of 1 (latest)

viral girderBOT
obsidian marsh
#

Hi there,
Could you please share the event that has been triggered by that command? otherwise you need to pass a valid customer Id

simple zealot
#

sure

#

as you see, the command what i use is "stripe trigger payment_intent.payment_failed --override payment_intent:customer=mrcsj"

#

the picture of my screen shot is still uploading

#

i got your said, in fact the customer id is not important

#

in a real flow of payment, i create payment intent,then pay with your sdk. i want to mock a webhook that can related to our transaction id

obsidian marsh
obsidian marsh
simple zealot
#

i just use this to test how to custom parameters about stripe cli trigger

#

i my real needs, i want to customer some parameters that can replated to our system transaction

cloud totem
#

you don't override payment_intent:customer since that is the ID of the Stripe Customer object , rather you would pass some metadata to the PaymentIntent or the Customer. Give me a second to show you how that's done with overrides in stripe-cli.

simple zealot
#

perfect, thank u very much

cloud totem
#

you'd do stripe trigger payment_intent.payment_failed --override payment_intent:metadata[my_custom_id]=foobar for example.

simple zealot
#

i will have a try, it seems that it can works as i expect

simple zealot
#

stripe trigger payment_intent.payment_failed --override payment_intent:metadata[transactionReqId]=P37051567799545856029

#

i use this command. but the body my webhooks server didn't receive the metadata with transactionReqId=P37051567799545856029

#

the metadata i have received was empty map

cloud totem
#

can you post the ID of the PaymentIntent pi_xxx ?

simple zealot
#

yeah , pi_3LuZn2AFXudwb6tK375K0k0I

cloud totem
#

you must not be passing it right or your shell is mangling the [ or something. It definitely works for me (I copied your exact command into bash and it works fine)

#

maybe try wrapping in quotes like stripe trigger payment_intent.payment_failed --override "payment_intent:metadata[transactionReqId]=P37051567799545856029" .

simple zealot
#

thank u, i will have try

cloud totem
#

it's something to do with your shell really

#

it will work fine in real code

simple zealot
#

i post two screen shot about this try with 'stripe trigger payment_intent.payment_failed --override "payment_intent:metadata[transactionReqId]=P37051567799545856029" '

#

it's metadata is still empty

cloud totem
#

looks like you're using one of our hosted CLI editor or something from the docs? I'm not familiar with those. If you install the actual CLI program on your actual machine that will probably work, or the same if you write some code to set metadata in general in your actual application code later

simple zealot
#

i use the web stripe cli