Gravity has API routes and a webhookController pre-configured for you to start accepting webhooks from external services and APIs.
For the Node.js server, register POST /api/webhook/stripe with Stripe and set STRIPE_WEBHOOK_SECRET to the endpoint’s signing secret. The handler verifies the signature and processes customer.subscription.deleted. It handles accounts downgrading their plan to free at the end of their current billing cycle.
Please refer to the Stripe documentation for the latest information on testing Stripe webhooks.