Webhooks are used extensively at Stripe and are a great way to make sure your database is up to date with Stripe. They take care, amongst other things, to let you know a trial is over (first charge of their credit card), a subscription is renewed or a charge has failed (after Stripe’s retried)—thus the subscription should be canceled.
To test a webhooks locally you can use a service like https://ngrok.com, https://www.forwardhq.com or https://localtunnel.github.io/www/ (free). Though Stripe also provides a CLI to work with their webhooks (amongst other things).
A Rails SaaS starter kit to build successful products
25+ developers, companies and freelancers bought Sjabloon in the last 4 weeks