#CipherDev17

1 messages · Page 1 of 1 (latest)

fierce thunderBOT
white robin
#

There seems to be a new ID, should that be replacing my whec_****

scarlet hamlet
#

Hello 👋
If you created a new endpoint then your webhook secret might've changed.

#

i.e. whsec_xxxxx

white robin
#

this is my endpoint, in the top right corner of this there is a ID that starts with we_

scarlet hamlet
#

If you look under Signing Secret

#

You'll find the secret key which is used for signature verification on your webhook

white robin
#

ohhh so this is the new webhook endpoint secret key?

scarlet hamlet
#

yeah secrets are different per webhook endpoint

#

Would recommend checking your code to see if you're using the correct secret

white robin
#

Okay so with stripe and webhooks you will have two secret keys, one is the webhook secret and the other is just the stripe secret key.

I think i have the right webhook key but not the secret key.

I can find the secret key in the "API Keys" tab under "Secret Key" correct?

scarlet hamlet
#

yup

white robin
#

do registered endpoints still work when you are in test mode?

scarlet hamlet
#

Not sure what you mean by that, can you elaborate?

white robin
#

so my website is in production but I am still using test mode on stripe. Could that be the issue? Because I am pretty sure I have the right secret key and webhook endpoint secret key.

#

so on my endpoint that I created, there is like some sort of ID in the top right that I am not using for anything at the moment. What is that used for?

#

this image cuts off half of the secret key

#

or whatever that ID is

scarlet hamlet
#

we_xxxx is not a secret key, it is the webhook endpoint ID

Can you share an example event ID (evt_xxxx) which you expected to be delivered on your webhook but it didn't?

white robin
#

should I be using that we_xxxx somewhere?

#

Bc i am already using the Signing Secret key for my stripe webhook endpoint secret key

scarlet hamlet
#

Can you share the example event ID please?

white robin
#

i am listening for a charge.suceeded event

scarlet hamlet
white robin
#

evt_1MYXISGUljPyCRPOMlXDu2Xh

scarlet hamlet
#

This is a checkout.session.completed event

white robin
#

evt_3MYXIPGUljPyCRPO27Hd3yjJ

scarlet hamlet
#

if you look at the event delivery section, it was successfully sent to https://underdogidols.com/webhook

white robin
#

sorry my bad, this one says charge.succeeded

scarlet hamlet
#

Ah looks like it is.

#

Okay so the webhook events are being sent.

Now, next step here would be to check your server log where the endpoint is hosted to see if there were any errors on your end which caused your code that handles charge.succeeded events to NOT run

white robin
#

im hosting on digital ocean, so there should be a log there of any issues with the webhook?

scarlet hamlet
#

Yes