Simulations
Overview
Webhook simulation allows you to test your integration without triggering real business processes or affecting production data. Simulated events work exactly like production webhooks but are clearly marked so you can handle them differently.
- Safe Testing: Test without affecting real data
- Production-Like: Uses same infrastructure as real events
- Easy Debugging: Validate configuration before going live
Why Simulate Webhooks?
Validate Configuration
Ensure your webhook endpoint is configured correctly:
- URL is accessible
- Signature verification works
- Response time is acceptable
- Error handling is robust
Test Integration Logic
Verify your application handles events correctly:
- Events are parsed properly
- Business logic executes as expected
- Database updates work correctly
- No side effects in production systems
Debug Issues
Troubleshoot problems safely:
- Reproduce error conditions
- Test edge cases
- Verify fixes without risk
- Check logs and monitoring
Train Your Team
Help developers understand the integration:
- See real webhook payloads
- Learn event structures
- Practice responding to events
- Build confidence before production
How Simulation Works
When you simulate a webhook event:
- Deel sends a test payload to your configured endpoint
- The payload is marked with
"is_simulation": true - Same authentication and retry logic applies as production
- Event is logged in webhook delivery history
- Your endpoint receives a realistic test event
Simulated events use the same infrastructure as production webhooks, so they’re an accurate test of your integration’s reliability.
Simulating Events in Developer Center
Quick testing tip: Keep the Developer Center open while testing your local endpoint with ngrok. You can simulate events instantly and see results in real-time.
Simulated Event Payload
Simulated webhooks include the is_simulation flag in the payload:
Handling Simulated Events
You can detect and handle simulated events differently in your code:
Important: Always check the is_simulation flag to avoid processing test data as if it were real. This prevents duplicate records, incorrect metrics, and unintended side effects.
Best Practices
Test all subscribed events
Simulate each event type you’re subscribed to:
Check logs after each simulation
Always verify:
- Event was received
- Status code is correct
- Response time is acceptable
- No errors in your application logs
Test with production-like data
Use realistic test data that mirrors your production use cases:
- Actual country codes
- Valid email formats
- Realistic contract amounts
- Expected date formats
Simulate edge cases
Test unusual scenarios:
- Very long field values
- Special characters in names
- Multiple resources in array
- Missing optional fields
Use simulation flag properly
Don’t process simulated events as real data:
Troubleshooting Simulations
Simulation not arriving
Check:
- Is your endpoint accessible?
- Is the webhook enabled?
- Did you hit the rate limit (10/hour)?
- Is your server responding to requests?
Test connectivity:
Simulation failing but production works
Possible causes:
- Your code rejects simulated events
- Different validation for test data
- Sandbox vs production environment mismatch
Solution: Ensure simulated events can pass through your validation:
Want to simulate more than 10 times per hour
Options:
- Create additional webhook subscriptions for testing
- Use webhook logs to replay past events
- Retrieve sample payloads from API and test locally
- Use the event structure documentation to build test payloads
Local testing: