well, actually "[...] since Stripe can only send events to a real server, not localhost." is not entirely true. Using dedicated Stripe CLI you can easily listen for any stripe events and forward them to any (including localhost) address.
it's simple as a single line command:
stripe listen --forward-to localhost
Techtolia
If you are looking the latest solution of Stripe payment gateway integration in ASP.NET Web Forms or ASP.NET Core MVC, check out the demo --> techtolia.com/Stripe
Receive payments from credit or debit cards, Alipay, WeChat Pay, Bancontact, EPS, giropay, iDEAL, Multibanco, Przelewy24, SOFORT, Secure Remote Commerce and Payment Request Button (Apple Pay, Google Pay, Microsoft Pay, and the browser Payment Request API) via Stripe.