#Hugues

1 messages · Page 1 of 1 (latest)

spare jungleBOT
warm yarrow
#

Hello! Can you provide the Setup Intent ID so I can take a look?

maiden vessel
#

seti_1NnPwyFGXpRXhvrdNXSkA2mV

warm yarrow
#

Have you set up a Webhook Endpoint to listen for setup_intent.succeeded Events?

#

Doesn't look like any are set up on your account.

maiden vessel
#

In my test environment, I want to be notified by webhook events. Within your page, do I click the "Add an endpoint" first and then "Test in a local environment" once the endpoint got created?

warm yarrow
#

Not sure what the "Test in a local environment" part is... is your server online, or is it just running locally only?

maiden vessel
#

Only locally for now. But I can see that, in order to define Endpoints, I must provide a publicly-accessible URL... I guess that I have some configuration job ahead! Thanks for the feedback.

warm yarrow
#

You can use Stripe CLI to forward events to your local server.

maiden vessel
#

Yes but then, I have no access to the real events that are on the dashboard.

warm yarrow
#

What do you mean?

maiden vessel
#

As far as I understand, the CLI triggers fake events and I'd have to use fixture to put some meat to their payload. Still, these events are fake and do not refer to any events catched by the dashboard.

warm yarrow
#

That is not correct. Stripe CLI can be used to trigger events, but those events aren't fake (they show up in your Dashboard like any other event). Stripe CLI can also be used to forward all events to your local server using the stripe listen command.

#

For example, if I had a development server running on localhost with a webhook listener set up at http://localhost/stripe/webhooks I could run stripe listen --forward-to http://localhost/stripe/webhooks to have all events forwarded to that local server's listener.

#

Also of note, when you use stripe trigger to trigger a specific event, Stripe CLI does so by performing the actions that lead to that event, it doesn't make a fake event out of thin air or anything like that.

maiden vessel
#

I understand. But I'm experimenting with a server that creates a setup-intent and I would like this server to receive a setup_intent.succeeded FROM that setup intent. This is something that the CLI can't do.

warm yarrow
#

Yes, it can.

maiden vessel
#

How?

warm yarrow
#

For example, let's say I run stripe listen --forward-to http://localhost/stripe/webhooks. Now I go to the Dashboard and create a Customer. The customer.created event from me doing that will be forwarded to my server running on localhost. Likewise, if I ran some code to create a Customer, that customer.created event would also be forwarded to my server running on localhost.

spare jungleBOT
warm yarrow
#

You seem to be under the impression that Stripe CLI's stripe listen command only deals with events Stripe CLI triggers. That is not the case. stripe listen listens for all events in test mode regardless of their origin.

#

Does that make sense?