Stripe Webhook Issues
Stripe webhooks notify AffiliateBase about payment events. If webhooks aren’t working, conversions won’t track. This guide helps diagnose and fix webhook issues.
How Webhooks Work
Customer pays → Stripe processes → Webhook fires →
AffiliateBase receives → Conversion created
Key events:
invoice.paid- Primary event for conversion trackingcheckout.session.completed- Session completioncharge.refunded- Refund processing
Checking Webhook Status
In Stripe Dashboard
- Go to Stripe Dashboard
- Navigate to Developers → Webhooks
- Find the AffiliateBase endpoint
- Check status and recent deliveries
Webhook Health Indicators
| Status | Meaning |
|---|---|
| Enabled | Webhook is active |
| Disabled | Webhook turned off |
| Failing | Recent delivery failures |
Recent Attempts
Click on the endpoint to see:
- Recent delivery attempts
- Success/failure status
- Response codes
- Payload details
Common Issues & Solutions
Issue: Webhook Endpoint Not Found
Symptom: No AffiliateBase webhook in Stripe.
Cause: Stripe connection incomplete or disconnected.
Solution:
- Go to AffiliateBase Settings → General
- Check Stripe connection status
- Click Reconnect Stripe if needed
- Complete the authorization flow
- Webhook should be auto-created
Issue: Webhook Deliveries Failing (4xx/5xx)
Symptom: Webhook attempts show error codes.
Error codes:
| Code | Meaning | Solution |
|---|---|---|
| 400 | Bad request | Contact support - may be payload issue |
| 401 | Unauthorized | Reconnect Stripe to refresh auth |
| 404 | Not found | Endpoint URL changed - reconnect Stripe |
| 500 | Server error | Temporary issue - will retry automatically |
| 502/503 | Service unavailable | AffiliateBase may be down - check status |
General solution:
- Check AffiliateBase service status
- Try reconnecting Stripe
- Resend failed webhooks
- Contact support if persists
Issue: Webhooks Not Firing
Symptom: No webhook attempts in Stripe for purchases.
Causes:
- Wrong events configured
- Test mode vs live mode mismatch
- Webhook disabled
Solutions:
-
Check event types:
- Click webhook endpoint
- Verify
invoice.paidis included - Add missing events if needed
-
Check mode:
- Ensure webhook matches your mode (test/live)
- Test mode purchases → test webhook
- Live mode purchases → live webhook
-
Verify webhook is enabled:
- Endpoint should show “Enabled”
- Re-enable if disabled
Issue: Webhook Signature Verification Failed
Symptom: 401 errors mentioning signature.
Cause: Signing secret mismatch.
Solution:
- Reconnect Stripe in AffiliateBase
- This refreshes the signing secret
- Webhook signature should verify again
Issue: Events Received but Conversions Not Created
Symptom: Webhooks show 200 success but no conversions appear.
Causes:
client_reference_idmissing from checkout- Referral not found
- Attribution window expired
Solutions:
-
Check the webhook payload:
- Click on a delivered event
- Look at the payload
- Find
client_reference_idfield
-
If
client_reference_idis empty:- Review your checkout code
- Ensure referral passed to Stripe
-
If
client_reference_idexists:- Check if that referral exists in AffiliateBase
- Verify attribution window hasn’t expired
Webhook Endpoint Details
Expected Endpoint Format
https://api.affiliatebase.com/webhooks/stripe/{organization_id}
Required Events
AffiliateBase needs these events:
invoice.paid(required for conversions)invoice.payment_failed(optional)charge.refunded(for refund handling)checkout.session.completed(for session data)
Webhook Version
Uses latest Stripe API version for your account.
Testing Webhooks
Send Test Event
In Stripe Dashboard:
- Go to webhook endpoint
- Click Send test webhook
- Select event type (e.g.,
invoice.paid) - Click Send test event
- Check response
Test with Real Payment
- Use Stripe test mode
- Make a test purchase
- Verify webhook fires
- Check AffiliateBase for conversion
Webhook Logs
View detailed logs:
- Click on a webhook attempt
- See request/response details
- View full payload
- Check timing information
Resending Failed Webhooks
Individual Event
- Find the failed event
- Click Resend
- Monitor for success
Bulk Resend
For multiple failures:
- Use Stripe CLI:
stripe events resend - Or contact Stripe support for bulk replay
Webhook Security
Signature Verification
All webhooks are verified:
- Stripe signs each event
- AffiliateBase verifies signature
- Prevents forged events
Endpoint Security
- HTTPS only
- No authentication required (signature verifies)
- Rate limiting in place
Monitoring & Alerts
Stripe Alerts
Set up Stripe webhook alerts:
- Go to Developers → Webhooks
- Enable email notifications
- Get alerted on failures
Recommended Monitoring
- Check daily: Review webhook delivery status
- Alert on failures: Set up notifications
- Test regularly: Run test conversions weekly
Advanced Troubleshooting
Using Stripe CLI
Install Stripe CLI for local testing:
# Install
brew install stripe/stripe-cli/stripe
# Login
stripe login
# Forward webhooks to local
stripe listen --forward-to localhost:3000/webhook
# Trigger test events
stripe trigger invoice.paid
Viewing Raw Events
In Stripe Dashboard:
- Go to Developers → Events
- Find the event
- View full payload
- Check
data.objectfor details
Checking Event Processing
Look for in the event:
{
"data": {
"object": {
"client_reference_id": "your-referral-id",
"customer": "cus_xxxxx",
"amount_total": 9900
}
}
}
When to Contact Support
Contact AffiliateBase support if:
- Webhooks consistently failing with 500 errors
- Conversions not creating despite successful webhooks
- Need webhook endpoint changed
- Signature verification issues persist
Contact Stripe support if:
- Can’t access webhook settings
- Events not appearing at all
- Need historical event replay
- API/dashboard issues
Prevention
Best Practices
- Don’t modify webhook URL manually - use reconnect flow
- Monitor regularly - check webhook health weekly
- Keep Stripe connected - reconnect if token expires
- Test after changes - verify webhooks work
Maintenance
- Reconnect Stripe periodically if issues arise
- Update to latest Stripe API version when prompted
- Review webhook configuration after Stripe updates