#sarim-webhook-connect
1 messages ยท Page 1 of 1 (latest)
ok then how stripe can recognised which endpoint going to call either direct or connect because key is same for both
it's not a key
the CLI knows how to detect which endpoint this is for
Easiest is really to just try in Test mode and see what happens to get a real understanding of it
ok one more time in my application.properties file i have 2 signature one for connect and one for direct so when i am going to test direct webhook endpoint in my app i just place secret-key with stripe.direct-signature value that stripe provides in his dashboard and its working fine but when i am going to call connect so again the secret is same then how stripe get its connect call or direct call that is my confusion right now
I'm sorry you're saying partly the same work and keep talking about a secret key
the Secret API key is sk_test_123. It's used to make API requests. It's completely different from the webhook endpoint's signing secret (not secret key) whsec_123
If you use the CLI, the CLI will generate a different signing secret and you use the CLI one when debugging with it
Does that make sense?
ok let me clarify when i am using this command ./stripe listen --forward-to localhost:8080/webhook/direct stripe generate like Your webhook signing secret is whsec_4f7.... something and when i am going to call Webhook.constructEvent this method requires secret as a last parameter So you mean its same for both connect and direct endpoint ??
then why stripe dashboard provide separate keys for direct and connect ? is it make sense ?
yes, it's the global signing secret for the CLI
This is all test mode. To the CLI it's all one endpoint
in production, you have 2 separate endpoints, each with their own signing secret
but if you go through the CLI it's handled differently
alright now i am understand and stripe is automatically recognised which event goes to which endpoint right ?
that part I'm not sure, I haven't tested this recently so the best option is to test this quickly to confirm
alright now i am understand thank you so much koopajah to avaoid my confusion
Happy to help ๐
its working fine thanks dude