Overview
Databuddy supports webhooks for real-time event processing and integrations. You can:- Automatically track revenue from Stripe and Paddle payments
- Receive real-time notifications about events
- Integrate with external systems
Payment provider webhooks
Databuddy provides first-class support for payment provider webhooks, automatically capturing revenue events and linking them to your analytics data.Stripe webhooks
Integrate Stripe to automatically track:- Payment intents (succeeded/failed/canceled)
- Invoices (paid/failed)
- Subscriptions (created/updated/canceled/paused/resumed)
- Refunds
Get your webhook URL
- Navigate to your Databuddy dashboard
- Go to Settings → Revenue Tracking
- Select “Stripe” as your payment provider
- Copy your webhook URL (format:
https://basket.databuddy.cc/webhooks/stripe/{hash})
Create webhook in Stripe
- Go to Stripe Dashboard → Webhooks
- Click “Add endpoint”
- Paste your Databuddy webhook URL
- Select events to listen for:
payment_intent.succeededpayment_intent.payment_failedpayment_intent.canceledinvoice.paidinvoice.payment_failedcustomer.subscription.createdcustomer.subscription.updatedcustomer.subscription.deletedcustomer.subscription.pausedcustomer.subscription.resumedcharge.refunded
- Click “Add endpoint”
Configure webhook secret
- Copy the webhook signing secret from Stripe
- Paste it into Databuddy Settings → Revenue Tracking → Stripe Webhook Secret
- Save your configuration
Linking Stripe payments to analytics
To connect Stripe payments with your website visitors, pass Databuddy tracking IDs in Stripe metadata:Stripe webhook events
Databuddy processes these Stripe events:payment_intent.succeeded
payment_intent.succeeded
Tracks successful payments as revenue events.Data captured:
- Transaction ID
- Amount and currency
- Customer ID
- Product description
- Type (sale or subscription)
- Databuddy tracking IDs (if provided in metadata)
payment_intent.payment_failed / canceled
payment_intent.payment_failed / canceled
Records failed or canceled payments for analysis.Useful for:
- Identifying payment friction
- Tracking decline rates
- Understanding abandonment
invoice.paid
invoice.paid
Tracks subscription renewals and recurring payments.Note: If the invoice has a
payment_intent, Databuddy will skip it to avoid double-counting (the payment_intent.succeeded event is used instead).customer.subscription.*
customer.subscription.*
Tracks subscription lifecycle events:
- Created: New subscription started
- Updated: Plan changed or subscription modified
- Deleted: Subscription canceled
- Paused: Subscription paused
- Resumed: Subscription resumed
amount: 0 but include metadata about the subscription status.charge.refunded
charge.refunded
Records refunds as negative revenue.Each refund is tracked separately with:
- Negative amount
- Status:
refunded - Original transaction reference
Paddle webhooks
Databuddy also supports Paddle for payment processing:Get your webhook URL
- Go to Databuddy Settings → Revenue Tracking
- Select “Paddle” as your payment provider
- Copy your webhook URL (format:
https://basket.databuddy.cc/webhooks/paddle/{hash})
Configure Paddle webhook
- Go to Paddle Dashboard → Notifications
- Add your Databuddy webhook URL
- Select events:
transaction.completedtransaction.billed
- Save the webhook
Linking Paddle payments to analytics
Pass Databuddy IDs in Paddle custom data:Custom webhooks
You can also set up custom webhooks to receive Databuddy events in your own systems.Webhook configuration
Use the webhook provider from the notifications package:Webhook payload structure
Databuddy webhooks send JSON payloads:Webhook security
Databuddy webhooks include signature verification:Stripe signature verification
Stripe webhooks use HMAC SHA256 signatures with timestamp validation:Paddle signature verification
Paddle uses HMAC SHA256 verification:Webhook best practices
Always verify signatures
Always verify signatures
Never process webhooks without signature verification. This prevents:
- Spoofed webhook requests
- Replay attacks
- Unauthorized data access
Handle retries gracefully
Handle retries gracefully
Payment providers will retry failed webhooks. Make your endpoint idempotent:
Respond quickly
Respond quickly
Webhook endpoints should respond within 5 seconds. For long-running tasks:
Log webhook events
Log webhook events
Keep logs of all webhook events for debugging:
Test in development
Test in development
Use Stripe CLI or Paddle sandbox for local testing:
Troubleshooting webhooks
Webhook not receiving events
Webhook not receiving events
- Verify the webhook URL is correct in your payment provider dashboard
- Check that your webhook endpoint is publicly accessible
- Ensure your server is returning 2xx status codes
- Check payment provider logs for delivery attempts
Signature verification failing
Signature verification failing
- Verify you’re using the correct webhook secret
- Check that you’re reading the raw request body (not parsed JSON)
- Ensure timestamp tolerance isn’t too strict
- Look for extra whitespace or encoding issues
Events not appearing in Databuddy
Events not appearing in Databuddy
- Verify the webhook secret is configured in Databuddy settings
- Check that you’re passing the correct metadata fields
- Ensure the website ID matches your Databuddy project
- Check Databuddy logs for webhook processing errors
Duplicate events
Duplicate events
Payment providers retry failed webhooks. Implement idempotency:
- Store processed event IDs in a database
- Use the event ID as an idempotency key
- Return 200 for already-processed events
Next steps
Custom Dashboards
Visualize your revenue data
Troubleshooting
Debug webhook issues
API Reference
Full SDK documentation
Migration Guide
Switch from Google Analytics