#Stone-Webhook

1 messages · Page 1 of 1 (latest)

vocal grail
#

Hi there, is it about webhook signature verification?

slow sinew
#

yes

vocal grail
#

Can you share with me the complete error message and your code?

slow sinew
#

public String orderPayResultV2(HttpServletRequest request, String payload){

String sigHeader = request.getHeader("Stripe-Signature");
try {
event = Webhook.constructEvent(payload, sigHeader, STRIPE_WEBHOOK_SECRET);
} catch (SignatureVerificationException e) {
// Invalid signature
throw new MissingServletRequestParameterException("error","sig");
}

}

#

.support.DefaultHandlerExceptionResolver. logException 207 : Resolved [org.springframework.web.bind.MissingServletRequestParameterException: Required request parameter 'error' for method parameter type sig is not present]

vocal grail
#

OK. Please check if you passing the correct webhook secret. The secret you get from dashboard is different from the one generated in Stripe CLI

slow sinew
#

I am sure that STRIPE_WEBHOOK_SECRET is correctly my web secrect on test mode.

vocal grail
#

Did you get this webhook secret from dashboard directly?

slow sinew
#

The exact error is "No signatures found matching the expected signature for payload"

slow sinew
#

I never used Stripe CLI

slow sinew
#

Hello Jack.

#

What's the matter?

#

I think i am wrong.

#

I use like this we_1IuxmrIXF5VHSVPpVX0nLXXX

vocal grail
slow sinew
#

I correct that, use the key like whsec_xxxxx

vocal grail
#

OK, is your problem resolved?