> ## Documentation Index
> Fetch the complete documentation index at: https://docs.authsignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Palm Biometrics & Verification Webhooks

> An overview on the webhook requests and response schemas

Every palm biometric enrollment and re-authentication/verification flow delegates decisions to the configured webhook API end-point, this is where custom business logic and messages can be handled and returned as a response.

<Tip>
  Standard Authsignal webhook verification should be considered. For more info, take a look at our
  [webhook docs](/advanced-usage/webhooks/verify-requests)
</Tip>

### Webhooks request event schema

<ParamField path="userId" type="string">
  The userId of the user performing the action
</ParamField>

<ParamField path="action" type="string">
  The action code being performed
</ParamField>

<ParamField path="idempotencyKey" type="string">
  A unique key representing the action
</ParamField>

<ParamField path="authorizedAt" type="string">
  The time at which the user were authorized at in ISO 8601 format.
</ParamField>

<ParamField path="state" type="string">
  The outcome of the verification
</ParamField>

<ParamField path="verificationMethod" type="string">
  The method of verification
</ParamField>

<ParamField path="custom" type="object">
  Always has a mode attribute which determines the mode of the terminal. Values can be  ENROLLMENT | ACCESS | PAYMENT

  <Expandable title="attributes">
    Additional data points, differs per scenario.

    Enrollment mode:

    ```json theme={null}
    {
      "mode": "ENROLLMENT"
    }
    ```

    Access mode:

    ```json theme={null}
    {
      "mode": "ACCESS"
    }
    ```

    Payment mode:

    ```json theme={null}
    {
      "mode": "PAYMENT",
      "amount": "1.20",
      "currency": "NZD"
    }
    ```
  </Expandable>
</ParamField>

<RequestExample>
  ```json type: action.verified theme={null}
  {
        "version": 1,
        "data": {
          "userId": "123",
          "action": "terminal-action",
          "idempotencyKey": "d5062447-a2b7-4783-9f94-ddd62ca75ea1",
          "authorizedAt": "2024-06-24T21:11:32.339Z",
          "state": "CHALLENGE_SUCCEEDED",
          "verificationMethod": "PALM_BIOMETRICS_RR",
          "custom" : {
            "mode": "ENROLLMENT",
            ....
          },
        },
        "type: "action.verified"
    }
  ```
</RequestExample>

<Tip>
  Note that a single terminal can perform registrations, access, and payment flows which will all
  occur through the same action and therefore the same webhook.
</Tip>

### Webhooks response schema

<ResponseExample>
  ```json type: Webhook response theme={null}
  {
  	"isVerified": true,
  	"message": "A custom success message",
  	"error": "A custom error message"
  }
  ```
</ResponseExample>

<ParamField path="isVerified" type="boolean" required="true">
  Specifies if the webhook successfully verifies the user action after applying custom logic.
</ParamField>

<ParamField path="message" type="string">
  A message that is displayed on the terminal after successful verification.
</ParamField>

<ParamField path="error" type="string">
  A message that is displayed on the terminal after unsuccessful verification.
</ParamField>
