Instead of polling the Status API on a schedule, you can register a webhook endpoint with Varmo to receive delivery status-change events as they happen. When a card’s status transitions — for example, fromDocumentation Index
Fetch the complete documentation index at: https://docs.varmo.fi/llms.txt
Use this file to discover all available pages before exploring further.
in_transit to out_for_delivery — Varmo sends an HTTP POST request to your endpoint with the full updated payload. This removes polling overhead from your infrastructure and ensures your application always reacts to status changes in real time.
Configure your webhook endpoint
Register your webhook URL through the Varmo dashboard under Settings → Webhooks. Your endpoint must meet the following requirements before Varmo will deliver events to it:- Accept
POSTrequests with aContent-Type: application/jsonbody - Return
HTTP 200within 5 seconds of receiving the request - Validate the
X-Varmo-Signatureheader on every inbound request (see Validate webhook signatures)
webhook payload
data object matches the response shape of GET /v1/status/{id}, so you can use the same parsing logic for both polling and webhook-driven flows.
Validate webhook signatures
Every request Varmo sends to your endpoint includes anX-Varmo-Signature header containing an HMAC-SHA256 signature of the raw request body, signed with your webhook secret. Validate this signature before processing any payload to confirm the request originated from Varmo.
Retrieve your webhook secret from the Varmo dashboard under Settings → Webhooks. Then implement signature validation as follows:
Webhook event types
| Event | Description |
|---|---|
status.updated | Fired whenever the card’s delivery status transitions to a new value (for example, dispatched → in_transit). |
delivery.predicted | Fired when Varmo calculates a new or revised delivery window prediction for the dispatch. |
delivery.completed | Fired when the card’s status reaches delivered, indicating the card has arrived at its destination. |
delivery.exception | Fired when Varmo detects a delivery exception, such as a failed delivery attempt or a postal delay. |
Retry behavior
If your endpoint returns a non-2xx status code or does not respond within 5 seconds, Varmo marks the delivery attempt as failed and schedules a retry using exponential backoff. Varmo retries up to 5 times over a 24-hour window before marking the event as permanently undeliverable. Retry schedule after the initial failure:| Attempt | Delay after previous attempt |
|---|---|
| 1 | 1 minute |
| 2 | 5 minutes |
| 3 | 30 minutes |
| 4 | 2 hours |
| 5 | 8 hours |
data.id combined with event and timestamp as a deduplication key and check against a short-lived store (such as Redis) before updating your application state.