Event types
Subscribe to any of the following verification events:| Event | Description |
|---|---|
verification.pending | A verification has been created and is in progress. |
verification.verified | The verification completed successfully. |
verification.rejected | The contact person rejected the verification. |
verification.failed | ezyshield was unable to verify the details provided. |
verification.cancelled | The verification was cancelled by a newer verification. |
verification.expired | The verification expired before completion. |
verification.error | The verification encountered an unexpected error. |
verification.confirmation_notification_sent | The SMS notification was sent to the contact person. |
Webhook Subscription object
A webhook subscription defines which events to receive and where to send them.| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the subscription. |
url | string | The HTTPS endpoint where events are delivered. |
events | array | List of event types to subscribe to. |
created_at | timestamp | When the subscription was created. |
Example
Webhook Event object
When an event occurs, ezyshield sends an HTTP POST request to your endpoint with the following payload:| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the event. |
type | string | The event type (e.g., verification.verified). |
created_at | timestamp | When the event occurred. |
data | object | The Verification object associated with the event. |
Example
Verifying signatures
Every webhook request includes aSignature header containing an HMAC-SHA256 signature of the request body. Verify this signature to ensure the request originated from ezyshield.
Retry behavior
ezyshield expects a2xx response within 3 seconds. If your endpoint fails to respond or returns a non-2xx status, ezyshield retries with exponential backoff:
| Attempt | Delay |
|---|---|
| 1 | Immediate |
| 2 | 10 seconds |
| 3 | 100 seconds |
Best practices
Respond quickly
Respond quickly
Return a
2xx response as soon as you receive the webhook. Process the event asynchronously to avoid timeouts.Handle retries gracefully
Handle retries gracefully
ezyshield delivers each event exactly once on success. However, if your endpoint fails and ezyshield retries, the retry will have the same event
id. Use this ID to ensure idempotent processing and avoid duplicate side effects.Use HTTPS (required)
Use HTTPS (required)
ezyshield only delivers webhooks to HTTPS endpoints. HTTP URLs are rejected when creating a subscription.
Verify signatures
Verify signatures
Always verify the
Signature header before processing events to ensure requests originate from ezyshield.