#MrCSJ
1 messages · Page 1 of 1 (latest)
Hi there,
Could you please share the event that has been triggered by that command? otherwise you need to pass a valid customer Id
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
You need to set a valid customerId, something like
stripe trigger payment_intent.payment_failed --override payment_intent:cus_123
Why you want to override it then?
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
you would use metadata for this (https://stripe.com/docs/api/metadata)
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.
perfect, thank u very much
you'd do stripe trigger payment_intent.payment_failed --override payment_intent:metadata[my_custom_id]=foobar for example.
i will have a try, it seems that it can works as i expect
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
can you post the ID of the PaymentIntent pi_xxx ?
yeah , pi_3LuZn2AFXudwb6tK375K0k0I
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" .
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
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
i use the web stripe cli