---
title: Validate User
description: API to validate user(mobile_no) is already registered or is a new user.
---

API to validate user(mobile_no) is already registered or is a new user. Calling Generate OTP API for Customer Registration (YAP) to fetch otp if mobile not registered. If mobile no is already registered then we will return entity id to login into the system.

## POST

```
https://kraken.airpay.co.in/airpay/ms/cards/api/validate-user
```

## Header

| Field | Type | Description |
| --- | --- | --- |
| affiliate | text | Will be provided by Airpay (length 10, required) |
| checksum | text | $string = $param.self::$secret_key;sha256(<concate all values+SECRET KEY>);(dynamic, required) |
| processor-key | text | Will be provided by airpay(constant, required) |

## Parameter

| Field | Type | Description |
| --- | --- | --- |
| mobile_no | numeric | Mobile number of customer(length 10, required) |
## Request-Example:

```
curl --location --request POST 'https://kraken.airpay.co.in/airpay/ms/cards/api/validate-user' \
--header 'processor-key: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'affiliate: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'checksum: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'mobile_no=9XXXXX785'
```

## Success 200

| Field | Type | Description |
| --- | --- | --- |
| status | numeric | 400- fail,200-success(length 3, required) |
| message | text | Success, Fail(required) |
| data | json | {“entity_id”:111}(required) |
## Success-Response:

```
Already Registered
{
    "status": 200,
    "message": "Already registered customer",
    "data": {
        "entity_id": "91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps"
    }
}

New User
{
    "status": 200,
    "message": "success",
    "data": []
}
```
## Fail-Response:

```
{
    "status": 400,
    "message": "fail"
}
```