honojs / website

Repository for hono.dev
https://hono.dev
68 stars 209 forks source link

docs[snippets]: add stripe webhook integration #347

Closed hideokamoto-stripe closed 1 month ago

hideokamoto-stripe commented 1 month ago

I added a page introducing how to create an API using Hono to handle Stripe Webhook events.

Context

https://github.com/orgs/honojs/discussions/2518#discussioncomment-9170675

To add protection processing for the API endpoint, Stripe Webhooks require the raw request body. I created an article with sample code explaining how to obtain this for both Node.js and Cloudflare.

By adding this article, users using Stripe with Hono will find it easier to understand the integration method, and it will be easier to provide support in case of issues or discussions.

yusukebe commented 1 month ago

Hey @hideokamoto-stripe

Awesome! I've left one comment. Please check it.

hideokamoto-stripe commented 1 month ago

Thank you @yusukebe -san! I updated the file to add the section.

hideokamoto-stripe commented 1 month ago

Hello @yusukebe -san, I updated the code snippet according to your feedback. As a result, we can make it simpler than before. I also gained a deeper understanding of Hono through this process.

Please feel free to provide your comments about this update. Thank you.

yusukebe commented 1 month ago

Hi @hideokamoto-stripe

Then, are both codes necessary? Perhaps it can be one code example?

https://github.com/honojs/website/pull/347/files#diff-910a6082d7a38d32704ca78b93bf4923af1096c6861f072daab4f5e51753e8fcR30-R52

https://github.com/honojs/website/pull/347/files#diff-910a6082d7a38d32704ca78b93bf4923af1096c6861f072daab4f5e51753e8fcR65-R104

hideokamoto-stripe commented 1 month ago

@yusukebe I've removed unnecessary code snippets 👍

yusukebe commented 1 month ago

@hideokamoto-stripe

Thanks! I've left one more comment. Check it.

hideokamoto-stripe commented 1 month ago

@yusukebe Oh, I forgot to remove it. I've removed it!

yusukebe commented 1 month ago

@hideokamoto-stripe

Thanks! Let's ship it.