Nextbase Docs
Payments

Stripe Webhooks

Stripe webhooks are crucial for keeping your application in sync with events that happen in Stripe, such as successful payments, subscription updates, or failed charges. In NextBase, we've set up a webhook endpoint to handle these events. Let's break down how it's configured:

Webhook Endpoint

The webhook endpoint is set up in src/app/api/stripe/webhooks/route.ts. This file contains a POST route handler that processes incoming webhook events from Stripe.

The webhook syncs products, prices, and subscriptions with our database.

On this page