#roshanind-webhook
1 messages · Page 1 of 1 (latest)
Hi @iron agate I'll take over the thread, give me a sec to catch up.
thank you @ornate pewter
I can see that this event was delivered successfully to your staging webhook endpoint. Is the Stripe CLI currently running in your local workstation?
yep
stripe listen --events customer.subscription.deleted --forward-to localhost:3010/api/payments/webhook
this is the command I used to invoke it
can you run stripe login again to make sure you are using the correct Stripe account?
sure i saw in doc that I can pass the api key as well. should I do that also?
You don't need to pass api key to Stripe CLI, which doc are you reading?
"Optionally, use the --api-key flag to specify your API secret key inline each time you send a request."
OK, usually the API secret key isn't required in the webhook endpoint implementation unless you are making API requests in the event handling.
cool, give me some time ill try what you told me and and get back to you
thank you for the suggestion
hey @ornate pewter I tried login and loggedin selecting the correct account
but still the webhook event required for me didn't get fired
I'm going to update the version and see
OK, can you listen to all events instead of just customer.subscription.deleted? also check if localhost:3010/api/payments/webhook is still running
so I followed following steps
- stripe login and ^C
- ran stripe listen and used the signing secret it provided
- executed my code and the server is running
and still it didn't work
by the way other events are coming
OK. can you check your webhook code and see if it's handling customer.subscription.deleted correctly?
ideally all events should pass this switch (event.type) {point
I canceled a subscription from dashboard as well
and didn't trigger the webhook
can you send me the event ID?
hook is getting triggered for other events
evt_1KsiY0BY7YGnUFCCcYKxrokU
i can see that the event is registed in the webhook section in stripe admin
Is your Local CLI is running?
I'm asking because I don't see a local listeners in the dashboard.
oh i can see that?
yes the cli is running
how can I check local listeners?
in the webhook section?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
You should see your Stripe CLI in the local listeners section
oh yeah
stupid me
didn't notice that
now the problem is why it's not showing there
Do you have more than one Stripe accounts?
I see. when you do stripe login, do you choose the right account?
yep
Did you select the right account in the dropdown box?
yep
Hmm, that's very strange
i once changed to the first and then again changed to the account i needed