#roshanind-webhook

1 messages · Page 1 of 1 (latest)

twin badger
#

hi there, can you share the event id?

iron agate
#

sure

#

evt_1KsgFGBY7YGnUFCCFLtnwkxE

ornate pewter
#

Hi @iron agate I'll take over the thread, give me a sec to catch up.

iron agate
#

thank you @ornate pewter

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?

iron agate
#

yep

#

stripe listen --events customer.subscription.deleted --forward-to localhost:3010/api/payments/webhook

#

this is the command I used to invoke it

ornate pewter
#

can you run stripe login again to make sure you are using the correct Stripe account?

iron agate
#

sure i saw in doc that I can pass the api key as well. should I do that also?

ornate pewter
#

You don't need to pass api key to Stripe CLI, which doc are you reading?

iron agate
#

"Optionally, use the --api-key flag to specify your API secret key inline each time you send a request."

ornate pewter
#

OK, usually the API secret key isn't required in the webhook endpoint implementation unless you are making API requests in the event handling.

iron agate
#

cool, give me some time ill try what you told me and and get back to you

#

thank you for the suggestion

iron agate
#

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

ornate pewter
#

OK, can you listen to all events instead of just customer.subscription.deleted? also check if localhost:3010/api/payments/webhook is still running

iron agate
#

so I followed following steps

  1. stripe login and ^C
  2. ran stripe listen and used the signing secret it provided
  3. executed my code and the server is running
#

and still it didn't work

#

by the way other events are coming

ornate pewter
#

OK. can you check your webhook code and see if it's handling customer.subscription.deleted correctly?

iron agate
#

ideally all events should pass this switch (event.type) {point

#

I canceled a subscription from dashboard as well

#

and didn't trigger the webhook

ornate pewter
#

can you send me the event ID?

iron agate
#

hook is getting triggered for other events

#

evt_1KsiY0BY7YGnUFCCcYKxrokU

#

i can see that the event is registed in the webhook section in stripe admin

ornate pewter
#

Is your Local CLI is running?

#

I'm asking because I don't see a local listeners in the dashboard.

iron agate
#

oh i can see that?

#

yes the cli is running

#

how can I check local listeners?

#

in the webhook section?

ornate pewter
#

You should see your Stripe CLI in the local listeners section

iron agate
#

oh yeah

#

stupid me

#

didn't notice that

#

now the problem is why it's not showing there

ornate pewter
#

Do you have more than one Stripe accounts?

iron agate
#

yep

#

2

ornate pewter
#

I see. when you do stripe login, do you choose the right account?

iron agate
#

yep

ornate pewter
#

Did you select the right account in the dropdown box?

iron agate
#

yep

ornate pewter
#

Hmm, that's very strange

iron agate
#

i once changed to the first and then again changed to the account i needed