---
title: KYC OCR
description: This api is for retrieving information from KYC documents like PAN and Aadhar.
---

This api is for retrieving information from KYC documents like PAN and Aadhar. We have to pass document image and document type in request. If the document image and type are valid, we will get a success response.

## POST

```
https://kraken.airpay.co.in/airpay/ms/baas/api/kyc-ocr
```

## Header

| Field | Type | Description |
| --- | --- | --- |
| affiliate | Text | Will be provided by Airpay (required) |
| checksum | Text | $string = $param.self::$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 |
| --- | --- | --- |
| img | Image | Supported document types: JPEG, JPG, PNG, Image file size: 4MB (required) |
| doc_type | Text | Permanent Account Number (Pan), Aadhaar, E-aadhaar, Aadhar-front, Aadhar-back (required) |

## Request-Example: 

```
curl --location --request POST 'https://kraken.airpay.co.in/airpay/ms/baas/api/kyc-ocr' \
--header 'api-key: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'affiliate: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'checksum: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'processor-key: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--form 'img="pan-card.jpg"' \
--form 'doc_type="Pan"'
```

## Success 200

| Field | Type | Description |
| --- | --- | --- |
| status | Numeric | 400- fail,200-success(length 3) |
| message | Text | success, fail |
| data | Text | [ { "details": { "dateOfBirth": { "value": "01/01/1993", "conf": "" }, "father": { "value": "RAMESH KM", "conf": "" }, "name": { "value": "RAHUL R", "conf": "" }, "panNo": { "value": "BABCD1234G", "conf": "" } }, "type": "Pan" } ] |

## Success-Response:

```
{
    "status": "200",
    "message": "success",
    "data": [
        {
            "details": {
                "dateOfBirth": {
                    "value": "01/01/1993",
                    "conf": ""
                },
                "father": {
                    "value": "Ramesh KM",
                    "conf": ""
                },
                "name": {
                    "value": "RAHUL R",
                    "conf": ""
                },
                "panNo": {
                    "value": "BABCD1234G",
                    "conf": ""
                }
            },
            "type": "Pan"
        }
    ]
}
```
## Error-Response:

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