Stripe WebHooks handling in ASP.NET MVC (C#)

In recent years Stripe has become a major payments provider. It is loved by managers and developers for a reason. Stripe has easy to use APIs, SDKs in multiple languages and outstanding documentation.
Like other payment platforms, Stripe utilizes webhooks to inform about customer, subscription, card and many other changes in the state.

While this strategy works great in production, during development it can be tricky to receive these webhooks, especially when webhooks are critical for building subscription (or recurring payment) based systems where your backend system needs to track subscription status.


Code snippet to handle stripe webhooks in ASP.NET MVC and ASP.NET Core (C#) applications.

Stripe WebHook Controller