Visa APIv1

Webhooks

Events, signatures, retries and duplicates.

We can notify an HTTPS endpoint of yours when something happens on one of your orders, so you do not have to poll.

Registering an endpoint. Ask your contact to register it: give us the URL (it must be https and reachable from the internet) and the events you want. We send you the endpoint's signing secret (whsec_...); keep it on your server only. You can have up to 5 endpoints, and we can send a ping test event at any time.

Events

EventSent when
order.status_changedThe order's status changes: submitted, action_required (also when a new request replaces an open one), in_review, filed, approved, refused, cancelled or expired.
order.result_availableA result file, such as the e-visa, is ready to download.
order.message_createdPlusvisa wrote in the order's message thread. Your own messages are not sent back.
pingA test event, sent on request.

Every event is a POST with a JSON body of the same shape. data always names the order by reference and client_reference, and its action_required, result and message objects are exactly what the API returns for the order, its results and its messages. The payload schemas are under Webhook events in the API reference.

{
  "id": "evt_4ae4445a52744753a0720cf323302403",
  "type": "order.status_changed",
  "created_at": "2026-11-04T10:31:58.210803Z",
  "data": {
    "reference": "PV-4Z8M2X64",
    "client_reference": "booking-48213",
    "status": "action_required",
    "previous_status": "submitted",
    "action_required": {
      "message": "Please retake the photo and check the surname.",
      "items": [
        {"kind": "document", "key": "passport", "reason": "blurry", "note": "Face is cut off"},
        {"kind": "answer", "key": "surname", "reason": "incorrect_answer", "note": null}
      ],
      "requested_at": "2026-11-04T10:31:58.203903Z"
    },
    "refusal_reason": null
  }
}

Headers. Content-Type: application/json, PV-Event-Id (the event id), PV-Event-Type and PV-Signature: t=<unix seconds>,v1=<hex>.

Verify every request

Before you trust a request:

  1. Read the raw request body, before any JSON parsing.
  2. Split PV-Signature on , into t and v1.
  3. Refuse the request if t is more than 300 seconds from your clock.
  4. Compute HMAC-SHA256 with your secret as the key over t, a ., and the raw body, as lowercase hex.
  5. Compare it with v1 in constant time.
import hashlib, hmac, time

def verify(secret: str, header: str, body: bytes, tolerance: int = 300) -> bool:
    try:
        pairs = (item.strip().split("=", 1) for item in header.split(",") if "=" in item)
        parts = {key: value for key, value in pairs}
        timestamp, signature = parts.get("t", ""), parts.get("v1", "")
        if not timestamp.isdigit() or abs(time.time() - int(timestamp)) > tolerance:
            return False
        signed = f"{timestamp}.".encode() + body
        expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
        return hmac.compare_digest(expected.encode(), signature.encode())
    except (TypeError, ValueError, UnicodeError):
        return False

If we rotate your secret, the old one stops working at once.

Answer quickly

Reply with any 2xx within 10 seconds, then do the work in the background. We do not follow redirects: a 3xx counts as a failure, like any other status, a timeout or a connection error.

Retries

A failed delivery is retried after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours, then every 12 hours, for up to 72 hours after the event. After that we stop trying.

Duplicates and order

You may receive an event more than once: every retry carries the same id (evt_...), so skip ids you have already processed. Events can arrive out of order. Use created_at, and fetch the order when you need its current state.