Code Explainers

Code explainers tagged #event dispatch

ruby
class Webhooks::StripeController < ApplicationController
  skip_before_action :verify_authenticity_token
  skip_before_action :authenticate_user!
 

How a Rails Stripe webhook controller works

webhooks signature verification event dispatch
Intermediate 7 steps
javascript
import { NextResponse } from 'next/server';
import Stripe from 'stripe';
import { headers } from 'next/headers';
 

Handling Stripe webhooks in Next.js

webhooks signature verification payment processing
Intermediate 7 steps