#moses-webhooks
1 messages · Page 1 of 1 (latest)
hi, regardless of your framework, webhooks only needs a valid HTTP Post Endpoint
Yes, I know. What request should I use to receive it? Have a demo?
If I use HttpServletRequest, I don't receive any request.
Can you please provide your webhook endpoint id we_xxx
Here's a sample code for a Spring Webhook Endpoint
@RequestMapping("/webhook")
class WebhookController {
def secret = "whsec_xxx"
@RequestMapping(method=RequestMethod.POST)
public @ResponseBody String getEvent(@RequestBody String request, @RequestHeader(value="Stripe-Signature") String signature){
Event event = Webhook.constructEvent(request, signature, secret)
System.out.println(event.type)
//...
//...
}
//...
}```
I tested it with localhost
Thank you. I'll have a try.
let me know if you need any more help
No more questions, thank you.