Stripe webhook signature verification #2518
-
I'm trying to get Stripe's signature verification to work. Currently tried many variant of this:
Stripe is saying either Stripe's NextJS docs does this:
But Hono throws an error saying Do anyone have a suggestion on how to do this? I've been Googling for a while... |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
@hideokamoto-stripe Can you help with this? |
Beta Was this translation helpful? Give feedback.
-
Related to #1561 According to the Cloudflare Workers blog, the implementation method seems to be slightly different from the one introduced in the Stripe Docs using Node.js. However, since Hono works across multiple runtimes, this may not be the cause of the issue you're facing. For Cloudflare Workers, Stripe has published sample code. It includes the implementation of Webhooks as well, so I would recommend trying that out. |
Beta Was this translation helpful? Give feedback.
-
@yusukebe Another idea, should I try to create a new middleware or adapter for it? In that case, I'm curious about how we can detect the runtime name or the difference. |
Beta Was this translation helpful? Give feedback.
Thanks! I managed to get it working like this in Hono: