#m4tt-cli-trigger

1 messages ยท Page 1 of 1 (latest)

frigid rain
young oak
#

also, is there any way to make the event actually be related to a real (albeit test) payment?

frigid rain
#

Hi again ๐Ÿ‘‹ the reason you see multiple things happen when you trigger an event such as payment_intent.succeeded is because the CLI is actually stepping through all the necessary steps to simulate that event.

So using payment_intent.succeeded

  1. A Payment Intent needs to be created
  2. The underlying Charge for the Payment Intent is completed
  3. Then the Payment Intent transitions into a succeeded state.
#

So you should actually see the Payment Intent from that event in your account now.

young oak
#

ok cool thats what i figured.. hence the second question!

#

did you see the second question @frigid rain ?

also, is there any way to make the event actually be related to a real (albeit test) payment?

frigid rain
#

No, there isn't a way to tell the CLI to use existing objects for its flows. It will always create new objects.

young oak
#

ah ok, so i guess i need to use ngrok to test "real" webhooks?

frigid rain
#

Sorry, not sure I'm following.

#

If you're using stripe listen then the CLI will listen for any events that occur on your account (based on the flags/options you use) and can then forward those to a local endpoint. So you can just go through your test flow and the CLI should pick up on the events that are generated.

young oak
#

ohhhh

#

apologies, i didnt realise stripe cli can be used for listening to actual events, i thought it was only used for triggering

frigid rain
young oak
#

amazing, thank you

#

whats the difference between payment_intent.succeeded and charge.succeeded ?

frigid rain
#

Primarily the object that is returned in the event body. They're essentially triggered by the same thing, when a Charge succeeds then the Payment Intent that it is associated with also succeeds.

#

Payment Intents just use an underlying Charge to complete the payment.

young oak
#

๐Ÿ‘