---
title: Name Matching
description: Compare two names and return a match percentage to verify identity against document records.
---

This API is to compare two names and return the match percentage for that name as mentioned on the document and mentioned by an individual or any two documents. We must pass fname and sname along with api key and processor key in request. If the request has valid details, we will get a status, fail or success message and data: match – yes/no and match_percentage.

POST

```
https://kraken.airpay.co.in/airpay/ms/baas/api/name-match
```

## Header

| Parameter | Type Value | Description | Value Like |
| --- | --- | --- | --- |
| affiliate  required | Text | Will be provided by airpay | `91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps` |
| checksum  required | Text | $string = $param.self::$secret_key; sha256(<concate all values+SECRET KEY>); (required) | `91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps` |
| api-key  required | Text | Will be provided by airpay | `91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps` |
| processor-key  required | Text | Will be provided by airpay | `91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps` |

## Request Body

| Parameter | Type Value | Description | Value Like |
| --- | --- | --- | --- |
| fname  required | Text  <br>(100) | First Name | `jishnu` |
| sname  required | Text  <br>(100) | Second Name | `jishnu1` |

## Success 200

| Parameter | Type Value | Description | Value Like |
| --- | --- | --- | --- |
| status  required | Numeric | [400-fail,200- success](length 3) | `400,200` |
| message  required | text | [success, fail] | `success,fail` |
| data  required | text | { "match": "NO", "match_percentage": "92"} (Note:match percentage means the percentage of similarity between First Name and Second Name. If match percentage is 100% then match will be Yes) |

## Request Example

```
curl --location --request POST 'https://kraken.airpay.co.in/airpay/ms/baas/api/name-match' \
--header 'api-key: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'affiliate: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'checksum: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'processor-key: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'fname=jishnu' \
--data-urlencode 'sname=jishnu1'
```

### Success Response

```
{
   {
    "status": "200",
    "message": "success",
    "data": {"match": "No", "match_percentage":"92"}
    }
}
```

### Error Response

```
{
    "status": "400",
    "message": "Failed",
    "data": ""
}
```