Provider Integrations
Unhook provides built-in support for major webhook providers, making it easy to test and debug webhooks from popular services like Stripe, GitHub, Clerk, and many more.
Overview
Unhook supports webhook providers across multiple categories:
Payment Processing Stripe, PayPal, Square, and more
Version Control GitHub, GitLab, Bitbucket
Authentication Clerk, Auth0, Supabase Auth
E-commerce Shopify, WooCommerce, BigCommerce
Custom Providers Any webhook-enabled service
Supported Providers
Payment Processing
Stripe
The most popular payment processor with comprehensive webhook support.
Supported Events:
payment_intent.succeeded
payment_intent.payment_failed
invoice.payment_succeeded
customer.subscription.created
charge.succeeded
And 100+ more events
Configuration:
# unhook.yaml
webhookId : "wh_stripe_prod"
destination :
- name : "stripe-handler"
url : "http://localhost:3000/api/webhooks/stripe"
source :
- name : "stripe"
delivery :
- source : "stripe"
destination : "stripe-handler"
Stripe Dashboard Setup:
Go to Stripe Dashboard → Webhooks
Add endpoint: https://unhook.sh/wh_stripe_prod
Select events to listen for
Save webhook
PayPal
PayPal’s webhook system for payment notifications.
Supported Events:
PAYMENT.CAPTURE.COMPLETED
PAYMENT.CAPTURE.DENIED
CHECKOUT.ORDER.APPROVED
BILLING.SUBSCRIPTION.CREATED
Configuration:
# unhook.yaml
webhookId : "wh_paypal_prod"
destination :
- name : "paypal-handler"
url : "http://localhost:3000/api/webhooks/paypal"
source :
- name : "paypal"
delivery :
- source : "paypal"
destination : "paypal-handler"
Version Control
GitHub
GitHub webhooks for repository events and actions.
Supported Events:
push
- Code pushes to repository
pull_request
- Pull request events
issues
- Issue creation and updates
release
- Release creation
workflow_run
- GitHub Actions workflow runs
Configuration:
# unhook.yaml
webhookId : "wh_github_repo"
destination :
- name : "github-handler"
url : "http://localhost:3000/api/webhooks/github"
source :
- name : "github"
delivery :
- source : "github"
destination : "github-handler"
GitHub Repository Setup:
Go to repository Settings → Webhooks
Add webhook: https://unhook.sh/wh_github_repo
Select events to listen for
Set content type to application/json
Save webhook
GitLab
GitLab webhooks for repository and CI/CD events.
Supported Events:
Push Hook
- Code pushes
Merge Request Hook
- Merge request events
Pipeline Hook
- CI/CD pipeline events
Issue Hook
- Issue events
Authentication
Clerk
Modern authentication platform with comprehensive webhook support.
Supported Events:
user.created
user.updated
user.deleted
session.created
session.ended
organization.created
Configuration:
# unhook.yaml
webhookId : "wh_clerk_auth"
destination :
- name : "clerk-handler"
url : "http://localhost:3000/api/webhooks/clerk"
source :
- name : "clerk"
delivery :
- source : "clerk"
destination : "clerk-handler"
Clerk Dashboard Setup:
Go to Clerk Dashboard → Webhooks
Add endpoint: https://unhook.sh/wh_clerk_auth
Select events to listen for
Save webhook
Auth0
Auth0’s webhook system for authentication events.
Supported Events:
post-login
post-registration
post-change-password
post-user-creation
Communication
Slack
Slack webhooks for workspace events and interactions.
Supported Events:
message
- New messages in channels
reaction_added
- Emoji reactions
channel_created
- New channels
team_join
- New team members
Discord
Discord webhooks for server events.
Supported Events:
MESSAGE_CREATE
- New messages
MEMBER_JOIN
- New members
CHANNEL_CREATE
- New channels
GUILD_MEMBER_UPDATE
- Member updates
E-commerce
Shopify
Shopify webhooks for store events.
Supported Events:
orders/create
- New orders
products/create
- New products
customers/create
- New customers
inventory_levels/update
- Inventory changes
Configuration:
# unhook.yaml
webhookId : "wh_shopify_store"
destination :
- name : "shopify-handler"
url : "http://localhost:3000/api/webhooks/shopify"
source :
- name : "shopify"
delivery :
- source : "shopify"
destination : "shopify-handler"
Custom Provider Support
Generic Webhook Support
Unhook supports any webhook-enabled service through generic webhook handling:
# unhook.yaml
webhookId : "wh_custom_service"
destination :
- name : "custom-handler"
url : "http://localhost:3000/api/webhooks/custom"
source :
- name : "custom"
delivery :
- source : "custom"
destination : "custom-handler"
Custom Provider Configuration
Configure custom providers with specific requirements:
# unhook.yaml
webhookId : "wh_custom_api"
destination :
- name : "custom-api-handler"
url : "http://localhost:3000/api/webhooks/custom"
headers :
x-api-key : "your_api_key"
x-custom-header : "custom_value"
source :
- name : "custom-api"
delivery :
- source : "custom-api"
destination : "custom-api-handler"
Provider-Specific Features
Signature Verification
Many providers include signature verification for security:
Stripe Signature Verification
// Verify Stripe webhook signature
import { headers } from 'next/headers' ;
import Stripe from 'stripe' ;
const stripe = new Stripe ( process . env . STRIPE_SECRET_KEY ! );
const webhookSecret = process . env . STRIPE_WEBHOOK_SECRET ! ;
export async function POST ( request : Request ) {
const body = await request . text ();
const signature = headers (). get ( 'stripe-signature' );
try {
const event = stripe . webhooks . constructEvent ( body , signature ! , webhookSecret );
// Process the event
return Response . json ({ received: true });
} catch ( err ) {
return Response . json ({ error: 'Invalid signature' }, { status: 400 });
}
}
GitHub Signature Verification
// Verify GitHub webhook signature
import crypto from 'crypto' ;
export async function POST ( request : Request ) {
const body = await request . text ();
const signature = headers (). get ( 'x-hub-signature-256' );
const secret = process . env . GITHUB_WEBHOOK_SECRET ! ;
const expectedSignature = `sha256= ${ crypto
. createHmac ( 'sha256' , secret )
. update ( body )
. digest ( 'hex' ) } ` ;
if ( signature !== expectedSignature ) {
return Response . json ({ error: 'Invalid signature' }, { status: 401 });
}
const event = JSON . parse ( body );
// Process the event
return Response . json ({ received: true });
}
Event Filtering
Filter events by type for specific providers:
# unhook.yaml
webhookId : "wh_stripe_filtered"
destination :
- name : "stripe-payments"
url : "http://localhost:3000/api/webhooks/stripe/payments"
- name : "stripe-subscriptions"
url : "http://localhost:3000/api/webhooks/stripe/subscriptions"
source :
- name : "stripe"
events :
- "payment_intent.succeeded"
- "payment_intent.payment_failed"
- "customer.subscription.created"
- "customer.subscription.updated"
delivery :
- source : "stripe"
events : [ "payment_intent.*" ]
destination : "stripe-payments"
- source : "stripe"
events : [ "customer.subscription.*" ]
destination : "stripe-subscriptions"
Integration Examples
Multi-Provider Setup
Handle multiple providers in a single configuration:
# unhook.yaml
webhookId : "wh_multi_provider"
destination :
- name : "stripe-handler"
url : "http://localhost:3000/api/webhooks/stripe"
- name : "github-handler"
url : "http://localhost:3000/api/webhooks/github"
- name : "clerk-handler"
url : "http://localhost:3000/api/webhooks/clerk"
source :
- name : "stripe"
- name : "github"
- name : "clerk"
delivery :
- source : "stripe"
destination : "stripe-handler"
- source : "github"
destination : "github-handler"
- source : "clerk"
destination : "clerk-handler"
Environment-Specific Providers
Different providers for different environments:
# unhook.dev.yaml
webhookId : "wh_dev"
destination :
- name : "stripe-test"
url : "http://localhost:3000/api/webhooks/stripe"
source :
- name : "stripe"
mode : "test" # Use Stripe test mode
delivery :
- source : "stripe"
destination : "stripe-test"
# unhook.prod.yaml
webhookId : "wh_prod"
destination :
- name : "stripe-live"
url : "http://localhost:3000/api/webhooks/stripe"
source :
- name : "stripe"
mode : "live" # Use Stripe live mode
delivery :
- source : "stripe"
destination : "stripe-live"
Testing Provider Integrations
Local Testing
Test provider integrations locally:
# Start webhook listener
unhook listen --port 3000 --webhook-id wh_stripe_test
# Test with curl
curl -X POST http://localhost:3000/api/webhooks/stripe \
-H "Content-Type: application/json" \
-H "Stripe-Signature: ..." \
-d '{"type":"payment_intent.succeeded","data":{...}}'
Provider-Specific Testing
Use provider testing tools:
Stripe CLI
# Install Stripe CLI
stripe listen --forward-to localhost:3000/api/webhooks/stripe
# Trigger test events
stripe trigger payment_intent.succeeded
GitHub Webhook Testing
# Use GitHub's webhook testing feature
# Go to repository Settings → Webhooks → Recent Deliveries
# Click on any delivery to see the payload
Troubleshooting
Common Provider Issues
Signature Verification Failures
Verify webhook secret is correct
Check signature header format
Ensure payload hasn’t been modified
Check webhook URL is correct
Verify events are selected in provider dashboard
Check webhook is active and not disabled
Check provider’s rate limiting documentation
Implement exponential backoff
Monitor webhook delivery status
Provider-Specific Debugging
Stripe Debugging
# Check Stripe webhook logs
stripe logs tail
# Test webhook endpoint
stripe listen --forward-to localhost:3000/api/webhooks/stripe
GitHub Debugging
# Check webhook delivery status
# Go to repository Settings → Webhooks → Recent Deliveries
# Look for failed deliveries and error messages
Best Practices
Provider Configuration
Use environment-specific webhooks : Separate test and production webhooks
Implement signature verification : Always verify webhook signatures
Handle idempotency : Webhooks may be delivered multiple times
Monitor webhook health : Track delivery success rates
Security Considerations
Keep secrets secure : Store webhook secrets in environment variables
Verify signatures : Always verify webhook signatures for security
Use HTTPS : Ensure all webhook endpoints use HTTPS
Monitor access : Track webhook access and usage
Process webhooks asynchronously : Don’t block on webhook processing
Implement retry logic : Handle temporary failures gracefully
Monitor response times : Keep webhook processing fast
Use webhook queues : Queue webhooks for background processing
Next Steps
Responses are generated using AI and may contain mistakes.