---
title: "Verify Identity"
source_url: https://docs.rapyd.net/en/verify-identity.html
lang: en
---

# Verify Identity

Verify the identity of an individual or a personal contact for a `person` wallet.

The response to this request returns only the Rapyd ID and merchant reference ID that correspond to the identity verification request. The actual results of the identity check appear in a webhook. See:

- [Identity Verification Webhook - Sandbox Approved](https://docs.rapyd.net/en/identity-verification-webhook---sandbox-approved.md "Identity Verification Webhook - Sandbox Approved")
- [Identity Verification Webhook - Production Approved](https://docs.rapyd.net/en/identity-verification-webhook---production-approved.md "Identity Verification Webhook - Production Approved")
- [Identity Verification Webhook - Production Not Approved](https://docs.rapyd.net/en/identity-verification-webhook---production-not-approved.md "Identity Verification Webhook - Production Not Approved")

> **Note:**
>
> - The code samples include successful requests (200) and bad requests (400).
>
>   - For error messages that appear due to bad requests (400), see:
>
>     - [General Errors](https://docs.rapyd.net/en/general-errors.md "General Errors")
>     - [Hosted Page Identity Verification Errors](https://docs.rapyd.net/en/hosted-page-identity-verification-errors.md "Hosted Page Identity Verification Errors")
>     - [Identity Verification Errors](https://docs.rapyd.net/en/identity-verification-errors.md "Identity Verification Errors")
>   - For information about unauthorized request (401) and other authentication errors, see [Troubleshooting Authentication and Authorization Errors](https://docs.rapyd.net/en/troubleshooting-authentication-and-authorization-errors.md "Troubleshooting Authentication and Authorization Errors").

### Parameters

### Request Header Parameters

- - access_key
  - Unique access key provided by Rapyd for each authorized user.

    See [Developers](https://docs.rapyd.net/en/developers.md "Developers").
- - Content-Type
  - Indicates that the data appears in JSON format. Set to **application/json**.
- - idempotency
  - A unique key that prevents the platform from creating the same object twice.

    See [Idempotency](https://docs.rapyd.net/en/idempotency.md "Idempotency").
- - salt
  - Random string. Recommended length: 8-16 characters.
- - signature
  - Signature calculated for each request individually.

    See [Request Signatures](https://docs.rapyd.net/en/request-signatures.md "Request Signatures").
- - timestamp
  - Timestamp for the request, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time") (seconds).

### Request Body Parameters

- - back_side_image
  - Base-64-encoded image of the back of the ID document. Maximum size: 8,000 pixels height or width, 5 MB.
- - back_side_image_mime_type
  - MIME type of the front side image of the identification document. One of the following:

    - **image/jpeg** - JPEG image.
    - **image/png** - PNG image.

    image/jpeg
- - contact
  - ID of the wallet contact. String starting with **cont_**.
- - country
  - The two-letter ISO 3166-1 ALPHA-2 code for the country of the identification document. Must match the wallet contact country.
- - document_type
  - Type of identification document. Two-letter code.

    For types that are valid in the country, use [List Official Identification Documents](https://docs.rapyd.net/en/list-official-identification-documents.md "List Official Identification Documents").
- - ewallet
  - ID of the Rapyd Wallet. String starting with **ewallet_**.
- - face_image
  - Base-64-encoded image of the face. Maximum size: 8,000 pixels height or width, 5 MB.
- - face_image_mime_type
  - MIME type of the face image. One of the following:

    - **image/jpeg** - JPEG image.
    - **image/png** - PNG image.

    image/jpeg
- - front_side_image
  - Base-64-encoded image of the front of the identification document. Maximum size: 8,000 pixels height or width, 5 MB.
- - front_side_image_mime_type
  - MIME type of the front side image of the identification document. One of the following:

    - **image/jpeg** - JPEG image.
    - **image/png** - PNG image.

    image/jpeg
- - reference_id
  - ID of the identity verification request. Defined by the client. Must be unique for each request. Maximum length: 36 characters.

    In the sandbox, to simulate success or failure, the string must contain one of the following values:

    - **success** - `verification_status` = **APPROVED** in the webhook.
    - **failure** - `verification_status` = **NOT_APPROVED** in the webhook.

    For example: **12345678success**
- - request_type
  - Determines the action that is taken on the request. One of the following:

    - **store** - Store the images on the Rapyd platform.
    - **verify** - Verify the identity of the person in the images.
- - send_callback
  - Determines whether a webhook is sent with the results of the verification request.

    true

### Response Parameters

- - id
  - ID of the identity verification operation. String starting with **kycid_**.
- - reference_id
  - ID of the identity verification request. Defined by the client.

### Related Information

- - .NET

    - ```csharp
      using System;
      using System.Text.Json;

      namespace RapydApiRequestSample
      {
          class Program
          {
              static void Main(string[] args)
              {
                  try
                  {
                      var requestObj = new
                      {
                          back_side_image = "",
                          back_side_image_mime_type = "",
                          country = "US",
                          document_type = "PA",
                          ewallet = "ewallet_b26a0b128d9f3e3a53a142b7d411c9d5",
                          face_image = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBk=",
                          face_image_mime_type = "image/jpeg",
                          front_side_image = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGk=",
                          front_side_image_mime_type = "image/jpeg",
                          reference_id = "123success",
                          request_type = "store",
                          send_callback = (string) null,
                      };

                      string request = JsonSerializer.Serialize(requestObj);

                      string result = RapydApiRequestSample.Utilities.MakeRequest("POST", "/v1/identities", request);

                      Console.WriteLine(result);
                  }
                  catch (Exception e)
                  {
                      Console.WriteLine("Error completing request: " + e.Message);
                  }
              }
          }
      }
      ```
- - JavaScript

    - ```javascript
      const makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest;

      async function main() {
        try {
          const body = {
            back_side_image: '',
            back_side_image_mime_type: '',
            country: 'US',
            document_type: 'PA',
            ewallet: 'ewallet_b26a0b128d9f3e3a53a142b7d411c9d5',
            face_image: '/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBk=',
            face_image_mime_type: 'image/jpeg',
            front_side_image: '/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGk=',
            front_side_image_mime_type: 'image/jpeg',
            reference_id: '123success',
            request_type: 'store',
            send_callback: null
          };
          const result = await makeRequest('POST', '/v1/identities', body);

          console.log(result);
        } catch (error) {
          console.error('Error completing request', error);
        }
      }
      ```
- - PHP

    - ```php

      <?php
      $path = $_SERVER['DOCUMENT_ROOT'];
      $path .= "/<path-to-your-utility-file>/utilities.php";
      include($path);
      end_callback": null

      $body = [
          'back_side_image' => '',
          'back_side_image_mime_type' => '',
          'country' => 'US',
          'document_type' => 'PA',
          'ewallet' => 'ewallet_b26a0b128d9f3e3a53a142b7d411c9d5',
          'face_image' => '/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBk=',
          'face_image_mime_type' => 'image/jpeg',
          'front_side_image' => '/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGk=',
          'front_side_image_mime_type' => 'image/jpeg',
          'reference_id' => '123success',
          'request_type' => 'store',
          'send_callback' => null
      ];

      try {
          $object = make_request('post', '/v1/identities', $body);
          var_dump($object);
      } catch(Exception $e) {
          echo "Error: $e";
      }
      ?>
      ```
- - Python

    - ```python
      from pprint import pprint

      from utilities import make_request

      idv_details = {
          "back_side_image": "",
          "back_side_image_mime_type": "",
          "country": "US",
          "document_type": "PA",
          "ewallet": 'ewallet_b26a0b128d9f3e3a53a142b7d411c9d5',
          "face_image": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBk=",
          "face_image_mime_type": "image/jpeg",
          "front_side_image": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGk=",
          "front_side_image_mime_type": "image/jpeg",
          "reference_id": "123success",
          "request_type": "store",
          "send_callback": None
      }

      results = make_request(method='post', path=f'/v1/identities', body=idv_details)
      pprint(results)
      ```

- /v1/identities

- Verify Identity
- ```curl
  curl -X post 'https://sandboxapi.rapyd.net/v1/identities' \
  -H 'access_key: your-access-key-here' \
  -H 'Content-Type: application/json' \
  -H 'idempotency: your-idempotency-parameter-here' \
  -H 'salt: your-random-string-here' \
  -H 'signature: your-calculated-signature-here' \
  -H 'timestamp: your-unix-timestamp-here' \
  --data-raw '{
      "country": "US",
      "document_type": "PA",
      "ewallet": "ewallet_31fb2dbbaf6519461ee4fbe1062220d3",
      "face_image": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBk=",
      "face_image_mime_type": "image/jpeg",
      "front_side_image": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGk=",
      "front_side_image_mime_type": "image/jpeg",
      "reference_id": "2025-11-03r"
  }'
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "cc094749-9915-4fed-b45b-adfab96c84d5"
      },
      "data": {
          "id": "kycid_21dea81afe82fd0fea0e81f396fae865",
          "reference_id": "2025-11-03r"
      }
  }
  ```

- Verify Identity with Contact
- ```curl
  curl -X post 'https://sandboxapi.rapyd.net/v1/identities' \
  -H 'access_key: your-access-key-here' \
  -H 'Content-Type: application/json' \
  -H 'idempotency: your-idempotency-parameter-here' \
  -H 'salt: your-random-string-here' \
  -H 'signature: your-calculated-signature-here' \
  -H 'timestamp: your-unix-timestamp-here' \
  --data-raw '{
      "ewallet": "ewallet_b5320c566cc4aa01fe77440ad08693f7",
      "contact": "cont_18c0d881a3d0d2e9e54d4664c6b0022d",
      "country": "US",
      "document_type": "PA",
      "front_side_image": "/9j/4AAQSkZJRgABAQAAAQABAAD/2w=",
      "front_side_image_mime_type": "image/jpeg",
      "face_image": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkG=",
      "face_image_mime_type": "image/jpeg",
      "reference_id": "2026-01-08d"
  }'
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "435980af-fc6a-475e-a1d2-cb5767e8153c"
      },
      "data": {
          "id": "kycid_f32fce17bed20a2c3089c568b45d5c53",
          "reference_id": "2026-01-08d"
      }
  }
  ```

- Bad Request - Non-Unique Reference ID
- ```curl
  curl -X post 'https://sandboxapi.rapyd.net/v1/identities' \
  -H 'access_key: your-access-key-here' \
  -H 'Content-Type: application/json' \
  -H 'idempotency: your-idempotency-parameter-here' \
  -H 'salt: your-random-string-here' \
  -H 'signature: your-calculated-signature-here' \
  -H 'timestamp: your-unix-timestamp-here' \
  --data-raw '{
      "ewallet": "ewallet_b5320c566cc4aa01fe77440ad08693f7",
      "contact": "cont_18c0d881a3d0d2e9e54d4664c6b0022d",
      "country": "US",
      "document_type": "PA",
      "front_side_image": "/9j/4AAQSkZJRgABAQAAAQABAAD/2w=",
      "front_side_image_mime_type": "image/jpeg",
      "face_image": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkG=",
      "face_image_mime_type": "image/jpeg",
      "reference_id": "2026-01-08d"
  }'
  ```
- ```json
  {
      "status": {
          "error_code": "ERROR_ID_VERIFICATION_DUPLICATE_REFERENCE_ID",
          "status": "ERROR",
          "message": "Please contact Rapyd Client Support.",
          "response_code": "ERROR_ID_VERIFICATION_DUPLICATE_REFERENCE_ID",
          "operation_id": "2002e5df-215a-4f67-8c33-bbb8b03a738e"
      }
  }
  ```

- Bad Request - Unknown Document Type
- ```curl
  curl -X post 'https://sandboxapi.rapyd.net/v1/identities' \
  -H 'access_key: your-access-key-here' \
  -H 'Content-Type: application/json' \
  -H 'idempotency: your-idempotency-parameter-here' \
  -H 'salt: your-random-string-here' \
  -H 'signature: your-calculated-signature-here' \
  -H 'timestamp: your-unix-timestamp-here' \
  --data-raw '{
      "ewallet": "ewallet_b5320c566cc4aa01fe77440ad08693f7",
      "contact": "cont_18c0d881a3d0d2e9e54d4664c6b0022d",
      "country": "US",
      "document_type": "passport",
      "front_side_image": "/9j/4AAQSkZJRgABAQAAAQABAAD/2w=",
      "front_side_image_mime_type": "image/jpeg",
      "face_image": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkG=",
      "face_image_mime_type": "image/jpeg",
      "reference_id": "2026-01-08d"
  }'
  ```
- ```json
  {
      "status": {
          "error_code": "ERROR_GET_ID_TYPE",
          "status": "ERROR",
          "message": "Please contact Rapyd Client Support.",
          "response_code": "ERROR_GET_ID_TYPE",
          "operation_id": "800960b1-33c9-4b9f-b640-7bdea8676c98"
      }
  }
  ```
