Skip to main content

Stripe Webhooks

Webhooks allow Stripe to notify your app when events happen—like successful payments, subscription changes, or failed charges.

Supported Events

Launch handles these webhook events out of the box:

How It Works

  1. Stripe sends event to your webhook endpoint
  2. API verifies signature to ensure authenticity
  3. Handler processes event and updates database
  4. User sees changes reflected in the app

Webhook Endpoint

Location: apps/api/src/routes/stripe-webhooks.ts

Local Development

For local testing, use ngrok to expose your API:
Remember to update your webhook URL in Stripe Dashboard whenever your ngrok URL changes.

Database Updates

When webhook events are received, the following tables are updated:
  • StripeCustomer - Customer information
  • Subscription - Subscription status and details
  • Payment - Payment history

Debugging

Check your API logs for webhook activity:

Test Checklist

  • Webhook endpoint responds to Stripe test events
  • STRIPE_WEBHOOK_SECRET matches the dashboard
  • Subscription/payment records update in the database

Troubleshooting

If events are not received, verify ngrok URL and webhook configuration in Stripe Dashboard.

Remove / Disable

To disable payments while you configure Stripe, set: apps/mobile/features/feature-registry.tsxfeatureFlags.payments = false For production removal guidance, see Removing Features.

Next Steps

Setup Guide

Configure webhook endpoints and secrets.

Database Schema

View the database models for payment data.