Testing Webhooks
Validate your webhook setup and ensure your system correctly receives and processes events.
Overview
Begini provides a test API that fires a real webhook to your configured endpoint on demand. Use this to confirm your receiver is reachable, correctly handling the payload, and returning the right response — before running a full assessment.
Test endpoint
POST https://api.begini.co/v1/webhooks-management/test
Headers:
| Header | Value |
|---|---|
api-key |
Your API key from the Deployment Centre |
No request body is required. Begini will send a test webhook to the endpoint configured for that API key's deployment.
Response codes
| Status | Response body | Meaning |
|---|---|---|
200 |
{"webhook_receiver_status_code": 200, "detail": "..."} |
Webhook successfully delivered to your endpoint |
400 |
{"detail": "No Api-key supplied"} |
API key missing from the request header |
403 |
{"detail": "Invalid Api-key"} |
API key not valid or not registered |
422 |
{"detail": {"webhook_receiver_status_code": 403, "webhook_receiver_body_content": "..."}} |
Begini reached your endpoint but it returned an error — check your receiver logs |
424 |
{"detail": "Webhooks not set for <id>, please set in Begini Dashboard"} |
No webhook endpoint configured for this deployment |
503 |
{"detail": "Cannot connect to host example.com"} |
Begini could not reach your endpoint — check it is publicly accessible |
What to test
Work through these in order before going live:
- Endpoint is reachable — status 200 from the test API confirms delivery
- HMAC verification passes — confirm your signature check accepts the test request
- Payload parses correctly — log the incoming payload and inspect the structure
-
Event type routing works — confirm your code reads
event.typecorrectly - HTTP 200 returned on success — verify your receiver returns 200, not 201 or no content
- Duplicate handling — call the test endpoint twice and confirm your system handles it safely
- Failure scenarios — temporarily return a non-200 from your endpoint and confirm Begini treats it as failed
Testing HMAC verification
Send the test webhook and verify your signature check passes. Then test failure handling:
- Modify the raw body after receiving it and re-hash — verification should fail
- Use the wrong API key for hashing — verification should fail
- Confirm your endpoint returns HTTP 403 and does not process the payload in both cases
Before going live
- Replace any logging or test endpoints with your production receiver URL
- Update the webhook endpoint in the Production tab of the Deployment Centre
- Confirm HTTPS is enforced on your production endpoint
- Run the test API against your production configuration once before launch
Next steps
- Webhook Troubleshooting — diagnose delivery and processing issues
- Securing Webhooks (HMAC) — implement signature verification
Was this article helpful?
Give feedback