Add webhook to Nextjs / stripe frontend

Job ID: 32762018

Budget: $10 – $30 CAD

All I need is one function.
I need the user subscription object sent to my database after the user subscribes and checks out, my db is node on mongodb. I need the user subscription object sent to the subscription table on my database. please write "hello' so I know you read the entire description. I literally need one function written please know how to work with stripe and particularly webhooks. This will not be easy for a noob.
Related categories: JavaScript Node.js React.js Stripe Next.js