---
title: Name Matching
description: 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.
---

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

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

## Parameter

| Field | Type | Description |
| --- | --- | --- |
| fname | Text | First Name (length 100, required) |
| sname | Text | Second Name (length 100, required) |
## 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 200

| Field | Type | Description |
| --- | --- | --- |
| status | Numeric | [400-fail,200- success](length 3) |
| message | text | [success, fail] |
| data | 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) |
## Success-Response :

```
{
   {
    "status": "200",
    "message": "success",
    "data": {"match": "No", "match_percentage":"92"}
    }
}
```
## Error-Response:

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