#myoussef-webhook-secret

1 messages · Page 1 of 1 (latest)

serene fossilBOT
sturdy egret
#

Hello, apologies the server is busy

#

What do you need help with in regards to the secret key? Are you getting an error somewhere?

prime pagoda
#

and i added this line
const string endpointSecret = "whsec_...";

#

what is the value of this variable endpointSecret that i should use in production ? where to get it ?

sturdy egret
serene fossilBOT
prime pagoda
#

i tried now to create new webhook and i did not find the key that you mentioned

#

only code sample at the right side of screen and this comment is appear at the top of the secret key

    // This is your Stripe CLI webhook secret for testing your endpoint locally.
sturdy egret
#

There should be a section on that page named "Signing Secret" that has a link named "Reveal" under it

prime pagoda
#

the length of this key is 38 character (is that correct?) because the testing one was 70 charcter

fleet saddle
#

myoussef-webhook-secret

#

You're likely mixing up an API key like sk_test_123 and a webhook endpoint secret like whsec_123

prime pagoda
#

no, when i tired to click on Add-End-Point button, there is a sample of code at right, this code contains a value for this key and lenght is 70 chars,
by the way if the 38 one is correct, just confirm to use it please

fleet saddle
#

I can't tell you. What matters is the exact prefix I just explained above. As long as you use those values (which you can match to what the Dashboard tells you) you'll be fine

prime pagoda
#

i can not get the answer, can you calrify more what is the key that i should use for webhook to take it to live ?

fleet saddle
#

You're likely mixing up an API key like sk_test_123 and a webhook endpoint secret like whsec_123

#

Sorry Discord is really busy right now and I don't really get your question. You ask "what is the keuy" and there are multiple different keys. So I can't really answer without more specific details. But I explained above what the 2 types of "secret" or "keys" look like

prime pagoda
#

i appreciate your help, what i need is , this variable in this link
const string endpointSecret = "whsec_...";

is the value is coming from webhook screen (sigining secret) ?
https://stripe.com/docs/webhooks/quickstart

fleet saddle
#

Okay so yes that is the "signing secret" associated with your WebhookEndpoint and you should make sure that value matches what you see if you click "Reveal" to be safe (but it should be, though what's the point of the Reveal button if we put it right there in clear text 😅 )

prime pagoda
#

thanks

#

is there a way to secure the webhook end point from calling it outside stripe ?

fleet saddle
#

you basically only lets requests from our real documented IPs and block everything else

prime pagoda
#

Thanks a lot