---
updatedAt: 2026-08-05T17:57:58.000Z
agentTools:
  siteIndex: https://help.socure.com/llms.txt
  projectIndex: https://help.socure.com/riskos/llms.txt
---

# Process KYC + Fraud + Watchlist > DocV Results in Hosted Flow

Handle Hosted Flow evaluation responses including webhook-based final decisions and routing logic for KYC onboarding outcomes.

## After the Hosted Flow

After you [create the evaluation and redirect the user to the Hosted Flow](https://help.socure.com/riskos/docs/kyc-watchlist-screening-hosted-flow-start-an-evaluation), the initial API response contains `decision: "REVIEW"` and `status: "ON_HOLD"`. This is not the final decision — it indicates the evaluation is paused while the user completes the hosted experience.

The final outcome is delivered asynchronously via the `evaluation_completed` webhook.

<br />

## Receive the final decision (webhook)

After the Hosted Flow completes, RiskOS™ sends an `evaluation_completed` [webhook](https://help.socure.com/riskos/docs/webhook-events) to your [configured webhook endpoint](https://help.socure.com/riskos/docs/webhooks).

The final outcome is in:

* `data.decision`

RiskOS™ responses include additional fields for enrichment results, workflow context, and observability. This workflow processes multiple enrichments, including [Digital Intelligence](https://help.socure.com/riskos/docs/digital-intelligence), [Socure Verify](https://help.socure.com/riskos/docs/verify-integration-guide), [Sigma Identity Fraud](https://help.socure.com/riskos/docs/sigma-identity-fraud-integration-guide), [Sigma Synthetic Fraud](https://help.socure.com/riskos/docs/sigma-synthetic-fraud-integration-guide), [Watchlist Screening](https://help.socure.com/riskos/docs/integrate-watchlist-screening), and [Document Verification (DocV)](https://help.socure.com/riskos/docs/docv-integration-guide). See each enrichment's integration guide for full response schema details.

### Example webhook

```json Example webhook payload (truncated)
{
  "event_type": "evaluation_completed",
  "event_id": "3b31289c-2d4a-4107-80bc-dda63031d5a0",
  "event_at": "2025-07-17T01:20:01Z",
  "data": {
    "eval_id": "11111111-2222-3333-4444-555555555555",
    "id": "client-transaction-12345",
    "workflow": "consumer_onboarding",
    "workflow_id": "5937a624-f298-452c-9169-ceeae9e66b74",
    "workflow_version": "1.0.0",
    "environment_name": "Sandbox",
    "eval_source": "API",
    "eval_start_time": "2025-07-17T01:18:27Z",
    "eval_end_time": "2025-07-17T01:20:01Z",
    "evaluation_status": "evaluation_completed",
    "decision": "ACCEPT",
    "decision_at": "2025-07-17T01:20:01Z",
    "status": "CLOSED",
    "sub_status": "Accept",
    "tags": [],
    "notes": "",
    "review_queues": [
      "Default Queue"
    ],
    "data_enrichments": [
      {
        "enrichment_name": "Socure Document Request - Default Flow",
        "enrichment_endpoint": "https://service.socure.com/api/5.0/documents/request",
        "enrichment_provider": "SocureDocRequest",
        "status_code": 200,
        "response": {
          "referenceId": "ed6a5077-b272-4a75-8c21-b284e10927cd",
          "status": "SESSION_COMPLETE",
          "data": {
            "docvTransactionToken": "7d6ad42b-f804-4255-b25e-268b8a77c86f",
            "url": "https://verify.socure.com/#/dv/7d6ad42b-f804-4255-b25e-268b8a77c86f"
          }
        }
      },
      {
        "enrichment_name": "Socure Document Verification",
        "enrichment_endpoint": "https://service.socure.com/api/5.0/documents/verify",
        "enrichment_provider": "Socure",
        "status_code": 200,
        "response": {
          "referenceId": "ed6a5077-b272-4a75-8c21-b284e10927c",
          "documentVerification": {
            "decision": {
              "name": "standard",
              "value": "accept"
            },
            "reasonCodes": [
              "I831",
              "I836"
            ],
            "documentType": {
              "type": "Drivers License",
              "country": "US",
              "state": "NY"
            },
            "documentData": {
              "firstName": "Test",
              "surName": "User",
              "fullName": "Test User",
              "dob": "1990-01-01",
              "documentNumber": "TST1234567",
              "expirationDate": "2030-01-01"
            }
          }
        }
      }
    ]
  }
}
```

<Accordion title="See the full response payload (all modules)" icon="fa-code">
  This is one complete, realistic `evaluation_completed` webhook for this solution — every module's `data_enrichments` entry (Digital Intelligence, Socure Verify, Sigma Identity Fraud, Sigma Synthetic Fraud, Global Watchlist, and Document Verification) in a single evaluation, so you don't have to piece it together from each product guide.

  All values are illustrative Sandbox data. The `decision` your workflow returns depends on your **configured thresholds** — a signal appearing in `data_enrichments` does not by itself determine `ACCEPT`, `REJECT`, or `REVIEW`. The `digitalIntelligence` block is trimmed to its core fields for readability; see [Digital Intelligence](https://help.socure.com/riskos/docs/digital-intelligence) for the exhaustive schema.

  ```json
  {
    "event_type": "evaluation_completed",
    "event_id": "3b31289c-2d4a-4107-80bc-dda63031d5a0",
    "event_at": "2026-02-17T14:26:23.104Z",
    "data": {
      "id": "client-transaction-12345",
      "eval_id": "8770e076-f568-48a9-8201-dca13087e592",
      "workflow": "consumer_onboarding",
      "workflow_id": "5937a624-f298-452c-9169-ceeae9e66b74",
      "workflow_version": "2.95.0",
      "environment_name": "Sandbox",
      "eval_source": "API",
      "evaluation_status": "evaluation_completed",
      "decision": "ACCEPT",
      "status": "CLOSED",
      "sub_status": "Accept",
      "tags": ["Document Verification Triggered", "DocV Accept"],
      "review_queues": [],
      "data_enrichments": [
        {
          "enrichment_name": "Socure Digital Intelligence",
          "enrichment_endpoint": "https://service.socure.com/api/3.0/EmailAuthScore",
          "enrichment_provider": "Socure",
          "status_code": 200,
          "response": {
            "referenceId": "8ceed175-37ae-4eb4-9ee5-b7fc5d7c1799",
            "digitalIntelligence": {
              "device": {
                "id": "234ac3ff-3ed1-42de-8f33-8f332febfa54",
                "computed": {
                  "statisticalId": "9349d69fef75cd356744293487462f8cd912",
                  "isVirtualMachine": false,
                  "sessionAgeMinutes": 2
                },
                "network": {
                  "connectionIp": "38.48.122.126",
                  "isTor": false,
                  "isProxy": false,
                  "isVpn": false,
                  "isRiskyNetwork": false,
                  "ispType": "home"
                },
                "attributes": {
                  "platform": "web",
                  "os": "macOS",
                  "deviceType": "desktop",
                  "isEmulator": false
                }
              }
            }
          }
        },
        {
          "enrichment_name": "Socure Verify",
          "enrichment_endpoint": "https://service.socure.com/api/3.0/EmailAuthScore",
          "enrichment_provider": "Socure",
          "status_code": 200,
          "response": {
            "referenceId": "b8fbeb31-a2fc-4f1e-a5d1-392c4ed06538",
            "kyc": {
              "socureId": "46fd3b11-a130-4915-8cc4-074bbd799669",
              "reasonCodes": ["I919"],
              "fieldValidations": {
                "firstName": 0.99,
                "surName": 0.99,
                "streetAddress": 0.99,
                "city": 0.99,
                "state": 0.99,
                "zip": 0.99,
                "dob": 0.99,
                "ssn": 0.99
              },
              "sourceAttribution": ["Credit", "Telco"],
              "transactionScope": "domestic"
            }
          }
        },
        {
          "enrichment_name": "Socure Sigma Identity Fraud",
          "enrichment_endpoint": "https://service.socure.com/api/3.0/EmailAuthScore",
          "enrichment_provider": "Socure",
          "status_code": 200,
          "response": {
            "referenceId": "d7e8f901-2345-6789-abcd-ef0123456789",
            "fraud": {
              "reasonCodes": ["I301"],
              "scores": [
                { "name": "Sigma Identity Fraud (US)", "version": "5.0", "score": 0.041 }
              ]
            }
          }
        },
        {
          "enrichment_name": "Socure Sigma Synthetic",
          "enrichment_endpoint": "https://service.socure.com/api/3.0/EmailAuthScore",
          "enrichment_provider": "Socure",
          "status_code": 200,
          "response": {
            "referenceId": "f9012345-6789-abcd-ef01-234567890abc",
            "synthetic": {
              "reasonCodes": ["I912"],
              "scores": [
                { "name": "synthetic", "version": "4.0", "score": 0.038 }
              ]
            }
          }
        },
        {
          "enrichment_name": "Socure Global Watchlist Premier",
          "enrichment_endpoint": "https://service.socure.com/api/3.0/EmailAuthScore",
          "enrichment_provider": "Socure",
          "status_code": 200,
          "response": {
            "customerProfile": {
              "userId": "client-transaction-12345"
            },
            "globalWatchlist": {
              "matches": {}
            }
          }
        },
        {
          "enrichment_name": "Socure Document Request - Default Flow",
          "enrichment_endpoint": "https://service.socure.com/api/5.0/documents/request",
          "enrichment_provider": "SocureDocRequest",
          "status_code": 200,
          "response": {
            "referenceId": "ed6a5077-b272-4a75-8c21-b284e10927cd",
            "status": "SESSION_COMPLETE",
            "data": {
              "docvTransactionToken": "7d6ad42b-f804-4255-b25e-268b8a77c86f",
              "url": "https://verify.socure.com/#/dv/7d6ad42b-f804-4255-b25e-268b8a77c86f"
            }
          }
        },
        {
          "enrichment_name": "Socure Document Verification",
          "enrichment_endpoint": "https://service.socure.com/api/5.0/documents/verify",
          "enrichment_provider": "Socure",
          "status_code": 200,
          "response": {
            "referenceId": "ed6a5077-b272-4a75-8c21-b284e10927cd",
            "documentVerification": {
              "reasonCodes": ["I831", "I836"],
              "documentType": {
                "type": "Drivers License",
                "country": "US",
                "state": "NY"
              },
              "decision": {
                "name": "standard",
                "value": "accept"
              },
              "documentData": {
                "firstName": "Stanley",
                "surName": "Brown",
                "fullName": "Stanley Brown",
                "dob": "1944-03-30",
                "documentNumber": "00000000",
                "expirationDate": "2029-05-07"
              }
            }
          }
        }
      ]
    }
  }
  ```

  `globalWatchlist.matches` is an empty object when the applicant has no hits on any sanctions, PEP, or adverse media list. For the full Document Verification object — including all `reasonCodes`, supported document types, and parsed `documentData` fields — see the [DocV Webhook Payload Reference](https://help.socure.com/riskos/docs/docv-webhook-payload-reference).
</Accordion>

<br />

## Route the user based on the final decision

Because the evaluation completes asynchronously, your frontend should wait for your backend to persist the final decision before routing the user.

Expose the persisted `decision` from your backend to the frontend (for example, via a status endpoint), then handle routing as follows:

* `ACCEPT` → Continue onboarding
* `REJECT` → Route to fallback or denial flow
* `REVIEW` → Route to manual review (if applicable)

One common approach is polling your backend until the stored `decision` is available.

```ts
if (data.decision === "ACCEPT") {
  router.push("/success");
}

if (data.decision === "REJECT") {
  router.push("/review");
}
```

<Callout icon="📘" theme="info">
  **Note**:

  Do **not** use `status` or `eval_status` for business decisions.
</Callout>

<br />

## Error handling

If the API returns an HTTP error (4xx or 5xx), your application should handle it before processing any evaluation logic.

| Status code | Meaning                                   | What to do                                               |
| ----------- | ----------------------------------------- | -------------------------------------------------------- |
| `400`       | Bad request — missing or invalid fields   | Check request body against required fields.              |
| `401`       | Unauthorized — invalid or missing API key | Verify your `Authorization` header.                      |
| `404`       | Not found — invalid `eval_id` or endpoint | Confirm the `eval_id` and endpoint URL.                  |
| `429`       | Rate limited                              | Back off and retry after the `Retry-After` header value. |
| `500`       | Internal server error                     | Retry with exponential backoff (max three attempts).     |

For the full error schema and all error codes, see the [Errors Reference](https://help.socure.com/riskos/reference/errors).

<br />

## Data handling

### What to persist

Store these fields for tracking:

| Field         | Description                       |
| ------------- | --------------------------------- |
| `id`          | Unique identifier for the request |
| `eval_id`     | Evaluation identifier             |
| `decision`    | Final decision outcome            |
| `status`      | Overall request status            |
| `eval_status` | Evaluation processing status      |
| `workflow`    | Workflow name (optional)          |

<br />

## Implementation flow

```
Start evaluation
    |
    v
Store `eval_id`
    |
    v
Redirect user to the Hosted Flow
    |
    v
Wait for webhook
    |
    v
Persist final `decision`
    |
    v
Route user based on outcome
```

<br />

## Summary

* The API response starts the session.
* The user completes verification in the Hosted Flow.
* The webhook delivers the final decision.
* Your application should act only on the webhook result.

# Sibling pages

* [Start KYC + Fraud + Watchlist in Hosted Flow](https://help.socure.com/riskos/docs/kyc-watchlist-screening-hosted-flow-start-an-evaluation.md)