Surepass
Webhooks

Signer events

Suresign sends this request when a signer completes signing or fails. Verify Suresign-Signature against the raw request body before you parse the JSON.

Return any 2xx status to accept the delivery. Suresign can send the same delivery more than once. Use Suresign-Webhook-Id or client_id as the idempotency key.

Header Parameters

Suresign-Webhook-Id*string

Stable delivery ID. Use this value as an idempotency key.

Suresign-Signature*string

t is the Unix timestamp. v1 is a 64-character lowercase hexadecimal HMAC-SHA256 signature. Verify v1 against {timestamp}.{raw_request_body}.

User-Agent*string

Suresign webhook user agent.

Request Body

application/json
  1. body

Webhook payload for a signer event.

attempt*integer

Delivery attempt number. The first attempt is 1.

Range1 <= value
client_id*string

Stable delivery ID. The ID starts with webhook_.

esign_client_id*string

Related Esign session ID. The ID starts with esign_.

event_type*string

Signer event type.

Value in"signer_completed""signer_failed"
org_id*string

Organization that owns the Esign session.

signer_id*string

Related signer ID.

data*

Esign session and its current state.

Response Body

The endpoint accepted the event.

Example Requests
POST/signer-event
Request Body
application/json
{
  "attempt": 1,
  "client_id": "string",
  "esign_client_id": "string",
  "org_id": "string",
  "event_type": "signer_completed",
  "signer_id": "string",
  "data": {
    "actor_id": "string",
    "actor_type": "user",
    "allow_download": true,
    "archived": true,
    "auth_mode": 1,
    "backend": "nsdl",
    "client_id": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "current_pdf_file_id": "string",
    "email_template_overrides": {},
    "expiry_seconds": 0,
    "file_id": "string",
    "filename": "string",
    "folder": "string",
    "redirect_url": "http://example.com",
    "sender": "string",
    "sign_type": "aadhaar",
    "signers": [
      {
        "signer_id": "string",
        "eligible": true,
        "invite_url": "http://example.com",
        "token": "string",
        "sign_type": "aadhaar",
        "auth_mode": 1,
        "max_retry": 1,
        "pfx_id": "string",
        "full_name": "string",
        "email": "user@example.com",
        "country_code": "string",
        "mobile": "string",
        "verify_email": true,
        "verify_mobile": true,
        "reason": "string",
        "accept_virtual_sign": true,
        "status": "pending",
        "elements": [
          {
            "field_id": "string",
            "x": 0,
            "y": 0,
            "page": 0,
            "type": "signature",
            "alignment": "left",
            "label": "string",
            "width": 0,
            "height": 0,
            "allow_wet_signature": true,
            "font_size": 0,
            "format": "string",
            "value": "string"
          }
        ],
        "aadhaar_cert_details": {
          "name": "string",
          "country": "string",
          "state": "string",
          "pin_code": "string",
          "aadhaar": "string",
          "year_of_birth": "string",
          "gender": "string"
        },
        "verify_location": true,
        "location_source": "device",
        "enforce_geofence": true,
        "latitude": 0,
        "longitude": 0,
        "radius": 0,
        "name_match": {
          "enforce": true,
          "prefill_name": "string",
          "signer_name": "string",
          "score": 0,
          "status": "pending"
        },
        "face_match": {
          "enforce": true,
          "ref_file_id": "string",
          "live_file_id": "string",
          "match_threshold": 0,
          "max_attempts": 0,
          "liveness_score": 0,
          "match_score": 0
        },
        "notification": {
          "invite": true,
          "completion": true,
          "whatsapp": true
        }
      }
    ],
    "status": "pending"
  }
}
Header Parameters
{
  "Suresign-Webhook-Id": "webhook_Wf3kQ8mN2rT6yP9x",
  "Suresign-Signature": "t=1722776400,v1=6d4697e95f4ad3c93a3e8c01fca98c9cc5e45775984c85279601262bfa5c8f89",
  "User-Agent": "Suresign/1.0"
}