Webhook Overview
Understanding webhooks and event handling
Webhook Overview
Webhooks allow external services (payment gateways, registrars) to notify your system of events in real-time.
Webhook Endpoints
- Stripe:
/webhooks/stripe - PayPal:
/webhooks/paypal
Webhook Flow
- External service sends HTTP POST request to webhook endpoint
- System verifies webhook signature (if supported)
- System processes the event and updates database
- System logs webhook in
webhookstable - System returns HTTP 200 response
Webhook Security
- Signature Verification: Always verify webhook signatures when provided
- HTTPS Only: Webhooks should only be received over HTTPS
- IP Whitelisting: (Optional) Whitelist gateway IP addresses
Webhook Logging
All webhooks are logged in the webhooks table:
gateway- Gateway name (stripe, paypal)payload- Raw webhook payload (JSON)processed- Whether webhook was successfully processedcreated_at- Timestamp