Return Quickly
Your webhook endpoint should return a200 response as quickly as possible. If you need to do heavy processing, acknowledge the webhook first and process asynchronously:
Handle Duplicates
While rare, webhooks can be delivered more than once. Use the eventid to deduplicate:
Use HTTPS
Always use HTTPS endpoints for webhooks. Nayax Energy Core will not deliver webhooks to HTTP endpoints in production environments.Monitor Deliveries
Regularly check your webhook deliveries via the API to catch any failures:Rotate Secrets
If you suspect your webhook secret has been compromised:- Create a new webhook endpoint with the same URL and events
- Update your endpoint to accept signatures from both secrets temporarily
- Delete the old webhook endpoint
- Update your endpoint to only accept the new secret
Troubleshooting
Webhook Not Received
- Verify your endpoint is accessible from the internet
- Check that your endpoint returns a
2xxstatus code - Review the delivery attempts via the API for error details
- Ensure your endpoint responds within 30 seconds
Invalid Signature
- Make sure you’re using the raw request body (not parsed JSON)
- Verify you’re using the correct webhook secret
- Check that the timestamp hasn’t expired (default tolerance: 5 minutes)
- Ensure you’re comparing the full signature, not truncated